Repository navigation
Labels
area:packagebugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p1High: required for production / M2
Description
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
Filing gate: ③ follow-up of an accepted delivery. Item 3 of os-warren's handoff on #37130 (7183559260): zone follow-ups with no card yet, after PR #37423 merged (Fixes #37130) and PR #37187 merged. Filed by the seat that took over that handoff (repo:objectstack#6, intake: area:cloud). One card covers the family.
维护者速读
- 是什么:平台自带记录(内置技能/智能体/工具)那一轮收尾后,还剩两处可能写错数据的边角,加上几条措辞小问题。
- 影响:只在「平台撤回自己的记录后,再按包名回滚」或「领养孤儿元数据」时才会碰到,日常使用不受影响。
- 要你做什么:不需要,按队列排期即可。
Behaviour (should-fix candidates)
- Rollback naming a package after the platform withdraws its record (round 4 of 元数据平台标记收尾:已发布读取只按顶层标记、平台自己的记录回滚保留标记 #37130, the other R21 reading). Once the platform has withdrawn its record of a name, a rollback that names a package can write a platform-registered version into that package's row. The restore doors now refuse the platform's own row (fix(metadata-protocol)!: the restore doors refuse the platform's own record, and the history selector refuses a package that neither holds nor ships the name #37423), but this path writes a platform version into a row that is not the platform's. Decide: refuse, or restore only versions the package itself wrote; pin it either way.
adoptOrphansmay rebind the platform's own package-less row (POST /packages/:id/adopt-orphans, clientpackages.adoptOrphans). A package adopting orphans could take over the row the platform registers at boot. It should skip a row that carries the platform mark (the same readingisPlatformRecordRow,protocol-diff-delete-load.ts, uses).
Nits from PR #37423's contract review (7182526807)
- N1 — the refusal's prescription "save that version's body again" (
database-loader.ts, repeated in the 37130 note) does not say the result lasts only until the platform's next registration at boot. - N2 — the
revertCommitdoor pin and the restart pin serve a commit row with nopackage_id, whichrecordPackageCommitnever writes; add a pin onrollbackMetaItem(where a bare rollback reaches the scenario) or a commit that names its package. - N3 — "of a failed batch row write" in
.changeset/37013-platform-skill-own-slot.md(only if that note is still pending; drop otherwise). - N4 — PR-body prose only; nothing to do now that fix(metadata-protocol)!: the restore doors refuse the platform's own record, and the history selector refuses a package that neither holds nor ships the name #37423 merged. Listed so the set is complete.
- N5 —
refusePlatformRecordRestorereads the mark off the row body alone, whileisPlatformRecordRowalso requires an empty package column; on a package-bound row whose body keeps the mark they differ and the refusal would prescribe naming the package the caller already named. Share one reader.
Nits from PR #37187's contract review (7179564385, 7179776919)
- N3 — when both walks lose the same loader,
listPackageBindings'errorsnames it twice andreportLoaderReadFailurefires twice for one read. - N6 —
packages/spec/src/contracts/metadata-service.ts(around line 462) says the primed copy answers "the column it was read with"; after the S1 fix a copy whose row the pass bound answers the column the pass wrote.
Suggested-grade: p2 · items 1 and 2 can write the wrong row; the nits ride the same PR.
Dedupe: refusePlatformRecordRestore, isPlatformRecordRow, adoptOrphans platform found no open card.
Metadata
Metadata
Assignees
Labels
area:packagebugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p1High: required for production / M2
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:package · domain:server · Bug · priority:p1 ·
pm:queue· size M; rationale: follow-ups after #37130. Items 1 and 2 (the rollback-by-package edge and adoptOrphans) can write the wrong row, which means data silently wrong, so p1 (suggested p2). The nits ride along. Area moved from area:cloud to area:package. Note: area:package has no taking seat since the maintainer's 13:18Z order.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
Picked by
card-pick.mjs --order area:cloud --seat repo:objectstack#6at 16:10Z: rank 1, p1 jump (triage 7196122373 moved it to area:package, which has no taking seat). The maintainer in this seat's project, verbatim: 「继续处理 area:cloud p1 p2」 and, on os-warren's work, 「你接手他的任务和pr」; this card is the last item of os-warren's #37130 handoff.Claim: PM loop round 2
Session:
session_01Q4EjjQkY5yXZrN9BEA3rEKAccount:
hotlongBranch:
claude/issue-37604-platform-record-followupsWorktree:
objectstack-issue-37604Domain:
domain:serverSeat:
repo:objectstack#6File surface:
packages/metadata-protocol/src/**(the restore-by-package path,reassignOrphanedMetadata, the shared platform-row reader, with pins),packages/metadata/src/**(refusePlatformRecordRestoreand its message,listPackageBindingserror dedupe), one doc-comment sentence inpackages/spec/src/contracts/metadata-service.ts(N6), one changeset (stop on breach; explain in the report)Container & model:
M,mode:subagent,model: default (dispatch-gates --tier: "no path-derived mandate"),effort: highClause-②: no
Metadata-protocol: none (refusals at the restore and adopt doors over rows the platform owns; no authorable key, value, code or route changes — the dev measures and reports if a door's accept set reads otherwise)
Responsibility: follow-up of #37130 (PR #37423) and PR #37187, per their contract reviews 7182526807 and 7179564385/7179776919
Thread-read: 7196122373
Premise: holds — the dev reproduces items 1 and 2 on main with a failing pin first; an item that does not reproduce is recorded on the card, not fixed
Serial constraints cleared: in flight in
packages/metadata-protocol: draft PR #37584 (protocol-save.ts,protocol-diff-delete-load.ts, repo:objectstack#2) and draft PR #37422 (protocol-diff-delete-load.ts,sys-metadata-repository.tsand others, repo:objectstack#7). This card keeps its edits in those two files minimal (N5's shared reader only), merges main before opening the PR, and leaves any conflict to the merge queue.Scope this dispatch: the whole card — items 1 and 2, nits N1, N2, N3 (only if the note is still pending), N5, #37187's N3 and N6; N4 needs nothing.
Fixes #37604.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
os-dev-report
{ "issue": 37604, "status": "done", "branch": "claude/issue-37604-platform-record-followups", "pr": "https://github.com/objectstack-ai/objectstack/pull/37640", "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK", "premise_still_valid": true, "summary": "Items 1 and 2 both reproduced on main 4e10d4bf with failing pins before any fix. Item 1: after the platform withdraws its record of a skill, a rollback naming the package (or bare, the name's one holder) wrote the platform's version into the package's row, at all three restore doors (service rollback; protocol rollbackMetaItem answered 'Reverted to version 1 (package=com.acme.crm)'; revertCommit of a commit naming its package). Route: the loud refusal, 409 RESOURCE_CONFLICT with refusePlatformRecordRestore's envelope, nothing written, as an optional fourth argument of that one function, judged on the four axes in the PR body. Item 2: reassignOrphanedMetadata rebound the platform's package-less row; it now skips it. N5: isPlatformRecordRow is exported from @objectstack/metadata and is the one reader for the refusal, the overlay census and the adoption. N1 message, N2 pins, #37187 N3 (lost loader named once, not re-read) and N6 (one spec doc sentence) done. N3 dropped: the 37013 note (and the 37130 note N1 mentions) were compiled into the CHANGELOGs by the prerelease version-packages commit 33a31dc7 and moved to .changeset/pre/, so they are no longer pending. Clause-② measured as yes (narrowing), not the claim's no: a new export, an optional argument, and two refusals of writes that happened before. L2 contract review is owed on PR #37640 (the seat runs it); the PR stays draft, not readied, no auto-merge.", "tests": "Red on base 4e10d4bf: protocol door 2 failed (received success: true), adopt 1 failed (expected 'app.base' to be null), service door 2 failed. After the fix and merge of main 33a31dc7: @objectstack/metadata vitest Test Files 83 passed, Tests 2814 passed (tree of 478efd8d); @objectstack/metadata-protocol vitest Test Files 371 passed / 9 skipped, Tests 23446 passed / 45 skipped (478efd8d); the two new protocol pin files at head d96a1a97: 2 files, 12 tests passed. Ablations (fix committed, mutation via scripts/ablation-replace.mjs, metadata rebuilt, dist preflight exit 0, restored to HEAD, restore preflight --absent exit 0, git diff HEAD empty): version refusal off -> database-loader.test.ts 2 failed/498, protocol 3 failed/9; lost-loader skip off -> 1 failed (the #37187 N3 pin); reader column check off -> 2 failed (N5 pins); adopt filter off -> 1 failed/2.", "gates": "Local at the derived list's head (dispatch-gates --commands, tree objectstack-ai/objectstack, 96 families derived): exit 0 for check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check-closing-keyword-parity, check-issue-citations, check:durability-log-level, check:startup-registry-verdict, check:doc-authoring, check:nul-bytes, check:undeclared-dep-imports, check:facade-delegation-only, check:engine-double-contract, check:adr-anchors, check:test-source-alias (first red, fixed by a module-top lint import, then green); metadata + metadata-protocol typecheck exit 0; spec build + check:generated: all 14 artifacts up to date. NOT MEASURED: check:published-readme-exports (exit 3, workspace not built), check:dev-prereqs (exit 1, workspace not built). --ran reconciliation: 81 of 96 derived families unrun locally, a declared narrowing; CI runs them. PR check-runs on d96a1a97 at report time: 56 success (incl. Lint & Repo Gates, TypeScript Type Check, Build Core, Check Changeset, Governed Surface Queue Guard, Dogfood Regression Gate, Test UI, Type Check UI, Build & E2E UI, Live E2E UI, Test Core shards 1-4 and 6-10), 11 skipped, 2 failure: Test Core and Test Core (5/10), one test, packages/cli test/start-deployment-durability.integration.test.ts 'none set: exit 1, naming all three' timed out at 5000ms (import 780s on that runner); the diff touches no cli code; not re-run by this dev.", "dogfood_battery": "d96a1a97 · os-verify-lock: VERDICT command-exit 0 · held the lock 2510s · Test Files 488 passed | 3 skipped (491) · Tests 4135 passed | 68 skipped (4203) · no failures", "mcp_calls": "0", "api_writes": "2 — fleet relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/37640/assignees hotlong, one stroke, read back identical, 10562 bytes); post-stamped issue comment on #37604 (this report). git push is not a REST write.", "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [ "carrier: seat · the two compiled notes in .changeset/pre/ (37013 'of a failed batch row write', 37130 unqualified re-save prescription) now sit in the prerelease CHANGELOGs; a factual fix is a docs-only PR against the CHANGELOG entries", "carrier: none · database-loader.ts still has two body-only readers of the platform mark (the write path's platformRow, the withdrawal's taken), not N5's pair; not measured whether they should ask isPlatformRecordRow", "carrier: seat · deviation: the dispatch asked for a model-named Co-Authored-By trailer; the pre-push hook check:commit-card-trailers refuses it, so commits carry the model-free pair 'Co-authored-by: Claude' per AGENTS.md" ] }