Uh oh!
There was an error while loading. Please reload this page.
fix(lint): spell the runtime-gate fixture's master_detail reference as the string the spec declares - #13102
Merged
Conversation
…s the string the spec declares
`runtime-gate.object-writes.test.ts` carried `reference: { object: 'shop_invoice' }`
at a field-def key position. `FieldSchema.reference` is declared
`{"type":"string"}`, so `ObjectSchema.safeParse` refuses that carrier with
`invalid_type` at `fields.invoice.reference`, and the rule under test reads it
through `refOf()`, which accepts only a string and so resolved the master-detail
parent to `undefined`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CPrUz21stTFhJRUirdc4ywContributor
📓 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 Aug 29, 2026
os-elon
marked this pull request as ready for review
August 29, 2026 05:33
os-elon
enabled auto-merge
August 29, 2026 05:33
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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#13053
packages/lint/src/runtime-gate.object-writes.test.tscarried a master-detailfixture spelling its relationship target as an object carrier:
FieldSchema.referenceis declared{"type":"string"}, so that carrier is adocument the spec would refuse. The one-line fix spells it
reference: 'shop_invoice'.The value of this card is the measurement half, so all of it is below. Every
number was produced on this branch; nothing is relayed from the card.
The refusal, measured in both directions
The card quoted a
safeParseerror. Rather than relay the quotation, bothcarriers were run through
ObjectSchema.safeParse(spec 17.2.0) in one process:safeParsereference: { object: 'shop_invoice' }success: falseinvalid_typeatfields.invoice.reference— "Invalid input: expected string, received object"reference: 'shop_invoice'success: trueThe quoted string reproduces exactly, and the repaired fixture parses. A
one-sided green would have measured nothing.
The change is NOT inert — the finding's rendered text moves
The card argued the fix is inert because
refOf()returnsundefinedfor theobject carrier. That is true of the reader, but not of the output.
refOffeeds
firstMasterDetailField, whoseparentbecomesparentTextinside thesecurity-master-detail-ungrantedmessage and hint. Both carriers were runthrough
runRuntimeAuthoringRulesin one process:errors/advisoriescountpath(the asserted field)objects.shop_invoice_line.fields.invoicemessage(master_detail "invoice")(master_detail "invoice" -> "shop_invoice")hint...that already grants its master --...that already grants its master "shop_invoice" --So no assertion moves and the suite stays green, but the advisory now names the
master an author has to grant alongside the detail. The invalid fixture was
suppressing that name. That is the card's real content.
Re-census on today's main
The card's "only occurrence" claim was re-measured on this tree with the
TypeScript compiler API, over 5,593 files, excluding generated declaration
artifacts (
packages/spec/json-schema/**, wherereferenceis a propertyname whose value is a schema;
packages/spec/liveness/**; generated i18ntranslation maps — all three are
referenceas a map KEY, not a carrier).A carrier is a
referencewhose enclosing object literal also carriestype,i.e. a field definition.
Positive control: re-running the same instrument with the pre-fix copy of the
file appended returns
object: 1and names it, so the zero is a reading andnot a broken scan.
The 17
otherdecompose to zero defects: 6 Zod schema declarations in.zod.ts(the definition itself), 4 runtime pass-throughs in product code, 3 identifiers
that are string constants (
PARENT = 'os11431_parent',ACCOUNT = 'showcase_account', one template literal), and 4reference: nullin
solution-blueprint.test.ts, which is spec-legal there —SolutionBlueprintStrictdeclaresz.string().nullable().The card's census holds: this was an instance, not a class. The card's 587
bare-string carriers were counted across both trees; 451 is this tree's share.
Typecheck is NOT MEASURED here, and there is nothing to measure
pnpm --filter @objectstack/lint typecheckexits 0, but--listFilesshows itsprogram contains 0 occurrences of the edited file —
packages/lint/tsconfig.jsonexcludes
**/*.test.ts. The control (src/validate-security-posture.ts) ispresent once in the same listing, so that zero is a reading.
It is also moot for this diff:
runRuntimeAuthoringRulestypes the fixture asobjects?: readonly unknown[], so both spellings are equally validunknownand no type constraint exists in either direction. Reported as NOT MEASURED
rather than green. 24 of 72 package tsconfigs carry the same exclusion, so this
is a standing repo condition, not something this card introduced.
Changeset
Deliberately none;
skip-changesetapplied. Derived, not asserted: the difftouches only
src/*.test.ts,packages/lintdeclaresfiles: ["dist","README.md","CHANGELOG.md"],packages/lint/dist/contains notest artifact, and
check:published-filesstates its own verdict as "69publishable package(s) ... declare a
fileswhitelist that covers every entrypoint plus CHANGELOG.md and admits no test, test-harness config or build
script". Nothing here is published, so nothing is released.
Verification
All at final commit
4e2a28865c, gate family derived bynode scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackon asynced tree (an earlier derivation printed STALE TREE and still exited 0; the
branch was rebased onto
e9c1055ea2and re-derived).pnpm --filter @objectstack/lint exec vitest run— 81 files, 2297 passed,5 skipped. Identical before and after the fix.
$?:check:published-files,check:objectql-double-limit,check:cross-package-test-inputs,check:test-source-alias,check:engine-double-contract,check:where-matcher,check:nul-bytes,check:query-options-erasure,check:type-source-resolution,check:slot-lookup,check:page-declaration-shape.no files added", confirming they ran against the rebased base.
Generated by Claude Code
Generated by Claude Code