Repository navigation
fix(metadata-protocol): the seed save door refuses an unknown object; the probe names a missing object - #35388
Conversation
…wn object (red) Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
…t is unknown; the probe names a missing object Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
…r the seeded object Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
… ADR-0087 disposition Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 19 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 902129291a68188acc2c9f4d8051c6eeeb34d678 && git checkout 902129291a68188acc2c9f4d8051c6eeeb34d678
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0967cbe6a2919413952ab3521b9d7771a5398274 3025ade8eb1310b51a3aec79d03d824b56f944e4 && git checkout -B drift-repro 0967cbe6a2919413952ab3521b9d7771a5398274 && git merge --no-ff 3025ade8eb1310b51a3aec79d03d824b56f944e4
node scripts/docs-audit/affected-docs.mjs --json 0967cbe6a2919413952ab3521b9d7771a5398274
|
Claude-Session: https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CaysxGzF62ACvZ1x9x Final head for review · area pkg-1 · 2026-11-19T08:21Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
…ed-unknown-object-save-door
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35388, card #34864. Read: the card and its five comments, the PR body and its four comments, the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Nits:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CaysxGzF62ACvZ1x9x Final head for review · area pkg-1 · 2026-11-19T09:25Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta record for PR #35388, card #34864: a merge-only delta on top of the head the first record covers, ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. The first record raised none to close. The six scoped files are byte-for-byte what it judged, and the code they read on Nits carried, none new: N1 and N2 go to follow-up card #35413; N3 is an accepted deviation. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CaysxGzF62ACvZ1x9x Landing · head
Status: |
Fixes #34864
Clause-②: no (narrowing)
Metadata-protocol: narrowed
File-surface: as claimed (claim amended in comment 7003076381): packages/metadata-protocol/src/{protocol-save-door-refusals,protocol-save,protocol,build-probes,build-probes.user-text}.ts and their two test files, packages/spec/src/migrations/entries/semantic/18.seed-object-unknown-refused.ts, packages/objectql/src/{protocol-meta,publish-package-drafts-seed-receipt-counts,publish-seed-receipt-landed-ids}.test.ts, .changeset/34864-seed-unknown-object-save-door.md
Skills-docs: follow-up owed — skills/objectstack-data/references/seeds.md (the seed field table and the save notes: a runtime-saved seed must name an object that exists, a draft object is enough for a draft seed), skills/objectstack-data/evals/hooks-security-seeds-datasources.json (an eval that saves a seed naming an unknown object and expects the 422)
维护者速读
What changes
seedExternalIdSaveRefusal, now also asked withdoor: 'save'fromsaveMetaItem): a seed whoseobjectis resolved by no pending batch object, no object draft (on a draft save), no registered object and no stored or code-defined object (readMetaItem) is refused422 INVALID_METADATA, one finding atobjectnaming the seed, the object and the fix. The unknown test follows the permission-set grant refusal: a registry withoutgetObjectrefuses nothing; a name two packages hold counts as held; a dependency package's object answers the same registry read.migrate-storedre-saves are not judged.doorand still leave such a seed to the load; a draft seed whose object is a draft is still judged at its publish.build-probes.ts): when a published seed's object read throws AND the engine answers its registered objects (getSchema) with none for that name AND no published object of the name is held,seed_not_appliedtakes the new causemissing:message/fixname the missing object;userMessage(all 11 platform locales) says correct the object or create and publish it. Every other read failure keepsunreadable.seed-object-unknown-refused(packages/spec/src/migrations/entries/semantic/18.seed-object-unknown-refused.ts, data only: surface, replacement, reason, acceptance criteria). The changeset registers it; no other open PR or main carries that id.migrate-storedre-save.protocol-meta.test.tsregisters the object its brand-new seed names. The old metadata-protocol control "an object neither registered nor drafted is not judged here" pinned exactly the removed branch and is replaced by the new describe.Tests
protocol.seed-external-id-refusal.test.ts(shared harness): unknown object refused in draft-into-package / draft-no-package / publish saves (code, status, path, first clause, fix tail, nothing stored or loaded); a publish save whose object is only a draft refused; controls: registered object 200, same-package object draft 200,migrate-stored200, publish promotion of a planted draft still publishes, restore door resolves.build-probes-user-message.test.ts: themissingcase in the per-locale battery, the en/zh sentences as written, agent message/fix, and threeunreadablecontrols (object registered but read fails; engine withoutgetSchema; a published object of the name held).Acceptance notes
protocol.ts(refuseRestoredBodyTheSaveDoorRefuses) does not list the seed refusals at all, before or after this change.Verification
Readings on head
913a0d5dcunless stated; the ledger entry commit468886742is checked in its own block below.Red first (before the fix, commit b802de3)
vitest run src/protocol.seed-external-id-refusal.test.ts: Tests 4 failed | 26 passed (30) — the four new refusal pins; every control green.Package and consumer tests
@objectstack/metadata-protocol:typecheck+ fullvitest run— Test Files 358 passed | 9 skipped (367), Tests 23231 passed | 45 skipped; VERDICT command-exit 0 (head 727228b; later commits change docblocks, the changeset and objectql fixtures only).@objectstack/objectqlfullvitest run(downstream consumer, real protocol): Test Files 615 passed (615), Tests 13881 passed.@objectstack/runtime(7 seed/publish suites on the real protocol): 7 files, 299 tests passed;@objectstack/cloud-connectionmarketplace-install-local-install-modes.test.ts: 64 passed.Ablations (committed fix, ablation-replace, src-resolved suites)
if (!canLookUp) return undefined;->if (canLookUp) return undefined;: anchor 1 -> 0, blob 72f70d5f806c -> b21c9c2a9c58; Tests 4 failed | 26 passed; restored blob == HEAD,git diff HEADempty.if (objectIsMissing(->if (false && objectIsMissing(: Tests 3 failed | 42 passed (themissingbattery case, the as-written sentences, the agent text); restored blob == HEAD.Dogfood battery (narrowing arm)
pnpm --filter @objectstack/dogfood testunder the lock after building its closure: Test Files 482 passed | 3 skipped (485), Tests 4092 passed | 68 skipped (4160); VERDICT command-exit 0.Derived gate families
dispatch-gates --commands(76 families) run on913a0d5dc: 74 exit 0;check-adr-0087-registrationexit 1 there (entry not yet added) and exit 0 on468886742;check:type-check-debtexit 3 on913a0d5dc(lock queue timeout) and exit 0 on468886742.--ranreconciliation: 76 derived, 76 run, 0 unrun.overlap-check.mjs --branch=HEADclean before every push (#35261 merges cleanly).Ledger entry commit 4688867
check-adr-0087-registration --base origin/main: exit 0, "registered seed-object-unknown-refused (new here)".dispatch-gates --commandsadds for the spec path, after building the spec, lint and cli closures: all exit 0 (check:spec-changes,check:upgrade-guide,check:api-surface,check:authorable-surface,check:docs,check:liveness,check:llms-txt,check:skill-refs,check:strictness-ledger,check:variant-docs, the climigrate-meta-engine-guidancetest,check:spec-docblock-symbol-anchors,check:spec-parsed-aliasand the rest).pnpm check:type-check-debtunder the lock: exit 0.913a0d5dc) stands.913a0d5dc(run 44482123637) has noerror TS: all four type-check lanes werecancelledat 07:50:46-07:51:02Z when the push of468886742(07:50:44Z) started run 44482743535, and the lanes aggregator then reported "concluded cancelled". The run on the new head is the reading.席位核对
packages/metadata-protocol/src/protocol-save-door-refusals.ts(seedExternalIdSaveRefusalrestructure: the object resolution now runs before the keyed-mode filter;unknownSeedObjectRefusal),protocol-save.ts(the one'save'argument),build-probes.ts(objectIsMissingand themissingbranch).pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.seed-external-id-refusal.test.ts— 30 pass; the[#34864]describe shows the refusal and its controls.protocol.tsfacade ceiling: 11705 lines, exactly at its ceiling (check:facade-delegation-onlygreen); the seed docblock there was shortened and its detail moved tounknownSeedObjectRefusal.Generated by Claude Code