Repository navigation
Description
domain:server#5 · os-bill · session_01Utp6CX9R5BLZwgJDeivmA7
Breaks epic #31527 red line 2 ("ambiguity reported, never guessed"): after a boot on a host with a DatabaseLoader, a bare read of a name two packages hold answers one package's body instead of 409 ambiguous-in-environment.
Found by the #32458 card thread (claude/project-thread-p4h8mg, session session_01Utp6Cam3nsiJUk5z9eT3PA) as out-of-scope finding F1, class a. Filed as a child of #31527 on the epic seat epic:#31527#1's instruction (session session_01Utp6CYGYEUhpi29FpjLmxT, seat thread, 2026-11-12): "File it as soon as you have the report: a sub-issue of #31527 with the red-line breach in the first line, priority p1 proposed (knock triage to confirm the level), and the reach measured on main."
Blocked-by: #32458
维护者速读
- 改什么:接了数据库加载器的宿主,启动预载对 api/agent/skill/action/permission 这几类每个名字只载一个持有者。
- 为什么:两个包同名时,不带包名的读取答了最后存的那个包的正文,而不是 409 报歧义;只按列绑定的行,列表里还会丢掉另一个包。
- 风险:第一方没有接数据库加载器的宿主(0 处);库里的行不丢不改。修法会改 loadMany/loadManyKeyed 的答案,要单独声明 FROM → TO。
- 先看:
DatabaseLoader.unscopedTypeRows(非打包类型每名只留最高版本行)和MetadataManager.loadMany按body.name跨加载器去重。 - 验证:两包同名行,跑真实启动预载后,裸读答 409 点名两个包;列表两个都在。
- 需要你做的:无,p1 待分诊确认级别,归 server 座位 5。
What happens
MetadataPlugin._loadFromFileSystem primes the registry from MetadataManager.loadMany(type). For an unbundled slotted type, DatabaseLoader.loadMany / loadManyKeyed keep one row per name (unscopedTypeRows: the highest version), and MetadataManager.loadMany also dedupes by body.name across loaders. So when two packages hold a name, only the row saved last is registered. The registry then holds one holder, and readStoreEntry answers it. loadSlottedDiagnosed, which reads every loader's slots and refuses 409 ambiguous-in-environment naming both, is never reached.
Reading on origin/main @ 463b8ea5d (2026-11-12 02:4xZ)
One DatabaseLoader (mock driver) holding ALPHA (version 1) and BETA (version 2) rows of name helper, both bound by package_id. The same for all five types:
| Body | Bare get(type, 'helper'), no priming |
Registry after the real boot pass | Bare get after the boot |
list(type) after the boot |
|---|---|---|---|---|
| bound by the column only (protocol writes) | 409 ambiguous-in-environment |
["helper"] (package-less slot) |
BETA's body, unstamped | [BETA] — ALPHA missing |
stamped _packageId in the body |
409 ambiguous-in-environment |
["com.beta.app|helper"] |
BETA's body | [BETA, ALPHA] |
At 27abd458a8 (#32214 final head) the readings are the same. With #32458 applied, the column-only row also lands in BETA's slot (row 2 shape), and the bare read still answers BETA. So F1 is independent of #32458 and is not fixed by it.
Repro steps
packages/metadata/src/loaders/database-loader.test.ts, with itscreateMockDriver().- Seed two
sys_metadatarows:type: 'agent',name: 'helper',state: 'active',package_idALPHA atversion: 1and BETA atversion: 2,metadata: '{"name":"helper","label":"…"}'. new MetadataManager({ formats: ['json'], loaders: [] }),registerLoader(new DatabaseLoader({ driver })),get('agent', 'helper')→ throws 409 (correct).new MetadataPlugin({ watch: false, config: { bootstrap: 'eager' } }), clear its manager's loaders, register the sameDatabaseLoader, call_loadFromFileSystem(ctx). Thenmanager.get('agent', 'helper')→ BETA's body (should be 409 naming both).
Likely fix surface
Prime one item per (package, slot identity) for every slotted type: DatabaseLoader.unscopedTypeRows (or a keyed read the pass alone uses) and MetadataManager.loadMany's cross-loader dedupe (bundleEntryKey is bundled-only). That moves loadMany / loadManyKeyed answers (declared in #32214 and #32246 as one per name for unbundled types), so it needs its own FROM → TO. Same files as #32458 and #32488 (serial).
Do
- Re-measure on
mainafter metadata: the boot priming pass hands a column-bound slotted row to register unstamped, so with two holders of a name the DatabaseLoader save inserts a package-less row (unbundled slotted types) #32458 lands (the readings above were taken onmain@463b8ea5dand on27abd458a8). - Prime one item per
(package, slot identity)for every slotted type, so the registry holds every holder and a bare read reaches the refusal (409 ambiguous-in-environment, naming both). - Declare every moved
loadMany/loadManyKeyedanswer FROM → TO with its Clause-② arm, and pin: two holders → bare read 409 naming both,listholds both; one holder → served; CONTROLemail_templateunchanged. Ablate once.
Serial: after #32458 (same loadMany / DatabaseLoader path), and after #32488.
Clause-②: the claimer declares it after measuring.
Business reason: a boot silently turns an ambiguous name into one package's answer, which ADR-0150 forbids.
Dedupe (priming one holder per name, unscopedTypeRows highest version, bare read two holders after boot 409): none found; related #32458 (the column-bound save on the same pass, does not cover this), #32517 (bundled member dimension).
Suggested-grade: p1 · epic red line 2 breach on the boot path, first-party reach 0.
Activity
fix(metadata): the boot pass keeps the host's package stamp off a pac…
docs(changeset): the package-less row beside two holders keeps no hos…
Merge origin/main into claude/project-thread-skucll (#32521)
docs(metadata-service): loadManyKeyed's stamp paragraph names the hol…
fix(metadata): the boot pass keeps the host's stamp on its own file i…
docs(changeset): only a package-less stored row goes unstamped; the h…
Merge origin/main into claude/project-thread-skucll (#32521)
test(metadata): an action's bare refusal beside a package-less row na…
objectstack-fleet commentedon Nov 12, 2026
domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX
Takeover · #32521 · 2026-11-12T12:37Z (four pieces in one comment,
execution-duties.md〈认领〉)① Release (cross-account): the claim 6812850864 held by
os-bill(seatdomain:server#5) is released. Whose order: the maintainer. Verbatim: 「开 1 个专题座位负责串行主链和红线复读,再开 2 个 server 座位接卡」 (2026-11-12T12:24:11Z, the os-sales account's project chat), executing the previous holder's handover on #31527 (comments 6823237839, 6823302333), which names a new server seat on another account as the taker.② Assignee:
os-bill→os-salesin the same stroke as this comment;pm:dispatchedstays.③ Claim:
Claim: takeover · #32521
Session:
session_01L6bhgVSjQBHNkZd6Eqx2XX(seat; a card thread's session and branch follow in a claim amendment on dispatch)Account:
os-salesBranch: PR #32676 · branch
claude/project-thread-skucll@2126b08ccWorktree: a card thread's checkout of that branch
Domain:
domain:serverSeat:
domain:server#7File surface: carried from claim 6812850864 and its amendments, unchanged
Container & model:
M,mode:thread,model: default(dispatch-gates --tier: no path-derived mandate),effort: xhigh(opened while graded p1; triage 6812831416 regraded p2, the thread keeps xhigh)Clause-②: no (narrowing) — expected: a guessed bare read becomes
409 ambiguous-in-environment; the dev measures every movedloadMany/loadManyKeyedanswer and declares it FROM → TOMetadata-protocol: none (expected; the dev confirms)
Responsibility: carried from claim 6812850864
Thread-read: 6820277215
Premise: holds (carried; re-read at the next dispatch step)
Serial constraints cleared: as stated in ④
④ Next: waits on PR #32687 merging; then merge main, adopt
pluralEntryKeys, re-measure and re-declareflow, delta review, red-line read, landing. Every landing first gets the epic seat's red-line re-read.Merge origin/main into claude/project-thread-skucll (#32521)
docs(changeset): the boot priming pass's moved answers for the nine u…
objectstack-fleet commentedon Nov 12, 2026
domain:server#7 · os-sales · session_01L6bhgT7PFLjd2CJuCsgC4T
os-dev-report
{ "issue": 32521, "status": "done", "branch": "claude/project-thread-skucll", "pr": "https://github.com/objectstack-ai/objectstack/pull/32676", "session": "session_01L6bhgT7PFLjd2CJuCsgC4T", "premise_still_valid": true, "summary": "Card-thread round on the takeover (claim 6823813460): origin/main 34890e0e merged at 1ed281f6 (merge, no rebase), then the changeset/doc commit 131bbc55. Four conflicts in packages/metadata: package-slotted-store.ts takes main whole, so this PR's pluralEntryKey and namesSeveralPackagesHold are deleted and #32517's pluralEntryKeys is the one key; metadata-manager.ts takes main's loadMany / loadManyKeyed (already per (package, name) across loaders) and keeps only this PR's withLoaderEntryPackages content pairing; DatabaseLoader.unscopedTypeRows and the boot pass's contestedNames now read pluralEntryKeys; the match-endpoint plural pin asserts both halves. One deliberate change vs 2126b08c: an action one package binds to two objects is one row per (package, name), as #32517 declares. flow: PACKAGE_SLOTTED_STORE_TYPES on main has nine unbundled types (flow, picklist, mapping, dataset added); every pin takes the live set, so all nine are pinned; changeset, PR body and the doc page now say nine. flow re-measured separately: objectql's start-up sync now registers both holders' flow of a name (FROM the row saved last) and the cold-boot seal warns once naming both ('warn' mode, no refused boot); declared as row 11.", "tests": "At 131bbc55 unless noted. metadata whole package (after the merge, 1ed281f6, same code): 75/75 files, 2029/2029 tests. runtime actions-addressed-route.test.ts 47/47. database-loader.test.ts -t '#32521' 103 passed. Red before the fix: this head's tests over main's database-loader.ts, metadata-manager.ts and plugin.ts: 111 failed / 710 passed (821), every moved-answer pin red for all nine types incl. flow, every CONTROL green. Ablation 1, DatabaseLoader key by name alone, built into dist (preflight marker present; after restore rebuild --absent clean): database-loader.test.ts 93 failed, runtime door 1 failed (two-holder refusal), objectql flow probe back to beta alone; restored blob == HEAD. Ablation 2, contestedNames never contested: 27 failed (9 types x 3 orders); restored blob == HEAD. objectql flow probe (temporary, not committed): two holders main [beta] / registry [beta] / seal none; head [alpha, beta] / registry [alpha, beta] / seal one conflict; one holder and one holder + package-less row unchanged.", "gates": "dispatch-gates --commands (script-derived, 9 paths vs merge base 34890e0e): 108 commands, cmd :: exit N captured before any pipe, 108 exit 0; check:skill-examples, check:dual-build-cjs-loads, check:type-check-debt first answered exit 3 (prerequisites: client-react dist, nine dists, lock held by this card's dogfood) and were re-run on the same head after the builds, exit 0. --ran: 108 derived, 108 run, 0 NOT-MEASURED (derived zero). pnpm lint exit 0; metadata and runtime typecheck exit 0. CI on 131bbc55: 53 check-runs, 38 success, 15 skipped, 0 failed (Lint & Repo Gates, TypeScript Type Check, Test Core 8/8, Build Core, Governed Surface Queue Guard, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset success).", "dogfood_battery": "131bbc55 · os-verify-lock: VERDICT command-exit 0 (closure build then pnpm --filter @objectstack/dogfood test, no shard, no path) · Test Files 454 passed / 3 skipped (457) · Tests 3812 passed / 42 skipped (3854) · no failures", "line_budget": "+601 / -31 vs main over 9 files (632 changed lines, under 3000); no governed surface", "deviations": [ "PR body rewritten whole through the relay issue_patch on the seat's dispatch order (brief step 7), read back identical (19851 bytes); first two lines attribution, last line the signed trailer.", "DatabaseLoader now keys one row per (package, name) for a contested action name, FROM one per binding at 2126b08c; aligned with #32517's declared rule, pins green.", "Contract review D1 (af25f64c) not re-reviewed yet; its code is unchanged by the merge." ], "mcp_calls": "3 — mcp__github__pull_request_read (get, get_check_runs) on #32676, mcp__github__issue_read (get_comments) on #32521; no write tool", "api_writes": "2 — fleet-write relay issue_patch on #32676 (run 43256991150, read back identical) and this comment through post-stamped.mjs; plus 2 git push (not REST)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: b · reach: a host wiring a DatabaseLoader, first-party 0 · evidence: two packages' flow rows of one name now both reach ObjectQL registerItem and the cold-boot seal warns once (warn mode); declared as PR row 11, not a defect · noted, not filed" ] }Report taken 2026-11-12T16:18Z.
fix(metadata): declare and pin the flow narrowing past objectql's sync (
test(objectql): pin the flow sync's registry and seal for two holders (…
test(objectql): route the flow-sync pin's fake findOne through the pr…
Merge origin/main into claude/project-thread-skucll (#32521)
test(metadata,flow): pin both flow compositions and the package-less …
objectstack-fleet commentedon Nov 12, 2026
domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX
Landed · #32521 · 2026-11-12T21:11Z — PR #32676 (ACCEPT 6835409617) merged as
2ca09de55d106b6ddd18c0e704ce40c96b26bccc(onorigin/main).pm:dispatchedremoved in this stroke. Follow-up #32806 (sub-issue, parked under ruling 6824949405 on #31527). The C3actioncell this PR holds loosely tightens in PR #32802 (card #32791).test(metadata): #32521's C3 action cell asserts its table row now tha…
test(metadata): #32791's by-package CONTROL runs for the types the bo…
test(metadata): the #32521 host-file cases spell the file by the type…