Skip to content

Draft-then-publish callers still publish without the draftVersion pin #36350 added (Studio save bar, design-mode menu, record tabs, extension arrangement, admin detail save, client publishItem) #37440

Todo

Description

@objectstack-fleet

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.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/views/layout/designModeMenuSave.ts (two publish sites)
  • @objectstack/client's meta.publishItem cannot state either pin (draftVersion or parentVersion).

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

Notes

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

  1. added
    bug
    priority:p2
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    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's publishItem still publish without the draftVersion pin 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.

  3. added
    domain:ui
    pm:queue
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    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.

  5. added
    priority:p1
    and removed
    priority:p2
    on Nov 26, 2026
  6. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    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_01L6bhgWAbKPqt7vTgX5qgUn
    Account: os-sales
    Branch: claude/issue-37440-draft-publish-pins
    Worktree: objectstack-issue-37440
    Domain: domain:ui (plus packages/client for meta.publishItem's option bag)
    Seat: repo:objectstack#2
    Intake: 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's views/layout/ path moved to layout/), any further unpinned caller the claim-time grep finds (named in the PR), packages/client/src/index.ts (meta.publishItem option 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: high
    Clause-②: yes (widening: @objectstack/client meta.publishItem accepts draftVersion and parentVersion beside message and packageId)
    Metadata-protocol: none (the publish door's draftVersion pin 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 the draftVersion that write returned, and packages/client/src/index.ts:2729 publishItem sends only message | none: #37387 pinned four other callers (runtime-metadata-persistence.ts:565,654, DraftConflictDialog.tsx:412 partly) | every Studio, design-mode and metadata-admin user whose save can publish a draft someone else wrote in between
    Prior 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 behaviour
    Premise: holds (origin/main 1af67b2: the five sites above call publish(type, name, scope) without draftVersion; git grep draftVersion under ui/packages/app-shell/src/views hits only RuntimeDraftBar.tsx, DraftConflictDialog.tsx, runtime-metadata-persistence.ts; designModeMenuSave.ts pins the published row it composed from and is re-checked by the dev for the draft pin; StudioDesignSurface.tsx:655 publishDraft('flow', …) is re-checked as a possible unlisted caller)
    Pre-claim lane: domain:ui (ui/packages/app-shell/**), packages/client rides as the client half the card names
    Pre-claim deps: none named; #36350 / PR #37387 merged
    Serial constraints cleared: overlap-check runs before the first push; studioSaveBar.tsx sits under seat 5's ux-37424 file 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 conflict

    Plan: 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 its Clause-②: yes declaration owes the seat's TIER_DEFAULT review before landing.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipm:dispatchedpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions