Context
src/config/gittensory-repo-focus-manifest.ts embeds GITTENSORY_REPO_FOCUS_MANIFEST_YAML, a bundled fallback used when the real root .gittensory.yml isn't reachable (local dev, pre-merge branches). Its header comment says "Keep aligned with .gittensory.yml at repo root" — today the two are confirmed byte-for-byte identical, but nothing in the entire test:ci chain enforces this (confirmed by grepping all 24 scripts under scripts/*.mjs for either string — the only hits are unrelated prose in check-docs-drift.mjs). The only thing keeping these in sync is a code comment.
Requirements
- Add a new script
scripts/check-manifest-drift.mjs, following the existing check-*-drift.mjs naming/structure convention (e.g. check-docs-drift.mjs, check-schema-drift.mjs).
- Parse the real root
.gittensory.yml and the GITTENSORY_REPO_FOCUS_MANIFEST_YAML constant (via the yaml package, already a project dependency and already used in src/selfhost/private-config.ts/config-lint.ts — prefer this over js-yaml, which appears to be an unused transitive entry in package.json), deep-compare the two parsed objects, and fail with a clear diff-style message on mismatch.
- Wire the new script into
test:ci (add npm run manifest:drift-check next to the existing npm run docs:drift-check step).
Deliverables
scripts/check-manifest-drift.mjs.
- A new
package.json script entry and test:ci chain insertion.
- Test coverage for the check itself (matching the existing
check-docs-drift.mjs test pattern, if one exists).
Expected outcome
Any future edit to .gittensory.yml that isn't mirrored into the bundled fallback constant (or vice versa) fails CI immediately with a clear diff, instead of silently drifting until a maintainer happens to notice.
Context
src/config/gittensory-repo-focus-manifest.tsembedsGITTENSORY_REPO_FOCUS_MANIFEST_YAML, a bundled fallback used when the real root.gittensory.ymlisn't reachable (local dev, pre-merge branches). Its header comment says "Keep aligned with.gittensory.ymlat repo root" — today the two are confirmed byte-for-byte identical, but nothing in the entiretest:cichain enforces this (confirmed by grepping all 24 scripts underscripts/*.mjsfor either string — the only hits are unrelated prose incheck-docs-drift.mjs). The only thing keeping these in sync is a code comment.Requirements
scripts/check-manifest-drift.mjs, following the existingcheck-*-drift.mjsnaming/structure convention (e.g.check-docs-drift.mjs,check-schema-drift.mjs)..gittensory.ymland theGITTENSORY_REPO_FOCUS_MANIFEST_YAMLconstant (via theyamlpackage, already a project dependency and already used insrc/selfhost/private-config.ts/config-lint.ts— prefer this overjs-yaml, which appears to be an unused transitive entry inpackage.json), deep-compare the two parsed objects, and fail with a clear diff-style message on mismatch.test:ci(addnpm run manifest:drift-checknext to the existingnpm run docs:drift-checkstep).Deliverables
scripts/check-manifest-drift.mjs.package.jsonscript entry andtest:cichain insertion.check-docs-drift.mjstest pattern, if one exists).Expected outcome
Any future edit to
.gittensory.ymlthat isn't mirrored into the bundled fallback constant (or vice versa) fails CI immediately with a clear diff, instead of silently drifting until a maintainer happens to notice.