Repository navigation
fix(metadata-protocol): the sealed-overlay boot report no longer counts a served .custom override (#28771) - #28801
Conversation
… a served .custom override The boot census behind [metadata_sealed_overlay_unserved] counted the shipping package's declared .custom override with the unserved rows, so the line said no read serves it and prescribed deleting the stored row, the live customization. The census now skips a row isServedOverrideRowOf admits on its package_id column. Unserved rows, the legacy package-less row a declared override shadows included, are still reported with their remedies. What the boot loads, serves and arms is unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 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 f4d1d0abb999bd23730032777f7b32203c97c740 && git checkout f4d1d0abb999bd23730032777f7b32203c97c740
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0aaad18fc052326bc78378ead5f7e789f64e072d c3a0c542387cdaf461dd941c7bd1d8d83c99e6a9 && git checkout -B drift-repro 0aaad18fc052326bc78378ead5f7e789f64e072d && git merge --no-ff c3a0c542387cdaf461dd941c7bd1d8d83c99e6a9
node scripts/docs-audit/affected-docs.mjs --json 0aaad18fc052326bc78378ead5f7e789f64e072d |
|
domain:server#1 · os-project-manager · session_01R1q2xdtYgU6FKrZ7LgjPCC 席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, Fixes #28771. 3 files (+79 / −1): one condition in loadMetaFromDb's sealed-overlay census (protocol.ts), 7 new cases in protocol.reads-environment-only.test.ts, and a @objectstack/metadata-protocol patch changeset. Metadata-protocol: none. No export, no packages/spec/**, no gate. |
| Rule | A row joins the census only when isServedOverrideRowOf(record, packagedArtifactOwner(...)) does not admit it. That is the one served-override predicate, on the row's package_id column. What the loop loads, serves or arms is unchanged (the push sits beside the existing host-code-datasource skip). Unserved rows, the legacy row #28717 leaves shadowed included, keep their remedies. |
| Evidence | CI green on head c3a0c542 (filter=latest: 35 success, 13 skipped, 0 failed). The report shows 2 red on main (the override-only boot said "delete the stored row", and the override-plus-legacy boot counted 2), green on head, an ablation restored clean, the metadata-protocol and service-automation suites green, and 61/61 derived gates. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay, with every check green or an expected skip. |
Generated by Claude Code
domain:server#1 · os-project-manager · session_01R1q2xdtYgU6FKrZ7LgjPCC
Fixes #28771
Clause-②: no
Metadata-protocol: none
维护者速读
[metadata_sealed_overlay_unserved]告警不再把基础包在BASE.custom里声明的覆盖算作「没有读取会返回它」的行,也就不再让运维删掉这份正在生效的定制。真正没被返回的行照旧上报,附带补救办法。isServedOverrideRowOf,看存储的package_id列,不看正文_packageId。加载、返回、挂载都不变。回滚即还原本 PR。packages/metadata-protocol/src/protocol.ts的loadMetaFromDb,即sealedOverlays.push前多出的一个条件。pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.reads-environment-only.test.ts,预期 27/27 通过。What changes
loadMetaFromDbcollects the rows it hands toreportSealedOverlayRows, the census behind[metadata_sealed_overlay_unserved]. It now skips a row that the one served-override predicate admits:isServedOverrideRowOf(record, packagedArtifactOwner(type, name)), judged on the row's ownpackage_idcolumn, never on a body's_packageId. Since #28412 the shipping package's declaredBASE.customoverride is served, and for a flow it is armed, so the line's "No read serves them … delete the stored row" was a destructive remedy aimed at a working row.Only the census changes. The
objectskip just below it, the hydration and what is served or armed are all untouched. Every row no rule serves is still reported with both remedies, and the count goes down by exactly the served rows.⛔ No
packages/spec/**, no new export, no new error code and no new gate. Clause-② measured: no. It is a boot log line only: no served value, no export and no accept-set change. Metadata-protocol: none.Tests
New cases, red first on main, ablation
There are 7 new cases in
metadata-protocolprotocol.reads-environment-only.test.ts, section 3 (the boot report). They use the file's environment-kernel harness andloadMetaFromDb, with a packaged flow artifact:flow×1 (managed_flow), both remedies);Red first:
protocol.tswas restored to maind9c4cdc4(the suite imports the source, so there is no dist step). Result:Tests 2 failed | 25 passed (27):× a boot holding only the declared override prints no sealed-overlay line, because it printed "flow×1 (managed_flow) … delete the stored row";× … reports the legacy row alone, because it counted "2 … flow×2 (managed_flow, managed_flow)".Restore:
git checkout HEAD --, blob equal to HEAD,git diff HEADempty, porcelain empty.Ablation:
ablation-replace.mjsmade the exclusion always false (anchor&& !isServedOverrideRowOf(, 1 marker on disk). Result: the same two cases red,Tests 2 failed | 25 passed (27). Restore:ok restored: blob == HEAD … git diff HEAD is empty, marker count 0, porcelain empty.Full suites, typecheck, lint, gates
All on head
c3a0c542:metadata-protocolfull suite, under the verify lock:Test Files 295 passed | 4 skipped (299),Tests 22065 passed | 26 skipped (22091).service-automationfull suite, under the verify lock:Test Files 254 passed (254),Tests 3269 passed (3269).tsc --noEmit -p packages/metadata-protocol: exit 0.eslint --no-inline-config packages/metadata-protocol: exit 0.dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 61 families): each was run with its exit code captured before any pipe, and all exited 0.--ran:61 derived, 61 run, 0 NOT-MEASURED, 0 UNRUN.check-nul-bytes: exit 0.!in the title, and no(narrowing)arm).Acceptance notes
packagedArtifactOwner), the same owner the reads use. A row that overlays sealed content of a name no package ships never enters this census at all.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5oTRCUNQ4EA3YV84sZ