Skip to content

docs(metadata-protocol): re-state row 6's trim justification on its live basis - #16131

Merged
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-15853-row6-justification
Sep 6, 2026
Merged

docs(metadata-protocol): re-state row 6's trim justification on its live basis#16131
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-15853-row6-justification

Conversation

@claude

@claude claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #15853

What was wrong

packages/metadata-protocol/src/protocol.destructive-409-face-inventory.test.ts argues, in the section titled Why row 6 is the one that forbids the trim, that duplicatePackage has no response schema in packages/spec at all. That clause has expired. Nothing is red — it is prose in a test docstring, not an assertion — but it is the argued justification for a restriction that is still in force, so the next person to re-derive the argument re-derives it from a false premise.

The measurement (re-located by TEXT, on a4816a79d)

⛔ Not inherited from triage — re-run here, with the control.

claim where it actually is now
the false sentence protocol.destructive-409-face-inventory.test.ts:64
DuplicatePackageResponseSchema packages/spec/src/api/package-lifecycle.zod.ts:199
the route bound to it packages/runtime/src/route-ledger.ts:369 (responseSchema: 'DuplicatePackageResponseSchema')
its conformance pin packages/spec/src/api/package-lifecycle.test.ts:225

Control: git grep -l DuplicatePackageResponseSchema hits 12 tracked files — the search is live, not a silent zero. (Triage read the same 12. An earlier attempt of mine with an --include filter read 11 because the filter list omitted .mdx; the unfiltered git grep is the reading.)

Why row 6 forbids the trim TODAY

This is the part the card asked for first, because it is what the docstring was standing in for. Three legs, each independently measured:

  1. TransportduplicatePackage reports a per-item failure as response DATA on a 200 (POST /packages/:id/duplicate). No HTTP error boundary runs, so details.issues never exists.
  2. Producer — its declared return still types failed[] inline with exactly type, name, error (protocol.ts:18403), and the push at protocol.ts:18714 emits exactly those three keys. Section 3 of this very file already pins that at runtime: expect('issues' in entry).toBe(false).
  3. Spec — the leg that changed. A response schema now DOES exist and the route IS bound to it. But it is a describe-only transcription of that inline return: DuplicatePackageResponseSchema.failed[] declares type, name, error and no issues, no code. The comparator that separates row 6 from publishPackageDrafts therefore still holds, on a sharper axis — PublishPackageDraftsResponseSchema.failed[] (packages/spec/src/api/protocol.zod.ts:1097) does declare issues: z.array(RuntimeAuthoringIssueSchema).optional(), and that DECLARED channel is what the message was trimmed against there.

#10524's order — declare a structured channel, and only then trim — is still unsatisfied on row 6, so the verdict is unchanged. What the correction changes is the reason and its strength: the schema's existence does not supply the missing channel, it freezes its absence into a published, route-bound surface. That raises the bar rather than lowering it — declaring issues here now moves a spec schema carrying its own conformance pin as well as the inline producer type.

No assertion changed. Prose only, one file, +32/-6.

Wider staleness sweep (reported, ⛔ not fixed here)

Triage's this row is the only one reading searched only for that wording. I swept the other forms while in the file:

Adjacency, run rather than assumed

PR #16117 changes exactly one file, packages/metadata-protocol/src/protocol.ts (read from its files endpoint). This PR changes exactly one file, the inventory test. Disjoint. check:single-claim-paths self-test passes (54 cases); the wired run needs a PR number and is reported below.

Verification

