test(spec): give the strictness ledger's older-spelling case an owned fixture - #7238
Merged
Merged
Conversation
… fixture (#6940) The case "reads the OLDER z.object(....strict() spelling as strict too" borrowed a live site to carry its assertion, and the #4001 campaign keeps converting whatever site it lands on: three evictions in three PRs (#5593, #6619/PR #6804, #6805/PR #6935). The reading under test belongs to the reader in scripts/lib/strictness-ledger.ts, not to any file in this tree, so the material now comes from a synthetic fixture the test writes itself. The live tree is still read, as a control - but as a POPULATION reading with no site named, so no conversion wave can evict it and the campaign's terminal state (zero carriers) stays green. No gate changes: the reader and every gate verdict are untouched, and the generated counts artifact does not move. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJATVrh6V2ysutYUJigh3B
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
os-help
marked this pull request as ready for review
August 10, 2026 03:53
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 #6940
Triage's deliverable, quoted so it is not re-derived:
Premise, re-verified on
origin/mainIntact.
packages/spec/scripts/strictness-ledger.test.ts:164was stillit('reads the OLDER z.object(…).strict() spelling as strict too'), and it still borrowedPerOperationRequiredPermissionsSchemafromsrc/data/object.zod.ts(looked up at:186) to carry its load-bearing assertion. Both that file andscripts/lib/strictness-ledger.tswere last touched by44d677c93(#6805 via PR #6935) — the eviction that prompted the finding.What changed
One file,
packages/spec/scripts/strictness-ledger.test.ts. No production code, no gate script, no ledger data.1. The load-bearing material is now owned. The case analyses a small synthetic source the test writes itself, through a new
analyzeSource(source, rel)helper in the samedescribeblock. Four sites, each doing a job:OwnedClosedSchemaz.objectstrictOwnedWrappedClosedSchemaz.objectstrictOwnedOpenSchemaz.objectstripOwnedHelperSchemastrictObjectstrictBoth readings are pinned as whole maps (
toEqualover name → posture and name → idiom), so a missing or extra site fails too. Every counting defect in this campaign has been an omission that afind()would have walked past.2. The live-site reading is kept — as a population reading, with no site named. This is the part I would flag for review, because it is a shape change rather than a move. The card is explicit that the live reading must not be dropped, and it is not; but keeping it as named sites is what put the fixture on the treadmill in the first place, so the control now reads the whole triaged tree and states population facts:
z.object+strictlives in a file whose text really contains.strict()— a coarse corroboration that deliberately does not share the AST reader, the same tactic (and the same stated reason) as the coverage-walk case above it;ObjectCapabilities/TenancyConfigSchema/permission.zod.tspins used to provide.Measured on this branch: 437 sites across the five triaged directories, of which 5 are live
z.object(…).strict()carriers (ui/view.zod.ts:2093,data/field.zod.ts:503,data/object.zod.ts:615/:743/:1075). So the control is not iterating over an empty list today.3.
mutate()and the pre-existing synthetic case at the end of the block now shareanalyzeSource. Same operation, previously written out three times; no behaviour change.Does it survive the terminal state?
Yes — stated explicitly because the card asks. When the campaign leaves zero in-repo carriers:
toBeGreaterThan(0)— an empty carrier population is the campaign's declared goal, not a regression;strictObject/z.strictObject/z.looseObject/z.objectand its posture set is stillstrip/strict/passthrough.The "move this fixture rather than deleting the assertion" instruction is gone from the case, because there is no longer a site to move.
Reverse verification — anti-vacuity
A test reading its own synthetic fixture can pass while proving nothing, so the reader's older-spelling support was broken two independent ways in
scripts/lib/strictness-ledger.ts(reverted after each run viagit checkout --, nevergit stash). Both were expected RED, and both failed on the owned fixture, not on the live control — which is the property that matters:A. chain walk no longer honours
.strict()forz.object(if (m === 'strict' && idiom !== 'z.object')):B.
idiomOfstops recognising the idiom (if (e.name.text === 'object') return null;):Reader restored and green after both.
Gates
pnpm --filter @objectstack/spec check:strictness-ledger— green, all three lines, includingdocs/audits/2026-07-unknown-key-strictness-ledger.counts.md is current — 437 site(s) measured, 41 authorable strip site(s) left.os-regen-routed counts artifact did not move:git status --porcelainreports exactly one modified path, the test file. (.gitattributesre-read live rather than trusted from a transcription.)pnpm --filter @objectstack/spec test— 360 files / 9397 tests passed.check:scripts-typecheckandcheck:test-typecheck— green;eslinton the changed file — clean.node scripts/check-nul-bytes.mjs— OK, plus a wider self-scan of the changed file for other control bytes: no hits.check:generatedreportsapi-surface/stale, which is the documented fresh-worktree false red (nopnpm --filter @objectstack/spec buildhas run here); the remaining 10 of 11 artifacts, counts included, are current.No changeset: test-only, nothing user-visible ships. Labelled
skip-changeset.Generated by Claude Code