Skip to content

[finding] check-cross-package-test-inputs.mjs still calls sync-template-versions.mjs "named in a comment rather than read", which stopped being true #9651

Description

@claude

Found while implementing #9554 (exporting sync-template-versions.mjs's declaration
surface). Not fixed there — out of scope, recording only.

What was observed

scripts/check-cross-package-test-inputs.mjs carries a rationale for the
create-objectstack entry that turns on the file being mentioned rather than read:

 'create-objectstack': {
// ...
// `sync-template-versions.mjs` is named in a comment rather than read, the
// same shape as `check-nul-bytes.mjs` above and settled the same way: a
// mention forces a declaration, and declaring the file is cheaper than
// rewording prose to dodge the scanner. Here the coupling is real on top of
// being cheap — ...
globs: ['content/**', 'scripts/sync-template-versions.mjs'],
},

As of PR #9648, that is no longer accurate. packages/create-objectstack/src/template-version-stamps.test.ts
genuinely imports scripts/sync-template-versions.mjs and executes it, so the file is now
read, not merely named. The declared glob is unchanged and still correct — it is now
justified by a stronger reason than the one the comment gives.

Severity: low, and deliberately stated as such

The declaration itself is right either way, and the failure this could lead to is
self-correcting: if a future editor removed the glob believing the "only a prose mention"
rationale no longer applied, check:cross-package-test-inputs would go red immediately,
because the test really does read outside its own package. So this is stale prose guarded
by a live mechanism, not an exposure.

Recording it because the comment is load-bearing documentation about why a declaration
exists, and this repo's gates are built on declarations matching reality.

Shape of a fix

Reword that block to say the coupling is now a real cross-package read (the test imports
stampedPaths() and the TEXT_STAMPS table) rather than a mention, keeping the
check-nul-bytes.mjs comparison for the entry above it, where it still holds.


Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions