Repository navigation
check:keyed-text-bounds: skip tmp/, move scaffold test's temp root under node_modules - #17421
Merged
baozhoutao merged 1 commit intoSep 10, 2026
Merged
Conversation
…es under node_modules check:keyed-text-bounds walked packages/cli/tmp/, a git-ignored directory, so a scaffold test killed before its afterAll cleanup ran left behind an os-init-shaped .object.ts the gate cannot parse, redding the gate for a reason unrelated to the author's diff. - Add 'tmp' to SKIP_DIRS, the walk's existing filter point, alongside the other build/tooling-litter directories it already skips. The walk stays repo-wide minus SKIP_DIRS; only the skip list grew by one entry. - Move init-scaffold-authoring-rules.test.ts's scaffold temp root from this package's tmp/ to under its own node_modules/, matching the placement generate-scaffold-validates.test.ts already documents for the same @objectstack/spec resolution reason. node_modules is already skipped by the gate regardless of the SKIP_DIRS change above. The gate's refusal for an unrecognised declaration shape on a keyed column is unchanged -- this only narrows which files are walked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
baozhoutao
marked this pull request as ready for review
September 10, 2026 13:29
baozhoutao
enabled auto-merge
September 10, 2026 13:29
baozhoutao
deleted the
claude/issue-16195-keyed-text-bounds-ignored-trees
branch
September 10, 2026 14:16
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #16195
What changed
Shape 1 —
check:keyed-text-bounds's walk (scripts/check-keyed-text-bounds.mjs) now skipstmp/directories, the same way it already skipsnode_modules,dist,build, etc. I added'tmp'to the existingSKIP_DIRSset rather than reading.gitignore:SKIP_DIRSis already the walk's one filter point and already carries this exact family of "build/tooling litter, not source" directories (node_modules,dist,build,coverage,.turbo,.next,.cache,.changeset) —tmp/is the same kind of entry, not a new mechanism. Reading.gitignorewould add a second, more powerful exclusion mechanism (glob/negation semantics) for one directory name, and risks silently widening the walk's exclusions to patterns nobody has reviewed against this gate's population.:376design note check — the walk is deliberately "the whole repository minusSKIP_DIRS", specifically so a boundary-scoped sweep (narrowing the walk toROOT_DIR_WATCH_HINTS) can't reopen the hole this gate exists to close. Adding one more literal toSKIP_DIRSkeeps that sentence true: the walk is still repo-wide minusSKIP_DIRS, just with one more skip entry — nothing about the population's boundary-scoping changed.Shape 3 —
packages/cli/test/init-scaffold-authoring-rules.test.ts's scaffold temp root moved from this package's git-ignoredtmp/to under this package's ownnode_modules/(node_modules/.init-scaffold-authoring-rules/), matching the placementgenerate-scaffold-validates.test.tsalready documents and uses for the same reason (@objectstack/specresolution needs the temp project underpackages/cliso Node can walk up into itsnode_modules).node_modulesis already inSKIP_DIRSregardless of this PR, so this closes the leftover-after-a-killed-run failure mode more robustly than shape 1 alone would for this one test. TheafterAllcleanup logic (rootsarray, unchanged) already targets whateverTMP_ROOTresolves to, so no separate cleanup-path edit was needed beyond the constant itself.Shape 2 is intentionally NOT done here (per triage/dispatch: out of this card's scope). See "Shape 2" below.
Acceptance legs (reproduced on
origin/maind57611dfd3before, and on this branch after, the fix)Before fix (repro, not committed): an
os init-shaped.object.tswritten underpackages/cli/tmp/…/src/objects/my_app_item.object.ts→exit 2.
Leg 1 — ignored tree ⇒ exit 0. Same file, same content, under
packages/cli/tmp/after the fix:exit 0.
Leg 2 — anti-overfix control, tracked directory ⇒ still exit 2. The identical file copied into a tracked directory (
packages/cli/src/tracked-repro-objects/my_app_item.object.ts) still produces:exit 2. The refusal is unchanged for tracked, unrecognised shapes — only the walked population moved.
Both repro trees were removed before committing; neither leg's files are part of this diff.
Shape 2 (out of scope here)
Per the card: the platform's gate (112/112 recognised files are the
ObjectSchema.create({…})factory shape) andos init's own emitter (a plain, annotatedData.ServiceObjectobject literal) disagree about how a.object.tsmay be written, and that's a decision, not a side effect of this cleanup. I looked for a standing ruling on which shape is authorised and did not find one framed as such, but did find real evidence on both sides:content/docs/data-modeling/schema-design.mdxstates the factory shape as "the" pattern for every object definition;packages/create-objectstack's own bundled template also uses it — a second, independent official scaffolder agreeing with the gate.content/docs/deployment/cli.mdx:1323documentsos init/os gemitting theData.*-typed literal as current, undeprecated behaviour, andpackages/cli/src/commands/init.ts'sTEMPLATESis actively kept in sync for version policy (scripts/sync-scaffold-emission-policy.mjs), i.e. treated as maintained source of truth, not legacy.Filed as #17418 (unlabelled, for triage), since I could read the disagreement clearly but not its resolution.
Changeset reading
Both changed files were measured against their package's published
files[], not guessed:scripts/check-keyed-text-bounds.mjslives at the monorepo root, which is"private": true(@objectstack/spec-monorepo) and is never published; it isn't referenced from any workspace package'sfiles[].packages/cli/test/init-scaffold-authoring-rules.test.ts—packages/cli'spackage.jsonfilesis["dist", "README.md", "CHANGELOG.md"];test/**is not included.Neither changed path ships in any published artifact ⇒ no changeset owed. The
skip-changesetlabel has been applied to this PR.Tests run
node scripts/check-keyed-text-bounds.mjs— exit 0 on the clean tree (112 files, 148/148 bounded, matches pre-change baseline).node scripts/check-keyed-text-bounds.mjs --self-test— PASS (0 failures), 17 cases.pnpm --filter @objectstack/cli exec vitest run --project unit test/init-scaffold-authoring-rules.test.ts— 6/6 passed (after building the package's dependency closure,pnpm --filter '@objectstack/cli^...' build, 58 workspace projects, exit 0).node scripts/pm/dispatch-gates.mjs --commandsfor this diff's changed paths (67 commands): 63 passed cleanly on the first pass;check:query-options-erasurewas only slow in the batch (90s cap) and passes cleanly (exit 0) standalone — 64/67 verified green.check:dual-build-cjs-loadsandcheck:type-check-debtboth refuse withPREREQUISITE NOT MET(exit 3) because they read built output across the whole monorepo, unrelated to either changed file — outside this diff's package-scoped local validation, left to CI.check:pm-dispatch-gates(thedispatch-gatestool's own self-test, unrelated to either changed file —scripts/pm/**is untouched here) ran every visible assertion green (no✗observed) but did not finish inside two long timeouts (90s then 580s); recorded as NOT MEASURED to completion rather than claimed as a pass.Clause-②: no
Generated by Claude Code