Repository navigation
Description
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Filing gate: ① a product defect with named locations (one card for one family) · Source: fleet. This is follow-up work owed by landed work: PR #37387 (#36350, ruling 7168616260 A1). It was reported by its dev (7179271525) and confirmed by its contract review (7179921339 ③, 7181638537).
What happens
PR #37387 gave the per-item publish door an optional draftVersion pin. A publish that names the draft version it wrote or read is refused 409 METADATA_CONFLICT when that draft moved, so an unreviewed draft is never published on someone else's behalf (ruling 7058616478, #35955). Ruling item 3 scoped that PR to four callers. These other draft-then-publish callers on main still publish unpinned, so the window #36350 closed for "Save to this view" stays open on them:
ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx(two publish sites)ui/packages/app-shell/src/views/metadata-admin/DraftConflictDialog.tsxui/packages/app-shell/src/views/metadata-admin/detailSaveAtOnce.tsui/packages/app-shell/src/views/recordTabsConfigSave.tsui/packages/app-shell/src/views/objectExtensionArrangementSave.tsui/packages/app-shell/src/views/layout/designModeMenuSave.ts(two publish sites)@objectstack/client'smeta.publishItemcannot state either pin (draftVersionorparentVersion).
Line positions are as the dev read them at #37387's head. Re-check on claim: git grep -n "publishDraft\|\.publish(" ui/packages/app-shell/src/views against git grep -n "draftVersion" ui/packages/app-shell/src/views.
reach: read from code per caller. Not reproduced per caller. The door-level harm was measured on #36350: an interleaved draft write between a draft write and its unpinned publish went live (report 7164597391, M1). Each caller here is a draft write followed by an unpinned publish of the same address, so the measured mechanism applies. The claimer reproduces one caller before code.
Expected
Each caller passes the version of the draft it wrote (its own draft receipt) or showed. It never re-reads blindly, because a re-read would pin someone else's draft. @objectstack/client's publishItem accepts draftVersion (and parentVersion) beside message. The pattern is #37387's "Save to this view" and draft bar.
Done when
- Every caller listed above (re-checked on claim) pins, with one pin per caller in that caller's existing harness: an interleaved draft write is refused and nothing unreviewed is published. A CONTROL shows the uninterleaved publish still promotes.
- Callers found on claim that feat(rest,metadata-protocol,spec): the per-item publish takes a draft-version pin, so Save to this view never publishes a moved draft #37387 did not list are added or named as out of scope with a reason.
Notes
- Also from feat(rest,metadata-protocol,spec): the per-item publish takes a draft-version pin, so Save to this view never publishes a moved draft #37387's review, outside this card's mechanism but on the same files: nit N6. After a refused Save resolved by "reload" in
DraftConflictDialog, the runtime draft bar keeps the old token, so its Publish fails closed until the panel is reopened. It can ride this card whenDraftConflictDialog.tsxis touched. - Grading suggestion: p2, the same harm as Publish of a view draft takes a draft-version precondition, so an unpinned draft write cannot be published by Save to this view (after #36137) #36350 on narrower paths; triage confirms.
Dedupe: open and closed issues for draftVersion publish callers (1: #36350), studioSaveBar publish unpinned draft (2: #36726 closed, #36350), draft-then-publish pin (112, top hits #36963 open, #36726, #36350, #36137). #36963 (Studio create doors for a new object, permission set and app) is the same family on create doors, not these save callers. No open card covers these callers.
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: lands in area:ux · domain:ui · Bug · priority:p2 ·
pm:queue· size M; rationale: the six console draft-then-publish callers and@objectstack/client'spublishItemstill publish without thedraftVersionpin that #36350 added, so another person's unreviewed draft can still be published from those paths. That is the same harm as #36350 on narrower paths, so the filed p2 stays.Reader: zone o5-U (repo:objectstack#5), since seat 6 has clocked out. The client change touches
packages/client, which the claim names as part of the file surface.objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ux · domain:ui · Bug · priority:p1 ·
pm:queue· size M; rationale: the Studio save bar and four other draft-then-publish callers still publish without the draftVersion pin, so a person can publish someone else's unreviewed draft without knowing. A silent lost update on a common path is p1.Regraded p2 → p1 on the maintainer's go in the triage session (「升级吧」), after a review of every open p2 card.
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgWAbKPqt7vTgX5qgUn
Claim: area s2-ux round 1 · 2026-11-26T12:46Z
Area: s2-ux (zone ux-S)
Session:
session_01L6bhgWAbKPqt7vTgX5qgUnAccount:
os-salesBranch:
claude/issue-37440-draft-publish-pinsWorktree:
objectstack-issue-37440Domain:
domain:ui(pluspackages/clientformeta.publishItem's option bag)Seat:
repo:objectstack#2Intake: the maintainer (Sales), 2026-11-26T12:40Z, verbatim: 「你换接 ux 区 p1 p2,5号座位 只处理在手任务」. The triage reader line named zone o5-U; seat 5 now finishes only its cards in hand, so this card comes to seat 2.
File surface:
ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx,ui/packages/app-shell/src/views/metadata-admin/DraftConflictDialog.tsx,ui/packages/app-shell/src/views/metadata-admin/detailSaveAtOnce.ts,ui/packages/app-shell/src/views/recordTabsConfigSave.ts,ui/packages/app-shell/src/views/objectExtensionArrangementSave.ts,ui/packages/app-shell/src/layout/designModeMenuSave.ts(the card'sviews/layout/path moved tolayout/), any further unpinned caller the claim-time grep finds (named in the PR),packages/client/src/index.ts(meta.publishItemoption bag) with its tests, new test files named for this card, one.changeset/37440-*.md(stop on breach; explain in the report)Container & model:
M,mode:subagent,model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate),effort: highClause-②: yes (widening:
@objectstack/clientmeta.publishItemacceptsdraftVersionandparentVersionbesidemessageandpackageId)Metadata-protocol: none (the publish door's
draftVersionpin is already on main from PR #37387; this card only makes callers send it)Responsibility:
ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx:324,399,metadata-admin/detailSaveAtOnce.ts:78,recordTabsConfigSave.ts:166,objectExtensionArrangementSave.ts:161(objectstack-ai/objectstack) publish after their own draft write without thedraftVersionthat write returned, andpackages/client/src/index.ts:2729publishItemsends onlymessage| none: #37387 pinned four other callers (runtime-metadata-persistence.ts:565,654,DraftConflictDialog.tsx:412partly) | every Studio, design-mode and metadata-admin user whose save can publish a draft someone else wrote in betweenPrior rulings read: #36350 ruling 7168616260 (A1, the pin and its four callers), ruling 7058616478 on #35955 (never publish an unreviewed draft on someone else's behalf); no ADR in
docs/adr/**names these callers; this card follows them and changes no ruled behaviourPremise: holds (origin/main 1af67b2: the five sites above call
publish(type, name, scope)withoutdraftVersion;git grep draftVersionunderui/packages/app-shell/src/viewshits onlyRuntimeDraftBar.tsx,DraftConflictDialog.tsx,runtime-metadata-persistence.ts;designModeMenuSave.tspins the published row it composed from and is re-checked by the dev for the draft pin;StudioDesignSurface.tsx:655publishDraft('flow', …)is re-checked as a possible unlisted caller)Pre-claim lane:
domain:ui(ui/packages/app-shell/**),packages/clientrides as the client half the card namesPre-claim deps: none named; #36350 / PR #37387 merged
Serial constraints cleared: overlap-check runs before the first push;
studioSaveBar.tsxsits under seat 5'sux-37424file roots (views/studio-design/**), so the dev reads open PRs on that path (seat 5's in-hand #37454 / #37520) before pushing and queues behind any textual conflictPlan: the dev reproduces one caller (interleaved draft write, then the unpinned publish goes live) before code, then pins every caller to its own draft receipt, one pin plus a CONTROL per caller in that caller's existing harness. Nit N6 (DraftConflictDialog reload keeps the old token) rides when that file is touched. The PR carries
Fixes #37440, and itsClause-②: yesdeclaration owes the seat's TIER_DEFAULT review before landing.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgWAbKPqt7vTgX5qgUn
os-dev-report
{ "issue": 37440, "status": "blocked", "branch": "claude/issue-37440-draft-publish-pins", "pr": null, "session": "session_01L6bhgWAbKPqt7vTgX5qgUn", "premise_still_valid": true, "summary": "Blocked by the dispatch's serial clause: node scripts/pm/overlap-check.mjs exited 1 (VERDICT overlap exit 1) against open, non-draft PR #37589 (perf slice C of #37444, head 688b77ff98). It moves the pure half of DraftConflictDialog.tsx into a new draftVersionGuard.ts and repoints the imports in designModeHeaderPinsSave.ts, designModeMenuSave.ts, detailSaveAtOnce.ts, objectExtensionArrangementSave.ts and recordTabsConfigSave.ts, so it conflicts in 6 of my files. My guard change (rule 10) lives in exactly the code that moves. So I did not push and did not open the PR. The work itself is complete and green locally at 08d6fec300. The remote branch is at ee397fd2ed. The 3 unpushed commits (44fb60d034 door-double typed face, 2bf66752bb changeset, 08d6fec300 exact-arg assertion updates; 7 files) sit in the local branch ref and in a backup bundle, /tmp/claude-0/-home-user/7926235e-0bd9-5115-975e-3eceaeb33e9c/scratchpad/issue-37440/issue-37440-unpushed.bundle. The worktree /home/user/objectstack-issue-37440 is kept for the resume. What I implemented: client.meta.publishItem takes draftVersion (body) and parentVersion (If-Match, or If-None-Match: * for null). DraftVersionGuard.publish forwards draftVersion. A 409 under both pins is classified with one getDraft read: draft moved means throw (isPublishDraftMoved), with nothing asked and nothing discarded. Every draft-then-publish caller on the claim's surface pins to its own save receipt: studioSaveBar publishSavedItem plus the DataPillar, AutomationsPillar, objectHooksBuffer, pairObjectActions, PermissionMatrixEditor, newAppDoor and MetadataListCreateDialog forwarders; detailSaveAtOnce via ResourceEditPage; recordTabsConfigSave; objectExtensionArrangementSave; designModeHeaderPinsSave; designModeMenuSave for the menu and the translation. Each take-back discard is pinned If-Match to the same receipt, so a refused Save never deletes another writer's draft. Not blocked, and can land as soon as the seat says go: (A) wait for #37589 to land, merge origin/main into the branch, re-home the guard edit into draftVersionGuard.ts, re-run the pins and the overlap check, then push and open the PR (about 30 min). (B) The seat clears the push now and whichever PR lands second resolves the move (mechanical, but the larger rebase falls on #37589's lane).", "tests": "All at local head 08d6fec300 unless noted, under bash scripts/pm/os-verify-lock.sh (slot issue-37440). Client: pnpm --filter @objectstack/client exec vitest run --maxWorkers=2 src/meta-publish-item-package.test.ts gave Test Files 1 passed (1), Tests 15 passed (15), VERDICT command-exit 0. It includes a real-door REPRODUCTION (the unpinned publish promotes the interleaved draft 'theirs'), a PIN (409 METADATA_CONFLICT, rows active:live and draft:theirs), a CONTROL, wire tests (body draftVersion, If-Match, If-None-Match: * for null, none when unset) and parentVersion stale/null refusals. UI pins (7 files: studioSaveBar.draftPin-37440, detailSaveAtOnce-37440, recordTabsConfigSave-36499, objectExtensionArrangementSave-36499, designModeHeaderPinsSave-36366, designModeMenuSave-36538, DraftConflictDialog.test) gave Test Files 7 passed (7), Tests 94 passed (94), VERDICT command-exit 0. Affected app-shell set (331 files that import the changed modules): pnpm --dir ui exec vitest run --maxWorkers=3 FILES gave Test Files 331 passed (331), Tests 2551 passed (2551), VERDICT command-exit 0, lock held 830s. Typecheck of app-shell: VERDICT command-exit 0 at 44fb60d034; the first run was exit 2 on the TS2345 errors in the new tests, fixed by the typed door face. The later commit touches only test assertions. Ablations via scripts/ablation-replace.mjs, one per pin; every PIN goes red with its CONTROL green: client 2 failed / 13 passed; saveBar 2 failed / 3 passed; guard pin 2 failed / 37 passed; guard classify, detail, recordTabs, extension, headerPins, menu and translation each red on their PIN only. After every restore, git diff HEAD was empty. Full app-shell suite: NOT MEASURED, reason: over 70 min on the shared box; I killed my own pid 9833 after 3 seen failures, all fixed and covered by the affected run above.", "gates": "Derived via node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (about 80 families, logs in the scratchpad gatelogs/). Every family exited 0 except these: pnpm --dir ui exec vitest run scripts/ gave exit 99 queue-timeout, NOT MEASURED (another holder had the lock). check:type-check-debt gave exit 99 lock timeout, NOT MEASURED. check:skill-examples gave exit 3, PREREQUISITE (client-react dist not built), NOT MEASURED. check:dual-build-cjs-loads gave exit 3, PREREQUISITE (missing dist), NOT MEASURED. The overlap check exited 1 against #37589, and that is the block. The derivation ran before the last 2 commits (changeset and test-only), so the --ran reconciliation is not re-run at the final head: NOT MEASURED. There are no PR check-runs because no PR exists.", "dogfood_battery": "n/a: no ! in the planned title and the Clause-2 arm is widening, not narrowing", "mcp_calls": "0", "api_writes": "1: POST repos/objectstack-ai/objectstack/issues/37440/comments (this os-dev-report, via scripts/pm/post-stamped.mjs). git push x2 (ec15ecf01b, then ee397fd2ed) are not REST writes. No pr_create.", "open_questions": [ { "question": "How should #37440 sequence against #37589, which moves DraftConflictDialog's guard into draftVersionGuard.ts?", "options": [ "A: #37589 lands first; I merge main, re-home rule 10 and the draftStillAt classification into draftVersionGuard.ts, re-verify, push and open the PR", "B: the seat clears a push now; the second PR to land resolves the move" ], "recommendation": "A, because #37589 is ready and a pure move, and re-homing about 40 guard lines onto it is mechanical. B makes a perf PR absorb a behaviour change." }, { "question": "The PR body footer differs between the agent definition (the session-URL Generated-by footer) and the dispatch (the robot Generated-with line plus the session URL). Which one applies?", "options": [ "A: the dispatch's lines, verbatim", "B: the agent definition's footer" ], "recommendation": "A, because the dispatch states them exactly and the harness attribution reminder agrees." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed. StudioDesignSurface publishDraft('flow') at about line 655 was re-checked: it is a publish-all-drafts door with no draft write of its own, so it has no receipt to pin. The same holds for usePublishAllDrafts and PackagesPage publishDrafts.", "carrier: #37554 · PackageOwdOverviewPanel.tsx draft-then-publish is deferred: overlap-check exit 1 against #37554 on that file, so it was reverted to BASE. It should pin once #37554 lands.", "carrier: none · runtime-metadata-persistence boundToPackage is already pinned; no change.", "carrier: none · nit N6 does not ride. Its fix site is ViewConfigPanel/RuntimeDraftBar, which is outside the claimed surface." ], "deviations": [ "The first push (ec15ecf01b, client only) went out before overlap-check. The overlap-check run right after it was clean.", "The auto-mode classifier denied one push-plus-typecheck command because it was not preceded by overlap-check. overlap-check then found #37554 on PackageOwdOverviewPanel.tsx; I reverted that file and pushed only after a clean check." ] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgWAbKPqt7vTgX5qgUn
os-dev-report
{ "issue": 37440, "status": "done", "branch": "claude/issue-37440-draft-publish-pins", "pr": "https://github.com/objectstack-ai/objectstack/pull/37637", "head_sha": "046abbb2e0", "session": "session_01L6bhgWAbKPqt7vTgX5qgUn", "premise_still_valid": true, "summary": "Draft PR #37637 (head 046abbb2e0). client.meta.publishItem now takes draftVersion (sent in the body) and parentVersion (sent as If-Match, or If-None-Match: * for null); with neither set, the request is byte-identical to before. Every draft-then-publish Save pins its publish to its own draft receipt and pins its take-back If-Match to that same receipt: the Studio top bar (via publishSavedItem and its forwarders), the item page (detailSaveAtOnce), each row of the OWD sharing-defaults table (added this round now that #37554 has landed), record tabs, the extension arrangement, the design-mode header pins, and the menu and its labels. A moved draft is kept, never published or discarded. Round 2 merged origin/main (including #37589) in merge commit 6f1e7359b3, with no rebase and no force. The guard change (rule 10, draftStillAt, isPublishDraftMoved, draftReceiptVersion) now lives in draftVersionGuard.ts; DraftConflictDialog.tsx re-exports those names and keeps the header rule and the hook's stable heldDraftVersion. The #37444 first-screen import walk stays green.", "tests": "All under os-verify-lock, at head 046abbb2e0 (the affected set at 8192a7387f; the only later commit is the changeset). Client: meta-publish-item-package.test.ts, Test Files 1 passed (1), Tests 15 passed (15), VERDICT command-exit 0. This covers the real-door reproduction, PIN, CONTROL, the wire shape, and parentVersion stale or null. UI pins, 9 files (studioSaveBar.draftPin-37440, detailSaveAtOnce-37440, recordTabsConfigSave-36499, objectExtensionArrangementSave-36499, designModeHeaderPinsSave-36366, designModeMenuSave-36538, DraftConflictDialog.test, PackageOwdOverviewPanel.draftPinned-37515 with its new PIN and CONTROL, and firstScreenStudioCatalogue-37444): Test Files 9 passed (9), Tests 112 passed (112), VERDICT command-exit 0. Affected app-shell set, 346 files: Test Files 346 passed (346), Tests 2658 passed (2658), VERDICT command-exit 0, lock held 859s. pnpm --filter @object-ui/app-shell type-check: VERDICT command-exit 0. Ablations via scripts/ablation-replace.mjs, re-run after the merge; every PIN goes red with its CONTROL green: client 2F/13P, saveBar 2F/3P, detail 2F/1P, recordTabs 1F/6P, extension 1F/7P, headerPins 1F/14P, menu 1F/16P, translation 1F/16P, OWD 1F/11P, guardPin (draftVersionGuard.ts) 2F/37P, guardClassify 1F/38P. git diff HEAD was empty after every restore. Full app-shell suite: NOT MEASURED locally (over 70 min on the shared box); it is CI's.", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families, all re-run at 046abbb2e0. 73 exited 0, including vitest scripts/, check:type-check-debt and check:skill-examples, each after building its prerequisite dist. check:dual-build-cjs-loads exited 3, PREREQUISITE NOT MET (not every package has a dist here): NOT MEASURED locally, CI's. --ran reconciliation: 74 derived, 74 run, 0 UNRUN. check-nul-bytes: OK. overlap-check: VERDICT clean exit 0 (origin/main 54d6726c09, 0 open PR heads), run before the push. PR check-runs at report time: 18 in_progress, 5 skipped; none concluded yet.", "dogfood_battery": "n/a: no ! in the title, and the Clause-2 arm is widening, not narrowing", "mcp_calls": "0", "api_writes": "4. POST issues/37440/comments ×2 (the round-1 report 7195557089 and this one, via post-stamped). The relay pr_create: POST /pulls (draft forced) and POST issues/37637/assignees [os-sales]. Read-back: 11736 bytes sent, 11736 stored; assignees os-sales; no labels. git push is not a REST write.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed. StudioDesignSurface publishDraft('flow') (about line 655), usePublishAllDrafts and PackagesPage publishDrafts are publish-all doors with no draft write of their own, so there is no receipt to pin.", "carrier: none · runtime-metadata-persistence boundToPackage is already pinned.", "carrier: none · nit N6 does not ride. Its fix site is ViewConfigPanel/RuntimeDraftBar, outside the surface. It is named in the PR's Acceptance notes." ], "deviations": [ "Round 1: the first push (ec15ecf01b) went out before overlap-check, and the check run right after it was clean. The auto-mode classifier denied one push-plus-typecheck command; overlap-check then found #37554, and I reverted that file before pushing.", "Footer: per the seat's ruling (option A), the PR body uses the dispatch's lines verbatim, with the robot Generated-with line plus the session URL at the end." ] }Generated by Claude Code