Skip to content

fix: dogfooding sweep — query/mcp/cli/rules/skills#51

Merged
ABB65 merged 2 commits into
mainfrom
fix/dogfooding-sweep
Jun 4, 2026
Merged

fix: dogfooding sweep — query/mcp/cli/rules/skills#51
ABB65 merged 2 commits into
mainfrom
fix/dogfooding-sweep

Conversation

@ABB65

@ABB65 ABB65 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

End-to-end dogfooding of Contentrain in a real Nuxt project surfaced 24 friction points. A deep, evidence-backed code review (6 parallel reviewers) confirmed 18, corrected 2, refuted 1, and uncovered 8 new bugs (1 blocker). This PR fixes them all across 5 packages, with changesets for release.

Highlights by package

@contentrain/querymajor (breaking)

  • Blocker: generated dictionary interpolation was dead (the param regex lost its escaping on emit) — now substitutes correctly.
  • DocumentQuery.sort() added (parity with collections); previously threw at runtime.
  • include() now resolves relations across i18n boundaries (i18n:false target with a locale set; i18n:true target with none) — no more raw id strings.
  • Breaking: generated document body field contentbody, matching @contentrain/types DocumentEntry.body and document_save. Update .content.body and regenerate.
  • Types: no duplicate slug; relation fields typed id | Target; include() args constrained to model keys.
  • String frontmatter no longer numerically coerced ("007" stays a string); where(field,'ne',x) is the complement of eq on arrays.

@contentrain/mcpminor

  • [contentrain] commits pass --no-verify (no more commitlint/husky/lefthook rejections).
  • Feature branches pruned on failure and after auto-merge / contentrain_merge.
  • New tools: contentrain_branch_list, contentrain_branch_delete. contentrain_merge resolves by model/locale/latest.
  • Structured, ANSI-stripped git/hook errors; contentrain_submit guides to contentrain_merge when no remote.
  • context.json no longer committed per feature branch — regenerated deterministically on the contentrain branch post-merge (eliminates the parallel merge-conflict class). contentrain_status derives live stats.
  • Validators: non-i18n models validated against one locale (no phantom orphan warnings); polymorphic relations accept {model,ref}; relation-integrity resolves at the target's storage locale; inline validation uses an overlay; validate --fix lands cosmetic fixes via auto-merge.

contentrain (CLI) — patch

  • Stack-aware SDK wiring guidance printed after init.

@contentrain/rules + @contentrain/skillsminor

  • Document the two new branch tools (19 total) and the merge selector.
  • Bundler-config snippets use import.meta.url + fileURLToPath instead of __dirname (undefined in ESM vite.config.ts/nuxt.config.ts); Nuxt 4 coverage.
  • Document wiring generate into a prebuild/CI step (the client is git-ignored).

Verification

  • @contentrain/query: 227/227 tests, tsc + lint clean.
  • @contentrain/rules + @contentrain/skills: parity tests green.
  • @contentrain/mcp: full suite 570/574 (the 2 failures were a now-fixed remote-status bug and an environmental timeout under heavy local load); git/transaction, validators, context, http, and all content-save kinds verified green in isolation.

Release

Changesets included: @contentrain/query major, @contentrain/mcp minor, @contentrain/rules + @contentrain/skills minor, contentrain patch. CI opens/updates the release PR on merge.

🤖 Generated with Claude Code

End-to-end Nuxt dogfooding surfaced 24 friction points; deep review confirmed
18 and uncovered 8 more bugs. This sweep fixes them all.

@contentrain/query (major):
- Generated dictionary interpolation was broken (regex lost its escaping on
  emit) — params now substitute correctly.
- DocumentQuery.sort() added (parity with collections).
- include() resolves relations across i18n boundaries (i18n:false targets with
  a locale set, i18n:true targets without one) — no more raw id strings.
- Document body field renamed content -> body to match @contentrain/types
  DocumentEntry and document_save (BREAKING: regenerate; update .content -> .body).
- Types: no duplicate slug member; relation fields typed id|Target; include()
  args constrained to model keys.
- String frontmatter no longer numerically coerced ("007" stays a string).
- where(field,'ne',x) on arrays is now the complement of eq.

@contentrain/mcp (minor):
- [contentrain] commits pass --no-verify so commitlint/husky/lefthook no longer
  reject machine commits.
- Feature branches pruned on failure and after auto-merge / contentrain_merge.
- New tools contentrain_branch_list / contentrain_branch_delete.
- contentrain_merge resolves by model/locale/latest, not just exact name.
- Structured, ANSI-stripped git/hook errors ({error,stage,hook,code,...}).
- contentrain_submit guides to contentrain_merge when no remote.
- context.json no longer committed per feature branch; regenerated
  deterministically on the contentrain branch post-merge (kills the parallel
  merge-conflict class). contentrain_status derives live stats locally.
- Validators: non-i18n models validated against one locale (no phantom orphan
  warnings); polymorphic relations accept {model,ref}; relation-integrity
  resolves at the target's storage locale; inline validation uses an overlay;
  validate --fix lands cosmetic fixes via auto-merge.

contentrain (patch): stack-aware SDK wiring guidance after init.

@contentrain/rules + @contentrain/skills (minor): document the two new branch
tools (19 total) and merge selector; bundler-config uses import.meta.url instead
of __dirname (ESM); document prebuild/CI generate wiring.
@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit a5e329b
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a215b568041940008792aa7
😎 Deploy Preview https://deploy-preview-51--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The branch-health block test created 80 real branches via ~240 sequential
git subprocesses (checkout + commit + checkout per branch), taking up to
80+ minutes under load and locking the machine.

- Make the warning/block thresholds configurable in config.json
  (branchWarnLimit default 50, branchBlockLimit default 80) instead of
  hardcoded constants; readConfig now maps the new fields.
- Rewrite the test to set branchBlockLimit: 3 and create 3 unmerged cr/*
  branches cheaply via a single commit-tree object + ref writes (no
  checkouts, no per-branch commits). Runs in ~20s instead of timing out.
@ABB65 ABB65 merged commit e2baf4a into main Jun 4, 2026
6 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant