Repository navigation
Description
epic:#31527#1 · os-project-manager · session_01FEkQ5mLd7pR2PHjsPwiGkz
Filing gate: ④ coordination node: child S1 of the epic #31527 (parent and per-layer children), as ADR-0150 (docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md, merged in #31586 at 5d1382a)'s execution plan lists it. Hand-over card: filed undispatched as the epic seat signs off (maintainer 2026-11-08T16:34Z 「专题卡当前任务处理完,合并后就下班」). ⛔ Not a claim.
Ruling-ref: per-type table A (6723462584); epic A 「立专题」 (6723499113); division of labour A 「留核心,其余交车道」 (6723571682); ADR-0150 accepted by merge (#31586, 2026-11-08T21:16Z).
Business reason: inherited from the parent #31527. Behavioural metadata is addressed by (package, name), so two installed packages can each ship an item of the same name and every reader answers the right one, or refuses with the candidates, instead of silently taking the first match.
Reader: the next domain:server seat picks it from the queue (pm-dispatch selection) and accepts its PR against the red lines below.
Dedupe (open AND closed): activation ledger package_id (51; top hits #30806(open) #28411(closed) #23999(closed), none on point: they are this epic, its parent #30806, or unrelated cards).
class: d · type: Feature
Grade: p1, inherited from the parent (self-graded under 「定级你可以自己决定」).
Blocked-by: #31575
维护者速读
激活台账的唯一键加上软件包 id,并回填已有数据。可重复执行,不猜歧义。
What to build
The activation ledger's unique key becomes (metadata_type, package_id, name), the package column backfilled from the phase-1 holder (D8, R4). The migration is re-runnable and reports the ambiguous set, never guessing.
Surface
- Expected file surface: platform-objects, core
metadata-activation-store.ts. - Clause-②: no.
- Narrowing: no.
Acceptance — the epic's three red lines (every child shares them)
- Resolution never loosens. No first-registered fallback, no environment-wide guess for a caller with a package, no silent pick.
- Ambiguity is reported, never guessed. Every refusal and every migration report names every candidate.
- Independently releasable (red line 3). The PR proves it with ADR-0150's four readings: (a) the phase-1 one-holder tests stay green; (b) bare-name behaviour (URLs, MCP, SDK) is unchanged for every name with one holder, except this card's declared narrowing; (c) any migration is re-runnable and never guesses; (d) its
Clause-②:declaration and, where it changes the protocol, its ADR-0087 migration entry. - The epic seat is off duty after hand-over: the accepting lane seat checks these lines itself, and a narrowing beyond the declared one goes to the maintainer before landing.
Parent: #31527.
Activity
objectstack-fleet commentedon Nov 8, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage: confirmed ·
domain:server· p1 ·pm:blocked· 2026-11-08T22:00Z⛔ Not a claim.
epic:#31527#1is online, and the maintainer ruled 「留核心,其余交车道」. The children live in lane queues withoutpm:epic, which matches [Decision] Epic-driven delivery as the next working mode: one epic = parent + epic seat + milestone table; children as sub-issues withpm:epic+Blocked-by:; rolling split; mandatory hand-over when an epic seat leaves; a cap on concurrent epics #31502 A′.domain:server, by package ([Decision] Keepdomain:devxanddomain:serveras separate lanes, or merge them? Measured load and boundary friction, 2026-11-08 #31424 rule 1).Generated by Claude Code
objectstack-fleet commentedon Nov 8, 2026
epic:#31527#1 · os-steve · session_01ADHkmP7o3uDTti21wLTfPf
Unblocked 2026-11-08T23:03Z:
Blocked-by: #31575is closed. R merged in #31637 as 0ebb080 (resolvePackageScopedName,packageResolutionClosureand the three read-onlySchemaRegistrypackage-scoped methods in objectql;packageDependencyClosurein metadata-protocol).pm:blocked→pm:queuein this stroke. Read the resolver through those exports only, and never re-implement the rule. The epic seat reviews this card's PR against the three red lines before it lands.objectstack-fleet commentedon Nov 8, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim: PM loop round 1 · #31682 · 2026-11-08T23:06Z
Session:
session_01ADHkmP8JJo4zF2sjTBRwnX(seat); dev = card threadsession_01ADHkmQYLwhv2dRdWVF3aU1Account:
os-steveBranch:
claude/project-thread-dldbugWorktree: the card thread's checkout of
objectstack-ai/objectstackDomain:
domain:serverSeat:
domain:server#4File surface:
packages/platform-objects/src/**(the activation ledger object's unique key and package column),packages/core/src/**(metadata-activation-store.ts), the backfill/migration entry it needs, their tests,.changeset/31682-*.md(stop on breach; stop and report before anypackages/specschema edit)Container & model:
M,mode:thread,model: default tier (dispatch-gates --tier on core/platform-objects: no path-derived mandate),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility: the activation ledger in objectstack (
packages/core,packages/platform-objects) is unique on(metadata_type, name)with no package · no platform path covers it today (two packages cannot hold activation rows of the same name) · reached by every package activation write and readThread-read: 6728399198
Premise: holds (ADR-0150 D8 and R4; R #31575 merged via PR #31637; the dev re-measures in step 0)
Serial constraints cleared: R #31575 closed. No other open card claims
metadata-activation-store.ts.objectstack-fleet commentedon Nov 8, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment · #31682 · 2026-11-08T23:22Z · amends claim 6728429879 · File surface only (Branch, Clause-②, Metadata-protocol unchanged)
packages/drivers/driver-sql/src/schema-drift.ts(legacyUniqueReplacementsonly) and its tests. Root fix, not an operator step: a generated-name plain UNIQUE whose columns are an in-order proper subsequence of an unnamed declared global UNIQUE on the same table is read as superseded and routed through the existingreplace_unique_indexop (category safe, create-before-drop), as the tenant-scoped objects get GLOBAL unique indexes: 409-vs-201 enumerates other tenants' values, and a user's preferences silently stop persisting in their second org #8323 respelling arm already does. Widening a unique key is a pure relaxation, so the create cannot fail on existing rows. Without it, the ledger key change leavesuniq_sys_metadata_activation_metadata_type_nameorphaned as a destructivedrop_indexon every SQL database (3 upgrade-harness pins red on the branch head).--allow-destructiveas an operator step plus rebaselined pins, which trades a green gate for an upgrade chore on every deployment.schema-drift.ts(read 2026-11-08 23:23Z).objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmQYLwhv2dRdWVF3aU1
os-dev-report
{ "issue": 31682, "status": "done", "branch": "claude/project-thread-dldbug", "pr": "https://github.com/objectstack-ai/objectstack/pull/31727", "session": "session_01ADHkmQYLwhv2dRdWVF3aU1", "premise_still_valid": true, "summary": "sys_metadata_activation's unique key is (metadata_type, package_id, name) (ADR-0150 D4, D8 R4). core gains backfillActivationLedgerPackages (reads rows with no package, binds only a one-holder row, writes package_id alone, reports ambiguous rows with every candidate, dry-run option); objectql runs it once per cold boot at kernel:bootstrapped right after the holder seal, answered by resolvePackageScopedName with no caller package; positions are never asked. No reader or writer moves: setActive still addresses (metadata_type, name). Per claim amendment 6728608547, driver-sql's legacyUniqueReplacements gains a narrow widening arm so an upgraded database's old two-part index is a safe replace_unique_index, not a destructive orphan; the 3 upgrade-harness pins are green without rebaseline.", "tests": "head 0d68f212 (main merged in ed6d30e9), under os-verify-lock: core 3158/3158; platform-objects 1932/1932; objectql 11658/11658; driver-sql 4173 passed + 222 skipped (live-DB cells); typecheck exit 0 x4; harness+ledger dogfood 33/33; lint exit 0 on 4 packages + dogfood file. Ablations, each red then restored (git diff HEAD empty): A1 ambiguous->first candidate 5 red; A2 drop bound-row filter 5 red; A3 refused->first candidate 2 red; A4 drop seal gate 1 red; A5 drop unaddressed guard 1 red; A6 widening arm removed (dist marker present then absent) 3 driver-sql + 3 harness red; A7 ledger index non-unique (dist marker present then absent) 2 dogfood red.", "gates": "dispatch-gates --ran: 82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN, all exit 0 (derivation identical at ed6d30e9 and 0d68f212). Re-run after env exit 3: check-plugin-teardown-shape --self-test (fixture commit outside shallow clone; fetched), check:dual-build-cjs-loads (unbuilt packages; built), check:type-check-debt (lock queue-timeout). CI check-runs not yet read: not waited per standing order.", "dogfood_battery": "0d68f212 (tree = ed6d30e9 + changeset) · os-verify-lock VERDICT command-exit 0 · Test Files 441 passed | 3 skipped (444) · Tests 3659 passed | 41 skipped (3700) · no failures", "mcp_calls": "4 — mcp__github__issue_read x3 (get, get_comments x2), mcp__github__pull_request_read get x1; no write tools", "api_writes": "2 — via fleet-write relay as objectstack-fleet[bot]: pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> POST /pulls #31727 draft + POST /issues/31727/assignees os-steve); this os-dev-report (POST /issues/31682/comments via post-stamped)", "open_questions": [ { "question": "Rows with a NULL package_id (environment-authored items) are not constrained by the new NULL-distinct key; their one-row property rests on setActive's read-then-write. Add a NULL-safe key part?", "options": [ "A leave as is: single writer, E children move writes onto the package anyway", "B spec card for a NULL-safe declared key part (IndexSchema has none today)" ], "recommendation": "A, because nothing but setActive writes the ledger and only a race between two first writes of one environment item could duplicate; revisit if an E child adds a second writer" } ], "security_findings": "none", "out_of_scope_findings": [ "class: none (unexercised drift, NOT MEASURED: no mongod in container) · reach: none yet · driver-mongodb builds its own indexes and has no orphan/replace arm, so an upgraded Mongo database keeps the old (metadata_type, name) unique beside the new one; it would refuse a second package's row once an E child writes one · dedupe words: mongodb legacy unique index widened key, activation ledger mongo index · carrier: epic #31527 E children (noted, not filed)" ], "files_changed": [ ".changeset/31682-activation-ledger-package-key.md", "packages/core/src/utils/metadata-activation-store.ts", "packages/core/src/utils/metadata-activation-store.test.ts", "packages/drivers/driver-sql/src/schema-drift.ts", "packages/drivers/driver-sql/src/sql-driver-schema-sync.ts", "packages/drivers/driver-sql/src/sql-driver-widened-declared-unique.test.ts", "packages/objectql/src/activation-ledger-backfill.ts", "packages/objectql/src/activation-ledger-backfill.test.ts", "packages/objectql/src/plugin.ts", "packages/platform-objects/src/system/sys-metadata-activation.object.ts", "packages/platform-objects/src/system/sys-metadata-activation.object.test.ts", "packages/qa/dogfood/test/activation-ledger-package-key.dogfood.test.ts" ], "line_budget": "12 files, +1125/-41: source +452/-38 (core 133/9, objectql 160/0, driver-sql 124/2, platform-objects 35/27), tests +654/-3, changeset +19", "deviations": [ "driver-sql surface: amendment named legacyUniqueReplacements only; the arm also needed its own message branch in diffManagedIndexes (schema-drift.ts) and one physical argument at its caller in sql-driver-schema-sync.ts", "forced test edit: platform-objects index pin now asserts the 3-part key", "PR body footer uses the session's Generated-with + session URL lines rather than os-dev's _Generated by … session_<id>_ form; not PATCHed (dev never edits the PR body)", "CI check-runs not read (standing order: do not wait for CI)" ] }Stamped 2026-11-09T00:29Z.
objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment (additive, Clause-② value only) · #31682 · 2026-11-09T00:30Z
Claim 6728429879 (as amended by 6728608547) read
Clause-②: no. The built diff (PR #31727) adds five symbols to the published@objectstack/coreroot throughexport * from './utils/metadata-activation-store.js':backfillActivationLedgerPackages,ActivationLedgerHolder,ActivationLedgerUnboundRow,ActivationLedgerBackfillReportandActivationLedgerBackfillOptions. That widens a published package's public face, so the value is:Clause-②: yes (widening). The widened face is those five@objectstack/coreroot exports. Nothing is removed or renamed. The activation doors and every name-keyed reader answer as before.Metadata-protocol: noneis unchanged. The ledger is a platform object, not authorable metadata. The tier staysTIER_DEFAULT: a widening alone, with no published schema, no narrowing and no governed path, so the seat writes the record. The open question in os-dev-report 6729368753 is ruled keep: rows with a NULLpackage_idstay unconstrained by the NULL-distinct key, and the one-row property rests on the single writer's read-then-write, as the code comments say.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment (additive, surface + rulings) · #31682 · 2026-11-09T00:38Z
This round answers the epic seat's red-line review of PR #31727 (record 6729398713): rows that name no package keep a store-enforced one-row guarantee per
(metadata_type, name).Surface added:
packages/metadata-protocol/src/migrations/activation-ledger-packageless-index.tsand its tests;packages/metadata-protocol/src/plugin.ts,packages/metadata-protocol/src/index.tsandpackages/metadata-protocol/src/runtime-index-preflight.ts, only where the new migration registers;packages/drivers/driver-mongodb/src/mongodb-schema.tsand its tests, for the Mongo leg.Rulings:
uniq_sys_metadata_activation_packagelesson(metadata_type, name) WHERE package_id IS NULL, built by a runtime migration after thenotification-preference-identity-index.tsprecedent (probe, refuse on conflict, report the duplicates). Postgres and SQLite are measured live. MSSQL gets a filtered index, with the SQL pinned and the live leg NOT MEASURED. Mongo gets a partial unique with filter{ package_id: { $type: 'null' } }, which matches the explicitnullthe single writer stores. It is pinned on the built ops, with the live leg NOT MEASURED.os migrate applyruns. Pick one:(metadata_type, name)index on a dialect where the package-less index could not be built. The old index then keeps guarding, and the plan line says why.An
unsupportederror line alone, followed by a retire, does not meet the requirement. If (b) leaves MySQL unable to admit a second package's row, record that as a gap, NOT MEASURED live, beside driver-mongodb: an upgraded database keeps the old (metadata_type, name) activation-ledger unique beside the widened key, so the first second-package row is refused (#31682 follow-up) #31732.lockRecord,客户端只能假定「有 pending 就是锁死」 #3814 R3), so the read-then-write in one process is its guarantee. The PR states this as a gap and does not claim it is covered.The Clause-② value stays
yes (widening)(6729390478). The new migration exported from@objectstack/metadata-protocolwidens that package too. Name it on both carriers, with that package atminor.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment (additive, surface only) · #31682 · 2026-11-09T00:48Z
Surface added:
packages/cli/src/commands/migrate/duplicates.contract.test.ts, one line. Registering the package-less probe foros migrate duplicatesgrows that contract's list of kernel:ready indexes from 4 to 5, and this is a forced test edit. Nothing else inpackages/cliis in scope.The MySQL / MariaDB routes measured by the dev are approved under ruling 2 of 6729482694, as the epic seat narrowed it. MySQL 8.4 takes route (a): a functional key part over the digest, with no visible column. MariaDB 11 takes route (b): the widening arm offers the safe replace only when the package-less guard exists physically. Otherwise the old index keeps the orphan arm's destructive, opt-in reading, as on
main. The resulting MariaDB gap is carried by #31732.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment (additive, surface only) · #31682 · 2026-11-09T02:41Z
Surface added:
packages/cli/src/commands/migrate/duplicates.integration.test.ts. This is a forced test edit, the integration twin of the contract test that 6729595741 admitted. CITest Core (1/8)onc1aad527(job 128945950505) fails at "#8928 os migrate duplicates — against a really booted stack" withexpected … to have a length of 4 but got 5, because the package-less probe now registers as the fifth kernel:ready index. Nothing else inpackages/cliis in scope.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment (additive, surface) · #31682 · 2026-11-09T02:42Z
CI on
c1aad527(run 42550661163) has two more reds that this diff owns. Both add files to the surface.packages/types/src/driver-error-classification.callers.test.ts, fromTest Core (7/8).activation-ledger-packageless-index.tsis a newoperatorFacingErrorText()caller. Per [security] operatorFacingErrorText hands a raw statement fault's cause message, statement and inlined values included, to its operator-facing callers: the fourth position of the #21274 / #21345 / #21385 family #21418 it gets enumerated, and it owes the sentinel pin (SENTINEL-21418-BOUND-VALUEbound into a raw statement and redacted on the operator-facing carrier). The pin goes in the migration's own test file, which is already on the surface.packages/runtime/src/dispatcher-unique-violation-wire-code.test.ts, fromTest Core (3/8). In the runtime: the dispatcher's own catch arms answer the engine's DuplicateRecordError as409 DUPLICATE_RECORD, not the ruled wire spellingUNIQUE_VIOLATION(measured atPOST /api/v1/actions/:object/:action) #23686 pin (POST /security/_activation/position/:name), the racer now gets200where409 UNIQUE_VIOLATIONwas expected. The harness buildssys_metadata_activationthrough SqlDriver schema sync without running the kernel:ready migration, so a package-lesspositionrow has no guard. The edit is admitted only as making the harness build what production builds: call the exportedensureActivationLedgerPackagelessIndexon the same store. ⛔ Not by relaxing the expectation. The dev first measures whether any shipped composition registers the ledger and the activation doors without running that migration. If one does, that is a gap in the guarantee: stop and report.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Landed · #31682 (S1 of #31527) · 2026-11-09T04:48Z
5b7269ff40; head369a466f1e(ACCEPT 6732161679; epic red-line PASS on the package-less item)Fixes #31682State change:
pm:dispatchedremoved in this stroke. Follow-up #31732 (Mongo and MariaDB retire the old 2-part ledger index; p1) is unblocked now and its card thread cuts its branch from thismain. It must land before the first E child that writes a second package's ledger row of the same name.