Built dep closure first (pnpm --filter '@objectstack/metadata-protocol^...' build), so nothing below reads stale dist/. Heavy steps went through scripts/pm/os-verify-lock.sh; verdicts quoted from its own VERDICT line, exit codes captured by redirect-then-read, ⛔ never through a pipe.

  • vitest run src/protocol.destructive-409-face-inventory.test.ts src/protocol.destructive-gate-reachable-types.test.ts2 files, 30 tests passed.
  • pnpm --filter @objectstack/metadata-protocol typecheck — clean. ⚠️ Verified this is a real reading and not a vacuous one: tsc --listFiles shows the edited test file is in the program (the package's tsconfig does not exclude tests).
  • Ablation for the published-surface question — subject file swapped back to a4816a79d, rebuilt, then restored. Mutation proved on disk before measuring (new text 0 hits, old text 1 hit); all 24 files under dist/ byte-identical across the ablation, sourcemaps included; restore proved after (hash-object equals the HEAD blob, git diff HEAD empty), then a final rebuild so dist/ matches HEAD.
  • Gate family derived, not recalled: node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack (264 families across 31 workflows). All 50 derived pnpm check:* plus 37 derived node-script invocations were run — ⛔ the family was not narrowed on the grounds that the diff is "only a docstring".
  • Line-number anchors, checked explicitly — this diff is +26 lines (665 to 691), so everything below the docstring moved. check:system-context-census green (105 elevation read sites in 19 packages across 44 files, all anchored; 140 anchors resolve, 27 declared non-read), check:doc-anchors, check:adr-anchors, check:adr-symbol-anchors, check:scripts-symbol-anchors all green. Direct search: nothing anchors a line number in this file (positive control: content/docs/permissions/system-context.mdx carries 82 such anchors, so the pattern search fires).

Declared non-readings — ⛔ these are NOT green

  • check:dual-build-cjs-loads and check:published-readme-exports exit 3, PREREQUISITE NOT MET in their own words: both read built output and the whole monorepo is not built. Their self-tests pass. Structurally unreachable by this diff — the ablation above proves every published artefact of the only package touched is byte-identical.
  • packages/spec check:react-declaration-parity exit 1: it needs a browser-dumped objectui sdui.manifest.json, and packages/console/dist/sdui.manifest.json does not exist in this repo. A missing cross-repo prerequisite, not a finding, and it reads nothing in this diff.
  • check-single-claim-paths.mjs and check-partof-closing-keyword.mjs bare runs exit 2, NOT WIRED in their own words — they need PR_NUMBER. Run against this PR once it exists.

Release impact

Noneskip-changeset. Measured, not assumed: @objectstack/metadata-protocol publishes files: ['dist', 'README.md', 'CHANGELOG.md']; the only changed file is a src/*.test.ts that no source imports (index.ts imports no test module) and that appears in no sourcemap's sources[] — it is named only inside the embedded sourcesContent of protocol.ts, which mentions it in three comments. The ablation confirms dist/ is byte-identical either side. This PR releases nothing.

Report follows on #15853, first line os-dev-report.

Generated by Claude Code, session session_01ARYe3yQTQCUFm5qPYNgKaJ.


Generated by Claude Code

…ive basis

The face-inventory docstring argued that `duplicatePackage` has "no response
schema in `packages/spec` at all". That clause has expired:
`DuplicatePackageResponseSchema` exists in
`packages/spec/src/api/package-lifecycle.zod.ts` and
`packages/runtime/src/route-ledger.ts` binds `POST /packages/:id/duplicate`
to it.

The verdict does not change, but its axis does. The schema is a describe-only
transcription of the inline return: its `failed[]` element declares exactly
`type`, `name` and `error` and no `issues`. The comparator that separates row 6
from `publishPackageDrafts` is therefore the declared SHAPE, not the schema's
existence -- `PublishPackageDraftsResponseSchema`'s `failed[]` does declare
`issues: z.array(RuntimeAuthoringIssueSchema).optional()`, and that declared
channel is what the message was trimmed against there.

So the declare-then-trim order is still unsatisfied on row 6, and the bar is
higher than the old wording implied: declaring `issues` now moves a published,
route-bound spec schema with its own conformance pin, not just an inline type.

Prose only. No assertion changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 6, 2026
@github-actions github-actions Bot added the size/s label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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
  • 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 — 0 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 932acc3df41e016812cfc17ffe1527fd7b5df538packageMentionDocs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants