Repository navigation
docs(spec): bring the odata module's Programmatic Use example under check:skill-examples - #19745
Conversation
…kill-examples The `@example Programmatic Use` block in `packages/spec/src/api/odata.zod.ts` ships in the tarball and on the generated reference page, but carried no `os:check` marker, so nothing type-checked it. Mark it and give it the `ODataQuery` import it needs to compile standalone. The sibling `@example OData Query` block is an HTTP request under a bare fence, not TypeScript: the gate only recognises ts/tsx/typescript fences, so a marker there is an orphan rather than a check. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RDBh5DqXd2xnLwvHLgLFr
…er the gate Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RDBh5DqXd2xnLwvHLgLFr
📓 Docs Drift Check
What this run could not see
Coarse fallback — 136 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewServed-tier: 177/177 Rendered by an isolated at-tier review subagent. ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS
|
Part of #19065
Clause-②: no
The module docblock of
packages/spec/src/api/odata.zod.tscarries two file-level@exampleblocks. Both ship twice — inside the tarball assrc/api/odata.zod.ts(this package'sfiles[]listssrc/**/*.zod.ts) and on the generated reference pagecontent/docs/references/api/odata.mdx— and neither was insidecheck:skill-examples' reach. This brings the TypeScript one under the gate.The diff
os:checkmarker line (the HTML-comment spelling the gate declares for this surface) on the line directly above the@example Programmatic Usefence;import type { ODataQuery } from '@objectstack/spec/api';, plus its blank line;content/docs/references/api/odata.mdx, and apatchchangeset.That is 3 added lines in the source file and 2 on the generated page. No other file under
packages/spec/src/**is touched, no prose is tidied and no citation is repointed — #17242 holds a broad claim over comment prose in that tree and this stays one hunk for it to merge past.The card asked for TWO markers. Only one of the two blocks can carry one — measured, not argued
@example OData Queryis an HTTP request under a bare fence, not TypeScript. The gate's fence-language predicate isFENCE_OPEN_REinpackages/spec/scripts/check-skill-examples.ts, which recognisests/tsx/typescriptand nothing else; a marker above any other fence is an orphan, which the gate treats as an error rather than a no-op. Probed on this branch withscripts/ablation-replace.mjs(mutation and restore both proven on disk):(the gate's own line spells those three with their fences; they are written bare here so this body stays one flat code block)
So marking that block does not check it — it fails the gate. Making it checkable would mean rewriting an HTTP URL example as TypeScript, or teaching the gate a fourth fence language: both are decisions, neither is this card. Hence
Part ofrather than a closing keyword — the seat decides whether the HTTP half is closeable at all.Acceptance — both halves, exit codes captured before any pipe
The card's test: strip the
$from one key in the@example Programmatic Useblock, the gate must go RED; put it back, GREEN.RED —
scripts/ablation-replace.mjs --file packages/spec/src/api/odata.zod.ts --anchor ' * $select: [' --replacement ' * select: [' --expect 1, then rebuildpackages/specand runpnpm --filter @objectstack/spec check:skill-examples:GREEN — restore, rebuild, re-run:
The tree was restored from the committed state and proven:
blob == HEAD (915756178328)andgit diff HEADempty, on both ablations. The rebuild in each leg is a prerequisite of the gate (its dist-freshness guard refuses adistolder thansrc), not the carrier of the mutation: the mutated text is a TSDoc comment the gate reads fromsrc, anddistonly supplies the declarations the block is checked against.Before / after on the gate's own counts: 258 blocks / 10 on the spec-source surface → 259 / 11.
What moved on the reference page
Exactly one line. The marker is machinery and
renderFileDescriptiondrops it before classification (packages/spec/scripts/lib/file-description.ts,SKILL_EXAMPLE_MARKER), which is also why it cannot break the MDX build:under the page's
**Programmatic Use**heading and its typescript fence, two lines are added at the top of the block —import type { ODataQuery } from '@objectstack/spec/api';and the blank line under it — and nothing else on the page changes.Sibling entries under
content/docs/references/**survive the regeneration — 225 files on both sides, exactly one differing (api/odata.mdx), and three quoted-exactgit grep -Fprobes taken from the three most recent reference-page commits onmainread identical counts onorigin/mainand on this branch (1 / 1, 1 / 1, 4 / 4), against a dark control reading 0.scripts/pm/os-regen-merge.shwas run before the push and refused with "origin/main was already contained in this branch — this refusal IS the whole outcome":origin/mainhas not moved since this branch's base, so there was no merge to make.Local verification
pnpm --filter @objectstack/spec typecheck→ exit 0pnpm --filter @objectstack/spec test→ exit 0, 515 files / 15043 tests passednode scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsderived 102 families from this worktree; all 102 were run and reconciled with--ran: 101 exit 0, 1 NOT MEASURED. The one ispnpm check:dual-build-cjs-loads, exit 3 — it needs a whole-workspace build (33 packages have nodisthere,@objectstack/account,@objectstack/setup,@objectstack/studio, … ), which a docs-only diff does not buy;Build Corecovers it in CI.pnpm lintwas narrowed rather than skipped, with the three readings that make a narrowing a measurement: ① the population is read fromeslint.config.mjs's ownfilesglobs, every one of them a{ts,tsx,mts,cts,js,jsx,mjs,cjs}extension, so of the three changed paths only the.tsone is in it (the.mdxand the changeset each came backerrorCount 0 / warningCount 1— the ignored-file warning); ②--format jsonreports 1 file linted, 0 errors, 0 warnings; ③ the config never enables type-aware linting for any file (noparserOptions.project, no typed@typescript-eslintrules — stated and measured in its own header), so a comment-only edit in one file cannot move the verdict on a file it did not touch. Readings taken at4a54706.Acceptance notes
@example OData Queryblock stays structurally unverifiable. Not a defect and not filed: the gate is a TypeScript compiler, and that block is an HTTP request. Noted here rather than carried further.@exampleunderpackages/spec/src(the card's own reading, at221dabb72a). This PR moves it by one file; the rest is the card's explicit non-scope.ODataQuerySchemashould refuse undeclared keys instead of stripping them. That changes the accept set of a published schema with consequences on the wire, and the example blocks here are written so they do not imply it either way.Generated by Claude Code