docs(spec): the control-flow test's comment and describe title state the two-seam division - #17696
Merged
Merged
Conversation
…the two-seam division The block comment and the `describe` title both said `validateControlFlow` and the key gate "do not fight" and "meet at exactly one seam". A landed ruling (commit `21aabbc7b`) made both false: `FlowSchema`'s `superRefine` refuses a duplicate node id over one node-id space spanning the top-level `nodes[]` and every region body, so the schema decides a structural fact too, and the clean key-versus-structure division the comment drew is exactly what that ruling removed. Both now follow the canonical `control-flow.zod.ts` docblock (`c3ce76c210`) rather than restating the boundary independently: the two are no longer disjoint, they meet at two seams, and the cases in this block pin the region-slot seam only. The other seam's hand-off at `MAX_REGION_DEPTH` (32) is pinned by `flow.test.ts`'s `the seam at MAX_REGION_DEPTH` case, named here so a reader is sent to that pin instead of to a third hand-written restatement. Prose only. No assertion, no test data and no test behaviour moved: with whole-line comments and the one corrected `describe` title normalised away, the file's remaining bytes hash identical to the base commit's, and the suite still reports 45 passing cases. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
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): |
os-bill
marked this pull request as ready for review
September 11, 2026 15:06
os-bill
enabled auto-merge
September 11, 2026 15:06
os-bill
deleted the
claude/issue-17384-control-flow-test-restatement
branch
September 11, 2026 15:30
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.
Part of #17384
Prose only, inside one test file. No assertion, no test data and no test behaviour changed.
What was false
packages/spec/src/automation/control-flow.test.tsrestated the retired sentences in two places — a block comment and adescribetitle, the half that reaches a test report and agrep:describe('[#4001] validateControlFlow and the key gate do not fight', …)Both halves were falsified by the ruling that landed as
21aabbc7be:FlowSchema'ssuperRefinerefuses a duplicate node id over one node-id space spanning the top-levelnodes[]and every region body, so the schema decides a structural fact too, and the clean key-versus-structure division the comment drew is exactly what that ruling removed.What it says now
The block and the title follow the canonical
control-flow.zod.tsdocblock as it was left byc3ce76c210rather than restating the boundary independently: the two are no longer disjoint, they meet at two seams, and the cases in this block pin the region-slot seam only. The other seam's hand-off atMAX_REGION_DEPTH(32) is named as pinned byflow.test.ts'sthe seam at MAX_REGION_DEPTHcase, so the reader is sent to that pin instead of to a third hand-written restatement. Named artefacts only — a landed commit and a test — no schedule.New title:
describe('[#4001] validateControlFlow and the key gate meet at the region-slot seam', …)Falsified first, on
origin/mainat6465cc0a7ccontrol-flow.zod.tsdocblock carries "The two are no longer disjoint" and "They meet at two seams" (c3ce76c210)docs/audits/2026-07-unknown-key-strictness-ledger.mdrow carries the same two sentences (2bafbfdca9)control-flow.test.ts, located by content, not by lineCensus — probed on the CLAIM, not on one spelling
The standing instruction that surfaced this card, reused. Instrument: whole tree at
6465cc0a7c, read from a clean worktree with nodist/and nonode_modulespresent (so the census is reproducible), each file whitespace-flattened after stripping a leading block-comment marker per line, occurrences counted with a regexfindall(notgrep -c, which counts lines).Scoped to the 22 tracked files that name the claim's subject
validateControlFlow:do/does not fightcontrol-flow.test.tsexactly one seamcontrol-flow.test.tsanswer different questionscontrol-flow.test.tstwo seams(the correct sentence)control-flow.test.tsvalidateControlFlowzzqq-not-a-termIn-file census: 3 distinct false assertions, not the 2 the card names — the third is "It does not, and the reason is that they answer different questions", which asserts the very disjointness the ruling removed. All three are corrected.
Tree-wide: 1 file carried the claim in hand-written prose, and it is this one. Every other live restatement is already correct (
control-flow.zod.ts, the strictness ledger, the generatedcontrol-flow.mdx).packages/spec/CHANGELOG.mdcarries the old wording in the past tense and is RELEASE-OWNED — deliberately untouched.Broad single-spelling probes were run too and are reported as not claim-specific:
disjointfires 306 times tree-wide andanswer different questions72 times, almost all unrelated. The three otherdo not fighthits in the tree were read and are about other subjects.Proof that no assertion moved
A comparator drops every whole-line
//comment and normalises the one correcteddescribetitle line, then hashes the rest:Lit control for the comparator: the same run over a scratch copy with one assertion flipped from
toBe(false)totoBe(true)reportsDIFFERENTand exits 1 — soIDENTICALis a reading, not an instrument that cannot fail.Verification
pnpm --filter '@objectstack/spec^...' build— empty by construction:No projects matched the filters.packages/spechas no workspace dependencies, so leg 1 is reported as an empty run, not as a green.pnpm --filter @objectstack/spec build—VERDICT command-exit 0; working tree still shows only the one edited file, so no generated artifact moved.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/automation/control-flow.test.ts—VERDICT command-exit 0,Test Files 1 passed (1),Tests 45 passed (45).pnpm --filter @objectstack/spec test—VERDICT command-exit 0,Test Files 473 passed (473),Tests 13432 passed (13432).pnpm --filter @objectstack/spec typecheck—VERDICT command-exit 0. Its third legcheck:test-typecheckcompiles the test layer explicitly, so the edited.test.tsis inside the type-checked program rather than excluded from it.check:nul-bytes·check-spec-docblock-symbol-anchors·check-comment-mask-adoption·check-comment-mask-corpus·check-keyed-text-bounds·check:test-source-alias·check:cross-package-test-inputs·check:tier-file-adoption·check-closing-keyword-parity·check-changeset-no-major --base origin/main·check-adr-0087-registration --base origin/main·check:published-files·check:type-check-coverage· spec'scheck:docs/check:api-surface/check:authorable-surface/check:strictness-ledger.pnpm check:type-check-debtexits 3 —PREREQUISITE NOT MET, its--re-measureleg needs the wholepackages/*closure built and says in its own words that this is "NOT a pass and NOT a finding". Declared as a narrowing, not read as a green; CI builds that closure.pnpm check:nul-bytes, plus a direct control-character sweep of the edited file: no hits.check:*is CI's.scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 76 runnable commands from this one-path change set; the local face above is the affected package plus the families that actually read a test file, a comment or a changeset. Leg 1 of the standard face is empty by construction (no workspace dependencies), and the rest is declared to CI.Changeset
skip-changeset, applied as a label. The rule used is AGENTS.md → Post-Task Checklist §3: a changeset is owed for anything that publishes, andskip-changeset"is for a diff that publishes nothing from any released package."Measured rather than assumed, with a positive control:
npm pack --dry-run --jsoninpackages/specresolvesfiles[]to 2011 shipped paths.src/automation/control-flow.test.tsis not one of them; zero*.test.ts/*.spec.tsfiles ship at all.src/automation/control-flow.zod.tsis in that list (it matches thesrc/**/*.zod.tsentry), so the reading is an instrument that fires.dist/,json-schema/,api-surface/,liveness/,prompts/,llms.txt; the canonical sentenceThey meet at two seams— the positive control — reads 3 (dist/automation/index.d.mts,dist/automation/index.d.ts,src/automation/control-flow.zod.ts).Gate declarations
The commit message carries no card relation of any kind — the relation is declared once, here in the body. Greps over the stored message:
Part of,Part-of,Refs,Fixes,Closes,Resolves,Fix,Close,Resolveand bare#NNNNNeach 0; lit controlsCo-Authored-ByandClaude-Sessioneach 1.scripts/check-partof-closing-keyword.mjswas then run two-legged against this branch.🤖 Generated with Claude Code
https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Generated by Claude Code