fix: dogfooding sweep — query/mcp/cli/rules/skills#51
Merged
Conversation
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.
✅ Deploy Preview for contentrain-ai ready!
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/query— major (breaking)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.content→body, matching@contentrain/typesDocumentEntry.bodyanddocument_save. Update.content→.bodyand regenerate.slug; relation fields typedid | Target;include()args constrained to model keys."007"stays a string);where(field,'ne',x)is the complement ofeqon arrays.@contentrain/mcp— minor[contentrain]commits pass--no-verify(no more commitlint/husky/lefthook rejections).contentrain_merge.contentrain_branch_list,contentrain_branch_delete.contentrain_mergeresolves bymodel/locale/latest.contentrain_submitguides tocontentrain_mergewhen no remote.contentrainbranch post-merge (eliminates the parallel merge-conflict class).contentrain_statusderives live stats.relationsaccept{model,ref}; relation-integrity resolves at the target's storage locale; inline validation uses an overlay;validate --fixlands cosmetic fixes via auto-merge.contentrain(CLI) — patchinit.@contentrain/rules+@contentrain/skills— minorimport.meta.url+fileURLToPathinstead of__dirname(undefined in ESMvite.config.ts/nuxt.config.ts); Nuxt 4 coverage.generateinto aprebuild/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-statusbug 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/querymajor,@contentrain/mcpminor,@contentrain/rules+@contentrain/skillsminor,contentrainpatch. CI opens/updates the release PR on merge.🤖 Generated with Claude Code