Skip to content

docs(spec): correct ManifestSchema.version's prerelease @example to a value its regex accepts - #17741

Merged
os-bill merged 1 commit into
mainfrom
claude/issue-17461-manifest-version-example
Sep 12, 2026
Merged

os-bill merged 1 commit into
mainfrom
claude/issue-17461-manifest-version-example

Conversation

@os-bill

@os-bill os-bill commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Fixes #17461

  • Clause-②: no — this PR puts no new key on any published payload.

What changed

One TSDoc line on ManifestSchema.version (packages/spec/src/kernel/manifest.zod.ts):

-   * @example "2.1.0-beta.1"
+   * @example "2.1.0"

The key documented two examples and its own regex accepted only one. Reproduced on this branch's base, no build needed:

$ node -e "const re=/^\d+\.\d+\.\d+$/; for (const v of ['1.0.0','2.1.0-beta.1']) console.log(re.test(v), JSON.stringify(v))"
true "1.0.0"
false "2.1.0-beta.1"

An author copying the second documented example verbatim got a ZodError out of ManifestSchema.parse. The corrected value is accepted: re.test('2.1.0') is true.

Why the comment was the artifact in error, not the regex

Three artifacts agreed on the refusal before this change and still agree afterwards:

artifact says touched here
version: z.string().regex(...) refuses a prerelease suffix no — byte-identical
prose following semantic versioning (major.minor.patch) major.minor.patch only no — byte-identical
manifest.test.ts invalidVersions pins '1.0.0-beta' refusal is deliberate no — not in the diff

Only the @example line dissented, so it is an editing residue in the TSDoc. Widening the regex to admit prerelease or build metadata is deliberately NOT done here — it would contradict a test that pins the refusal on purpose and would enlarge a published schema's accepted set. PluginSchema.version (#17070) accepts a different grammar today; the two keys are deliberately different and are not reconciled here.

Verification

Commands and their own verdict lines, all at dfcb1592:

  • pnpm --filter @objectstack/spec build — VERDICT command-exit 0 (under scripts/pm/os-verify-lock.sh)
  • pnpm --filter @objectstack/spec typecheck && pnpm --filter @objectstack/spec test — VERDICT command-exit 0; Test Files 473 passed (473), Tests 13435 passed (13435)
  • pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/kernel/manifest.test.ts — EXIT=0, Test Files 1 passed (1), Tests 41 passed (41) — the pinned invalidVersions case still passes, unchanged
  • pnpm --filter @objectstack/spec check:generated — ✓ All 15 generated artifacts are up to date, including check:docs. The @example line is not extracted into content/docs/references/**: measured at 0 occurrences there, with the neighbouring .describe() string Package version (semantic versioning) at 12 in the same tree as the lit control.
  • pnpm exec eslint . --no-inline-config --format json — exit 0 over 6636 files, 0 errors, 0 warnings. Repo-wide, not narrowed.
  • Derived gate family (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack): 76 derived, 73 run green, 3 NOT MEASURED. The three exited 3 — PREREQUISITE NOT MET, each refusing because a whole-repo pnpm build is absent for packages this diff does not touch: check:doc-formula-expressions, check:dual-build-cjs-loads, check:lean-entry-closure. Declared to CI, which builds everything. Reconciled with --ran.

Published reach

@objectstack/spec ships src/**/*.zod.ts in its files[], so the edited line is itself published, and the TSDoc is also emitted into the built declarations. Measured on packages/spec/dist after the build: corrected @example "2.1.0" at 16 occurrences, old @example "2.1.0-beta.1" at 0, with the untouched neighbour @example "1.0.0" at 16 as the lit control. Hence a changeset (patch, @objectstack/spec) rather than skip-changeset.


Generated by Claude Code

…to a value its regex accepts

The key's TSDoc documented `@example "2.1.0-beta.1"`, which the regex two lines
below (`/^\d+\.\d+\.\d+$/`) refuses — an author copying it verbatim got a
`ZodError` from `ManifestSchema.parse`. Corrected to `"2.1.0"`.

The refusal was already the settled reading: the regex, the prose
`(major.minor.patch)` and `manifest.test.ts`'s `invalidVersions` pin on
`'1.0.0-beta'` all agree. Only the `@example` dissented, so the comment was the
artifact in error. The regex, the `.describe()` string and the pinned test are
untouched; no accept set moves.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 1 documentable anchor(s).

3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/getting-started/quick-reference.mdx (via ManifestSchema (symbol, a top-level const object))
  • content/docs/plugins/development.mdx (via ManifestSchema (symbol, a top-level const object))
  • content/docs/protocol/kernel/plugin-spec.mdx (via ManifestSchema (symbol, a top-level const object))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v15.mdx (via ManifestSchema (symbol, a top-level const object))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 136 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 9bd4344e4b1f91a52e9835313650243745c29a67 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 4f4ddbcde0b8d6cbab2fc79f5a41b4e9de7195ef — the merge of head dfcb15921189ee953e8faafffa5c01c863007615 into base 9bd4344e4b1f91a52e9835313650243745c29a67, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 4f4ddbcde0b8d6cbab2fc79f5a41b4e9de7195ef && git checkout 4f4ddbcde0b8d6cbab2fc79f5a41b4e9de7195ef
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9bd4344e4b1f91a52e9835313650243745c29a67 dfcb15921189ee953e8faafffa5c01c863007615 && git checkout -B drift-repro 9bd4344e4b1f91a52e9835313650243745c29a67 && git merge --no-ff dfcb15921189ee953e8faafffa5c01c863007615

node scripts/docs-audit/affected-docs.mjs --json 9bd4344e4b1f91a52e9835313650243745c29a67

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 9bd4344e4b1f91a52e9835313650243745c29a67 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@os-bill
os-bill marked this pull request as ready for review September 12, 2026 02:17
@os-bill
os-bill added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit af98a04 Sep 12, 2026
36 checks passed
@os-bill
os-bill deleted the claude/issue-17461-manifest-version-example branch September 12, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] ManifestSchema.version's own TSDoc @example "2.1.0-beta.1" is refused by its regex — copy the documented example and parse throws

2 participants