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.