Repository navigation
test(spec): pin the OpenAPI WRITE-refusal test on the generator's diagnostic - #18790
Merged
os-bill merged 1 commit intoSep 17, 2026
Merged
Conversation
`refuses to WRITE the artifact when the document is inconsistent` asserted only a non-zero exit status and a missing artifact. A subprocess that never starts satisfies both, so the case stayed green in exactly the scenario where the gate it exists to pin never ran at all — measured by parking tsx aside, where 8 of the 9 spawn tests go red and this one is among the 13 that still pass. Assert the generator's own dangling-ref diagnostic as well, which is the shape its three sibling spawn tests already carry. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
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): |
This was referenced Sep 17, 2026
os-bill
marked this pull request as ready for review
September 17, 2026 21:34
os-bill
deleted the
claude/issue-18591-openapi-refuses-write-output-assert
branch
September 17, 2026 22:02
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.
Fixes #18591
Clause-②: no
refuses to WRITE the artifact when the document is inconsistent(
packages/spec/scripts/openapi-self-consistency.test.ts) asserted only a non-zero exitstatus and a missing artifact. A subprocess that never starts satisfies both, so the
case stayed green in exactly the scenario where the gate it exists to pin never ran once.
The fix is the shape its three sibling spawn tests already carry: assert the generator's
own diagnostic text as well. Test file only, 8 lines added, nothing else touched.
Which text to assert — measured, not assumed
The claim comment could not say what the generator actually prints for the injected
ApiErrorTyporef. The mutated generator was run once and read:So the sibling's pair does apply verbatim, and both halves are now asserted:
toMatch(/unresolvable \$ref/)andtoContain('#/components/schemas/ApiErrorTypo').Acceptance controls
Probe: park
node_modules/.pnpm/tsx@4.23.12aside, sonpx tsxresolves the pnpm shimand the shim's target is gone — the generator subprocess never starts. Proven in effect
before any result was read (
npx tsx --versionexit 1,Cannot find module …/tsx/dist/cli.mjs),restored under a
trap … EXIT INT TERMwith absolute paths and proven byte-identical aftereach leg (same inode 689295, same tar-stream sha256
e8d303f8…67e6).LIT — the red leg
Same command both times:
pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2 scripts/openapi-self-consistency.test.tsrefuses to WRITE …2085be2b2d)Tests 8 failed | 13 passed (21)cd4904d361)Tests 9 failed | 12 passed (21)The new failure, in full:
All nine spawn tests in the file now go red under the probe; before this change, eight did.
DARK — normal tree
2085be2b2d)Test Files 1 passed (1)·Tests 21 passed (21)cd4904d361)Test Files 1 passed (1)·Tests 21 passed (21)Nothing reddened. Whole package at
cd4904d361:pnpm --filter @objectstack/spec test→Test Files 485 passed | 1 skipped (486)·Tests 14015 passed | 1 skipped (14016), exit 0.pnpm --filter @objectstack/spec typecheck→ exit 0 (tsc --noEmit,check:scripts-typecheck,check:test-typecheck; the test-typecheck debt ledger did not move).Changeset — measured
npm pack --dry-run --jsoninpackages/specatcd4904d361: 275 published entries,0 of them under
scripts/, so the changed file is not in this package'sfiles[].Positive control on the same reading:
src/**/*.zod.tsis present (src/ai/agent.zod.ts, …),so the instrument is live. Nothing published moves ⇒ no changeset is owed;
skip-changesetapplies and is declared, not omitted.
Gates
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran …atcd4904d361:56 derived families — 51 run exit 0, 5 NOT MEASURED (recorded exit 3,
PREREQUISITE NOT MET:check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content,check:type-check-debt). All five read a builtdist/across the workspace and refuse without one; this diff emits nothing to any
dist/, so they areCI's closure-build run, not a red. Dependency-closure build (
--filter '@objectstack/spec^...')is an empty run:
packages/spechas no workspace dependencies.eslint --no-inline-config --format jsonon the changed file: 1 file, 0 errors, 0 warnings.The repo-wide
pnpm lintsweep is CI's run. Invariance leg, quoted fromeslint.config.mjs'sown header: "this repo runs one
eslint.config.mjs, which never enables type-aware linting(no
parserOptions.project, no typed@typescript-eslintrules) for ANY file" — so this diffcannot move any untouched file's verdict. The universe count was not measured, so this is a
targeted run, not a proven narrowing.
Acceptance notes
git grep "status).not.toBe(0)" -- '*.test.ts'returns 9 hits across 4 files; the 5 outside this file each carry an output assertion on the
adjacent line, so no second instance of this defect class exists in that spelling. Observation,
not a card.
runGenerator()could immunise the whole spawn family structurally by refusing a launchfailure once, instead of each case re-deriving it from diagnostic text. Out of scope here —
the card prescribes the siblings' shape and forbids inventing one — and moot for this file
now that all nine spawn cases assert output. Noted, not filed.
Generated by Claude Code