feat(spec): retire MetadataChangedEventPayloadSchema, the metadata:changed payload nothing ever emitted or consumed (ADR-0049) - #15139
Conversation
…anged payload nothing ever emitted or consumed (ADR-0049) WIP: schema + orphan enum removed, ADR-0087 registrations (two retired-def entries, the D3 semantic entry, registry regenerated), retirement pins in cluster.test.ts, the two isomorphic alias pins, cluster.mdx prose, the metadata-manager doc-comment and the changeset. Generated artifacts follow in the next commit. Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i Co-authored-by: Claude <noreply@anthropic.com>
… retirement json-schema.manifest loses kernel/MetadataChangeOperation deliberately (route 3 whole-def removal; the manifest deletion gate adjudicated it against RETIRED_DEFS_BY_MAJOR[18] - the payload def itself was never in the manifest, the JSON Schema build skips bigint); api-surface / export-origins / declaration-map lose the four retired names; the kernel reference page, the references index and the strictness-ledger counts regenerate. Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i Co-authored-by: Claude <noreply@anthropic.com>
…tire-metadata-changed-event-payload
…n/main deferred Merge commit 9003435 brought main's automation builtin-node-config work in; the references index and the strictness-ledger counts moved on both sides, so the os-regen driver deferred them. Regenerated from the merged tree with gen:schema, gen:docs and gen:strictness-ledger. Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 130 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 43eb12599cfd2a8d807ab0d4f5e1f6b122582c7d && git checkout 43eb12599cfd2a8d807ab0d4f5e1f6b122582c7d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8422acd67f84719d84bb5e5d417924457d1e464f fc66ae83351737c52e3976ca3c24d620c33e7a7e && git checkout -B drift-repro 8422acd67f84719d84bb5e5d417924457d1e464f && git merge --no-ff fc66ae83351737c52e3976ca3c24d620c33e7a7e
node scripts/docs-audit/affected-docs.mjs --json 8422acd67f84719d84bb5e5d417924457d1e464f
|
Contract review (Clause ②) — PASS · ACCEPTReviewer of record: the Head and window (readings at 2026-09-04T03:27Z)
The removal, verified in the diff
Report checklist
Out-of-scope group (sweep criterion: pointers to the redirected
|
|
Landing provenance — Landing window readings, all on head
Sequence: ready → squash auto-merge → Generated by Claude Code |
|
Dequeued, merge round in flight — Generated by Claude Code |
…tire-metadata-changed-event-payload # Conflicts: # packages/spec/src/type-alias-convention.pin.test.ts
…igin/main deferred Merge commit 63c21fc (origin/main 25a59bd) deferred content/docs/references/index.mdx; regenerated from the merged tree with gen:schema (via the spec build) and gen:docs, then check:generated --fix for whatever else the merged tree left stale. registry.ts was re-run through gen:migration-registry and came out byte-identical to the text merge. Claude-Session: https://claude.ai/code/session_0174WZTU6XcFcS7g2kykC53i Co-authored-by: Claude <noreply@anthropic.com>
|
Contract review (Clause ②) on the merge-round head — PASS · ACCEPT, Subject: head Delta, measured: Reverse verification: the pin count is machine-checked — the case recomputes the The dev's round-3 report is on the card (see the comment list at 04:50Z). Landing: at all-green on Generated by Claude Code |
|
Landing provenance, addendum for the merge-round head — Landing window readings, all on head
Sequence: the PR is already ready (03:51:32Z); squash auto-merge re-enabled now (the dequeue cleared it) → Generated by Claude Code |
Fixes #14180
Retires
MetadataChangedEventPayloadSchema/MetadataChangedEventPayloadfrompackages/spec/src/kernel/cluster.zod.tsvia the ADR-0087 retirement route, together with the orphan value schemaMetadataChangeOperationSchema/MetadataChangeOperationthat existed only to type itsoperationfield, and corrects the doc-comment inpackages/metadata/src/metadata-manager.tsthat claimed its payload "aligns with" the retired schema.Ruling (comment 5502971695, 2026-09-02, quoted where operative)
Clause ②: yes — a published schema disappears;
needs:contract-reviewis on this PR for the spec seat's in-seat review. The ADR-0087 registry entries are the deliverable's proof.Premise re-verified on origin/main 2cc4610
git grep MetadataChangedEventPayload: 7 files — the schema, its owncluster.test.ts, theIso394alias pin,api-surface/kernel.json,export-origins/kernel.json, one doc-comment (metadata-manager.ts:234) and one hand-written page (content/docs/kernel/cluster.mdx, a "Target spec (planned)" block). Zero runtime producers, zero subscribers, zero imports outsidepackages/spec.MetadataChangeOperation: every hit is the payload, itsIso393pin, and generated artifacts (api-surface / export-origins / declaration-map / json-schema.manifest / the references page) — no other consumer.git grepfor both names → no match (exit 1); positive control@objectstack/spec/kernel→ 3 hits.cluster-semantics.mdxno longer exists —apps/docs/redirects.mjsredirects it to/docs/kernel/cluster; the doc-comment's pointer was stale as well.Route taken (playbook route 3 — whole-def removal, no carrier key, no D2 conversion)
retired-defs/18.kernel__MetadataChangedEventPayload.ts,retired-defs/18.kernel__MetadataChangeOperation.ts, D3 semantic entrysemantic/18.metadata-changed-event-payload-retired.ts;registry.tsregenerated bygen:migration-registry(148 semantic, 86 retired-key, 94 retired-def).json-schema.manifest/kernel.jsonloseskernel/MetadataChangeOperationdeliberately — the disappearance ratchet fired first (❌ 1 previously published schema(s) disappeared from this build: json-schema/kernel/MetadataChangeOperation.json), then the manifest deletion gate declared it:ℹ️ 1 schema(s) left the published set since 2cc4610304c5, each declared (#4725): json-schema/kernel/MetadataChangeOperation.json — RETIRED_DEFS_BY_MAJOR, major 18.The payload def itself was never in the manifest (the JSON Schema build skipsbigint:Skipped: 23 (unsupported types: function, date, bigint, custom)).api-surface−4 (exactly the four names),export-origins/declaration-map−4,json-schema.manifest−1; the kernel references page and index regenerated; strictness-ledger counts regenerated.authorable-surfaceunchanged — the payload was never an authorable surface.cluster.test.ts: runtime namespace probes on./cluster.zodand on the./index(@objectstack/spec/kernel) entry,ClusterCapabilityConfigSchemaas the positive control.Iso393/Iso394deleted, count 829 → 827 with a receipt in the pin file (ids stay vacant, per that file's own convention).check:livenessgreen.content/docs/kernel/cluster.mdx— the only pageaffected-docsnames (# 1 docs name something this change touched). Every sentence that described the retired payload's protocol is rewritten to state the shipped address-only, re-read contract (list under "Read-and-report" below).content/docs/releases/**untouched..changeset/metadata-changed-event-payload-retired.md:@objectstack/specminor+ the**BREAKING**banner (launch-window convention) +adr-0087: registered metadata-changed-event-payload-retired; FROM → TO and the one-line fix included.Deviations from the PM claim (both stated in my claim comment on the card)
MetadataChangeOperationSchema/MetadataChangeOperationleaves with the payload (playbook §4: an exported value schema with no consumer reads as a capability — thekernel/DistributedStateConfigprecedent). This is the def the manifest deletion gate adjudicates; the payload def was never in the manifest.content/docs/kernel/cluster.mdx, notcluster-semantics.mdx(redirected).Measurements at the final head fc66ae8 — merged onto origin/main 25a59bd (exit captured before any pipe; verdict lines quoted)
Round 3 (2026-09-04, after the merge queue dequeued ceb9887 with MERGE_CONFLICT):
origin/main25a59bd merged as merge commit 63c21fc —scripts/pm/os-regen-merge.shstopped on the one text conflict,packages/spec/src/type-alias-convention.pin.test.ts, hand-resolved so both intents stack (#14168'sIso867kept,Iso393/Iso394stay deleted, the machine-checked count 830 → 828 in the header, the case title and the assertion, with the two rebalancing notes in sequence: 829 → 830 then 830 → 828); the merge commit was finished by hand withMERGE_HEADpresent, so the hook deferred the one artifact the driver declined to text-merge,content/docs/references/index.mdx, and regeneration commit fc66ae8 discharged it (gen:schemavia the spec build,gen:docs;os-regen: deferred regeneration discharged — all artifacts current, marker cleared.).registry.ts, text-merged by git, was re-run throughgen:migration-registryand came out byte-identical. The delta against ceb9887 beyondorigin/main's own side is exactly the pin file and the regenerated index. Every row below was re-taken at fc66ae8 — the manifest deletion line now readssince 25a59bd109a9,check:migration-registry149 semantic,check:spec-parsed-alias828 pinned isomorphic, andcheck-adr-0087-registration --base origin/main(merge base 25a59bd) still answersregistered metadata-changed-event-payload-retired (new here). No behaviour change.Sync round (2026-09-04):
origin/mainmerged as merge commit 9003435 viascripts/pm/os-regen-merge.sh(no rebase, no amend, no force-push); the two os-regen-deferred artifacts main had moved on both sides —content/docs/references/index.mdxanddocs/audits/2026-07-unknown-key-strictness-ledger.counts.md— were regenerated from the merged tree (gen:schema,gen:docs,gen:strictness-ledger) in ceb9887, the pre-commit hook printingos-regen: all deferred artifacts are current — marker cleared.;check:generatedexits 0 at that head (✓ All 15 generated artifacts are up to date.). Every row below was re-taken at ceb9887 with the same verdict lines — the manifest deletion line now reads1 schema(s) left the published set since fcc42e6c1de9, each declared (#4725): json-schema/kernel/MetadataChangeOperation.json — RETIRED_DEFS_BY_MAJOR, major 18.,check:strictness-ledgerreads440 site(s) measured(main's automation additions), andcheck-adr-0087-registration --base origin/main(merge base fcc42e6) still answersregistered metadata-changed-event-payload-retired (new here). No behaviour change in the round.pnpm --filter @objectstack/spec build(verify lock)check-dts-emitted: @objectstack/spec - 34/34 declared declaration file(s) present.check:generated(post--fix; second run)✓ All 15 generated artifacts are up to date.src/kernel/cluster.test.ts+src/type-alias-convention.pin.test.ts(lock)Test Files 2 passed (2)·Tests 23 passed (23)pnpm --filter @objectstack/spec typecheck(tsc + scripts + test-typecheck, lock)check:test-typecheck: OK — @objectstack/spec's test layer compiles under packages/spec/tsconfig.test.json; 54 file(s) / 261 error(s) / 145 pinned signature(s) heldcheck:migration-registry✓ src/migrations/registry.ts is current (148 semantic, 86 retired-key, 94 retired-def)check:liveness✓ packages/spec/liveness/state-counts.md is current — the same 35 row(s)check:strictness-ledger✓ docs/audits/2026-07-unknown-key-strictness-ledger.counts.md is current — 440 site(s) measured(439 before the sync round)--no-inline-configover the 8 edited TS filespnpm check:doc-authoring✓ doc authoring guard: 14710 customer-facing string(s) across 726 spec sources clean — no internal issue-id referencespnpm check:nul-bytescheck-nul-bytes: OK (scanned 8234 text file(s) …; no raw ASCII control bytes)node scripts/check-system-context-census.mjscheck-system-context-census: OK — 106 elevation read sites in 20 packages across 45 files, all anchored(no--fixdemanded)check-changeset-no-major.mjs --base origin/main(merge base fcc42e6; 2cc4610 before the sync)✓ This diff introduces no major bump.check-adr-0087-registration.mjs --base origin/main(merge base fcc42e6; 2cc4610 before the sync)✓ … 1 declared-breaking changeset(s), each carrying an ADR-0087 disposition … [BREAKING] registered metadata-changed-event-payload-retired (new here)os-verify-lock: VERDICT command-exit 0for each layerpnpm --filter @objectstack/metadata typecheck(lock)tsc --noEmitclean — nothing underpackages/metadataimports the removed symbolspnpm --filter @objectstack/metadata exec vitest run --maxWorkers=2(lock)Test Files 46 passed (46)·Tests 705 passed (705)node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands⚠️ STALE TREE — … at least 2 commit(s) behind origin/main); the derived families this diff touches were run, belowDerived gates run, every one exit 0:
check-affected-docs,check-drift-comment,check-doc-frontmatter,check-doc-route-spelling --advisory,check-docs-section-name,check-section-landing-index,check-keyed-text-bounds,check-undeclared-dep-imports,check:doc-anchors,check:docs-redirects,check:docs-single-h1,check:corpus-claim-drift,check:cross-package-test-inputs,check:spec-parsed-alias(827 pinned isomorphic),check:test-source-alias,check:quick-reference-counts,check:type-check-coverage, and speccheck:variant-docs,check:exported-any,check:dual-source-exports,check:entry-nameability,check:browser-reachable-entries,check:empty-state,check:llms-txt,check:skill-refs,check:yaml-examples,check:api-surface,check:export-origins,check:docs,check:spec-changes,check:upgrade-guide,check:authorable-surface.NOT MEASURED, by the gates' own words (CI owns them):
pnpm check:type-check-debtexit 3 —check-type-check-coverage: PREREQUISITE NOT MET — --re-measure cannot run: 27 workspace dependenc(ies) of the ledgered packages have no built type entry point on disk(needs the whole-repo closure);check:skill-examplesexit 1 —packages/client-react/dist holds no .d.ts declarations — the package is not built(its closure is runtime/rest/objectql-sized; this diff touches noskills/file and no SDK doc). The fullpnpm lintsweep is CI's; the eslint run above covers every edited TS file.check:react-declaration-paritycannot run here (EXTERNAL_INPUT_REQUIRED). The remaining derived entries are repo-wide families this diff does not touch.Reverse verification (one leg, from the committed state e95a24e —
cluster.zod.tsis byte-identical at ceb9887 and at fc66ae8; the sync round touched only the merge and two generated artifacts)git restore --source=2cc461030 -- packages/spec/src/kernel/cluster.zod.tsunder atraprestore, run through the verify lock. Mutation proven on disk:export const MetadataChangedEventPayloadSchemalines 0 → 1; on-disk blob37fdc590…= the BASE blob.Tests 2 failed | 18 passed (20)— both probes red (AssertionError: expected true to be false).gen:schemaexit 1 —❌ 1 RETIRED_DEFS_BY_MAJOR entr(ies) name a schema this build still publishes: kernel/MetadataChangeOperation (registered at major 18).git hash-object=61538d29…= theHEAD:blob;git diff HEADempty;git status --porcelainempty. Spec rebuilt at HEAD afterwards andcheck:generatedre-run there (report).Read-and-report
content/docs/kernel/cluster.mdx— the sentences the removal made false were all on the page this PR already edits, so they are corrected here rather than only reported: the §6 intro ("requires two things the current protocol lacks: a monotonic version per item and a well-defined invalidation event"); §6.1's "Status: planned … the cache-comparison contract below describe the target design" plus the "Once wired, caches store {value, version}" compare rules; the lane-1 "Target spec (planned)" block that named the schema; §6.3's "The contract below is the target design that goes with the version-stamped payload" and "Compare incoming version with cached version before evicting"; §7.3's "A higher-level cache factory (with automatic version comparison) is part of the Phase 4 / §6 target design". Left as-is on purpose: the §9 prior-art bullet ("ServiceNow … version-stamped cache with invalidation broadcast … Maps to §6") is a comparison with another product, not a claim about this protocol;skills/objectstack-platform/references/plugin-hooks.mdalready states there is nometadata:changedkernel event.packages/metadata-protocol'sClusterMetadataMutationPayloaddocs (runtime: TS-config boot registers a 'metadata' service without attachClusterPubSub — cross-node invalidation disabled; new object gives OBJECT_NOT_FOUND on non-writing replicas, never heals #13331) do not name the removed schema — zero hits for either retired name underpackages/metadata-protocol, andcluster.mdx's lane-2 section names onlyClusterMetadataMutationPayload.Out of scope and untouched:
packages/metadatabeyond the one doc-comment,packages/core,packages/metadata-protocol,content/docs/releases/**.Generated by Claude Code
Generated by Claude Code