Repository navigation
fix(metadata-protocol): a disabled holder counts for nothing at _env, the bare delete and discard, and the bare read beside a package-less row - #38948
Conversation
… the bare delete and discard, and the bare read beside a package-less row (wip) Claude-Session: https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb Co-authored-by: Claude <noreply@anthropic.com>
…ete and discard, and the bare read beside a disabled code holder Claude-Session: https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check21 anchor(s) derived from 3 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 — 44 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 21d45c34e861875aab5dd54525a1d49e11b6b720 && git checkout 21d45c34e861875aab5dd54525a1d49e11b6b720
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 665dfc4d815013918dd255236362bf426663baa1 dec9a08c0b01710b6526a0cc70c2b1404b34510e && git checkout -B drift-repro 665dfc4d815013918dd255236362bf426663baa1 && git merge --no-ff dec9a08c0b01710b6526a0cc70c2b1404b34510e
node scripts/docs-audit/affected-docs.mjs --json 665dfc4d815013918dd255236362bf426663baa1 |
…sabled-holder-counts-nothing
… count no disabled package (wip) Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-01T16:25Z · Flake reading before a one-time re-run of the failed jobs (readings-ci.md). Head Why I judge it a flake: this PR touches only the meta delete, discard and Action: one re-run of the failed jobs of run 46677236846 via |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ Final green head · 2026-12-01T16:48Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #38948 (Part of #38753) · head dec9a08 · 2026-12-01T16:50ZVERDICT: ACCEPT. No must-fix and no should-fix.
Next: the zone lands it. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-01T16:52Z · Landing: L1 ACCEPT at head dec9a08 (7318356829), no must-fix or should-fix; L1 judged no L2 owed (0 of 12 paths match a recogniser, |
Requested by Steve · project thread
Part of #38753
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
A disabled package holds no name and is never named (ADR-0150 D3, the disabled-holder family's ruling, and the maintainer principle quoted on the card: 「我觉得停用就该全部消失」). Four doors still counted one. All cells are judged by one rule, "the holders are the enabled ones", in the sibling module
packages/metadata-protocol/src/protocol-enabled-holders.ts._envcell (the card's own).admitEnvironmentQualifierthrows its marked refusal (a name the registry knows only through disabled packages) naming no package now, and the refusal carries a judgment under a registered symbol key. The three_envdoors (RestServer's qualified route, its import door's_env/NAMEspelling, the runtime dispatcher) used to rethrow the refusal naming the disabled package whenever the read naming no package served an item; they now hand that read's outcome to the judgment, which answers409 not-held-by-qualifiernaming the ENABLED package the read answers with (the plain read'spackageId, or the_packageIda draft read stamps on its item), or admits_envwhen it names none. Where that read withholds the name,_envstill answers its 404.soleEnabledRowHolder, asked at the call sites inprotocol-diff-delete-load.tsafter the row-held-base judgment), as the bare read serves E and the bare publish save writes E's row. Two or more enabled holders keep the refusal naming exactly them. Added this round: the same re-address where the rows (or the draft address) are bound to ONE package and it is disabled, beside an enabled holder, so a repeat bare delete or discard once E's row is gone answers E's no-op receipt instead of removing D's row or draft (measured on this branch before the fix: the repeat bare discard answeredDraft discarded (package=D)and the repeat bare deleteCustomization overlay deleted (package=D), each removing a customization hidden with D).countedRowHoldersdrops a disabled package (and a disabled holder's customization pair) from the rows the receipt names;shippedByCountedPackagemakes a name only disabled packages ship no artifact default. The table drop's verdict still counts every stored row (remainsis unchanged; only the receipt reads the counted set).servedRowHolderOf(protocol-meta-item-face.ts) serves the enabled package's row, as the same fixture answers without the disabled package (it answered 404).Pins flipped (FROM to TO, each named):
packages/rest/src/meta-qualified-item-route.test.ts, the CONTROL "only a disabled holder in the registry, and an enabled package's unhydrated stored row":details.candidatesFROM the disabled B TO the enabled C; plus the stored-draft CONTROL's_envdraft reads and layered read now assert candidates C and that B appears nowhere.packages/runtime/src/domains/meta-qualified-item-read.test.ts: the same two pins on the runtime dispatcher.packages/objectql/src/package-scoped-exact-qualifier.test.ts(row 17 / R4-B2 pin, the S4 CONTROL): the marked refusal's candidates FROM the disabled X TO none, and X absent from its message; plus a new pin of the judgment (plain read, draft read, the read's own refusal, and the three admit cases).packages/rest/src/meta-disabled-package-doors.test.ts, the S2 CONTROL "one bound package beside a disabled code holder is left as it was": FROM 404 on plain, layers and published TO the enabled package's row, compared in the same test with the fixture minus the disabled package's code item.packages/runtime/src/domains/meta-disabled-holder-served-stack.test.tsnear line 1732 is not flipped: that pin has two ENABLED shippers beside the disabled authored package, so its refusal naming the two shippers is genuine and stays verbatim.Handover
Head:
dec9a08c(merge oforigin/main645e6b1 at5b84a860, then the receipt fold123f1121and its changeset linedec9a08c). Taken over from the previous dev's4fd5608d: every commit read hunk by hunk and kept; the suites and gates that dev left unmeasured were re-run (Tests below).Left (this PR stays
Part of):409 RESOURCE_CONFLICTnaming D and E. Its judgment sits inpackages/metadata-protocol/src/protocol-save.ts, which another open pull request holds, so it is not edited here; it joins this card by claim amendment once that one merges. The change it needs, insaveMetaItemjust before the block that asksdisabledRowHoldersRefusalfor an ambiguous draft address: whensoleEnabledRowHolder(host, singularType, request.name, member, draftAddress.candidates)answers a package, setrequest.packageIdto it, cleardraftAddress, and setfollowedBaseto it (as the row-held-base follow does a few lines above). Unmeasured. The same file'spackagelessHolderRefusaldocblock carries a "Known gap" paragraph that is now wrong about the delete and the draft discard and needs rewording with it.Tests
Readings on dec9a08 (local, under the verify lock; metadata-protocol and objectql on 123f112/dec9a08c, whose source is identical)
5b84a860plus the re-address of the previous dev (4 cells: the delete receipt namedapp.disabled_demo, the repeat discard and delete removed D's draft and row; 2 cells: "reset to artifact default" where without the disabled code the delete answers "it no longer exists").@objectstack/metadata-protocol, full suite: 379 files passed / 9 skipped; 23868 tests passed / 45 skipped.@objectstack/objectql, full suite: 646 files, 14663 tests passed.@objectstack/rest, local project, full: 444 files passed; 9162 passed / 351 skipped.meta-disabled-package-doors+meta-qualified-item-route+import-integration594 passed; runtimemeta-qualified-item-read+meta-disabled-holder-served-stack644 passed; objectqlpackage-scoped-exact-qualifier472 passed.turbo run typecheckfor metadata-protocol, rest, runtime, objectql (after buildingdriver-turso): 45 of 45 tasks passed.@objectstack/runtimefull suite: NOT MEASURED locally (it did not finish inside the 10-minute foreground cap); CI's Test Core shards are the evidence.Ablations of this round (scripts/ablation-replace.mjs, rebuilt, dist preflight passed, restored and rebuilt)
countedRowHolders's filter dropped: the 4 receipt cells went red, the code-only cells stayed green.shippedByCountedPackageforced true: the 2 code-only receipt cells went red, the rest stayed green.dist/, targeted pins green (counts above)._envjudgment,soleEnabledRowHolder, theservedRowHolderOfarm) stand as recorded on4fd5608d; the code they mutate is unchanged.Gates
dispatch-gates --commandson dec9a08 derived 76 families; all 76 run locally with exit codes,--ranreconciliation: 73 run, 3 NOT MEASURED (the teardown-shape self-test cannot read its pinned commit on a shallow clone;check:dual-build-cjs-loadsneeds every package'sdist/;check:query-options-erasuredid not finish in 240 s). CI'sLint & Repo Gates(withLint · scoped · query-options erasure) is green on dec9a08.overlap-checkbefore each push: clean.Acceptance notes
_envwith NO registry holder and an enabled package's unloaded stored row serves that package's row at the environment's address (200), measured on8338d070by the previous dev. ADR-0150 D5 says_envanswers the environment's own item. A different cell (no disabled package), reported for filing, not changed._envjudgment admits (the environment's own item, as D5 reads it). No pinned fixture reaches that branch through a door; the objectql pin covers it.Verification
Run
pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-disabled-package-doors.test.ts -t 38753: 11 pass; every delete and discard receipt reads as without the disabled package and none namesapp.disabled_demo.Riskiest hunks:
packages/metadata-protocol/src/protocol-diff-delete-load.ts(the re-addressing call sites and the receipt's counted rows),packages/rest/src/meta-qualified-item-route.ts(admitEnvironmentAddress, now judges instead of rethrowing),packages/metadata-protocol/src/protocol-meta-item-face.ts(servedRowHolderOf, the new arm before both "as it was" exits).Generated by Claude Code