docs(metadata-protocol): re-state row 6's trim justification on its live basis - #16131
Queued
claude[bot] wants to merge 1 commit into
Queued
docs(metadata-protocol): re-state row 6's trim justification on its live basis#16131claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
…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
Contributor
📓 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 Sep 6, 2026
zhuangjianguo
marked this pull request as ready for review
September 6, 2026 04:00
zhuangjianguo
added this pull request to the merge queue
Sep 6, 2026
Any commits made after this event will not be merged.
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 #15853
What was wrong
packages/metadata-protocol/src/protocol.destructive-409-face-inventory.test.tsargues, in the section titledWhy row 6 is the one that forbids the trim, thatduplicatePackagehas no response schema inpackages/specat 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.
protocol.destructive-409-face-inventory.test.ts:64DuplicatePackageResponseSchemapackages/spec/src/api/package-lifecycle.zod.ts:199packages/runtime/src/route-ledger.ts:369(responseSchema: 'DuplicatePackageResponseSchema')packages/spec/src/api/package-lifecycle.test.ts:225Control:
git grep -l DuplicatePackageResponseSchemahits 12 tracked files — the search is live, not a silent zero. (Triage read the same 12. An earlier attempt of mine with an--includefilter read 11 because the filter list omitted.mdx; the unfilteredgit grepis 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:
duplicatePackagereports a per-item failure as response DATA on a 200 (POST /packages/:id/duplicate). No HTTP error boundary runs, sodetails.issuesnever exists.failed[]inline with exactlytype,name,error(protocol.ts:18403), and the push atprotocol.ts:18714emits exactly those three keys. Section 3 of this very file already pins that at runtime:expect('issues' in entry).toBe(false).DuplicatePackageResponseSchema.failed[]declarestype,name,errorand noissues, nocode. The comparator that separates row 6 frompublishPackageDraftstherefore still holds, on a sharper axis —PublishPackageDraftsResponseSchema.failed[](packages/spec/src/api/protocol.zod.ts:1097) does declareissues: 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
issueshere 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 onereading searched only for that wording. I swept the other forms while in the file:protocol.destructive-gate-reachable-types.test.ts,protocol.invalid-metadata-422-face-inventory.test.ts,meta-compound-save-force-parity.test.ts(the last inpackages/rest, as stated).at-linksymbol resolves inprotocol.ts:ObjectStackProtocolImplementation,saveMetaItem,duplicatePackage,destructiveChangeRemedy.the 409 is raised in ONE placeclaim still holds — the only assignment ofcode = 'DESTRUCTIVE_CHANGE'isprotocol.ts:14998.packages/*/src/**/*.ts, which silently excludes top-level package files and returned a near-false zero; the reading above is frompackages/**/*.tsplus a firing positive control.packages/metadata-protocol/src/protocol.ts:14967. Filed as [finding] The same expired justification stands at the 409 raise site: protocol.ts argues duplicatePackage hasno response schema in packages/spec at all, which is false #16125 (no assignee,finding). ⛔ Deliberately untouched here:protocol.tsis held by open PR docs(metadata-protocol): thegetMetaItemsgate enumerates sixrest-server.tscall sites, not five, and names the transitive diagnostics door #16117, and a bounded in-place fix requires the file to carry no other claim.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-pathsself-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 staledist/. Heavy steps went throughscripts/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.ts— 2 files, 30 tests passed.pnpm --filter @objectstack/metadata-protocol typecheck— clean.tsc --listFilesshows the edited test file is in the program (the package's tsconfig does not exclude tests).a4816a79d, rebuilt, then restored. Mutation proved on disk before measuring (new text 0 hits, old text 1 hit); all 24 files underdist/byte-identical across the ablation, sourcemaps included; restore proved after (hash-objectequals the HEAD blob,git diff HEADempty), then a final rebuild sodist/matches HEAD.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(264 families across 31 workflows). All 50 derivedpnpm check:*plus 37 derived node-script invocations were run — ⛔ the family was not narrowed on the grounds that the diff is "only a docstring".check:system-context-censusgreen (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-anchorsall green. Direct search: nothing anchors a line number in this file (positive control:content/docs/permissions/system-context.mdxcarries 82 such anchors, so the pattern search fires).Declared non-readings — ⛔ these are NOT green
check:dual-build-cjs-loadsandcheck:published-readme-exportsexit 3,PREREQUISITE NOT METin 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-parityexit 1: it needs a browser-dumped objectuisdui.manifest.json, andpackages/console/dist/sdui.manifest.jsondoes not exist in this repo. A missing cross-repo prerequisite, not a finding, and it reads nothing in this diff.check-single-claim-paths.mjsandcheck-partof-closing-keyword.mjsbare runs exit 2,NOT WIREDin their own words — they needPR_NUMBER. Run against this PR once it exists.Release impact
None —
skip-changeset. Measured, not assumed:@objectstack/metadata-protocolpublishesfiles: ['dist', 'README.md', 'CHANGELOG.md']; the only changed file is asrc/*.test.tsthat no source imports (index.tsimports no test module) and that appears in no sourcemap'ssources[]— it is named only inside the embeddedsourcesContentofprotocol.ts, which mentions it in three comments. The ablation confirmsdist/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