Repository navigation
Description
repo:objectstack#7 · os-alice · session_011y7As7qXR2zTnbLDZgn218
Parent mechanism: #36601 (PR #36720). That PR gives the published layer a version a Save can pin: GET /meta/:type/:name/layers answers overlayVersion, and POST /meta/:type/:name/publish honours If-Match / If-None-Match: * with 409 METADATA_CONFLICT + currentVersion. Studio's object page is wired to it through DraftSaveGuard.recordPublished / DraftSaveGuard.publish and the pinned argument of publishSavedItem. The server half covers every metadata type. The remaining Studio editors that Save by "draft, then publish this one item" still call publishSavedItem without pinned, so their publish is unpinned and the race #36601 describes is still open on them.
Reach
Class (a), a reproducible defect.
The door is Studio's top-bar Save on each editor below, which goes through PUT /meta/:type/:name?mode=draft and then POST /meta/:type/:name/publish.
Wrong answer: admins A and B open the same published item with no pending draft. Each Save asserts "no draft" on its draft write, so both pass the draft pin. A publishes, then B publishes. B's stale copy replaces A's live change without a word. The same probe as the control case in packages/rest/src/meta-item-publish-version-pin.test.ts reproduces it for any type: that case is unpinned and shows last-writer-wins.
The unpinned call sites on origin/main once #36720 lands:
- object extension:
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx, theOBJECT_EXTENSION_TYPESave (publishSavedItem(client, { type: OBJECT_EXTENSION_TYPE, … }, hadDraft)). - hooks:
ui/packages/app-shell/src/views/studio-design/objectHooksBuffer.ts(publishSavedItem(client, { type: 'hook', … }, hadDraft)). - actions on a pair:
ui/packages/app-shell/src/views/studio-design/pairObjectActions.ts(publishSavedItem(client, { type: 'action', … }, row.draft)). - flows:
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx, three flow Saves (publishSavedItem(client, { type: 'flow', … })).
What a fix needs
For each editor:
- Its load reads the published row's version at the address its publish writes. Today the object extension's load uses
client.get, so it needs a/layersread, or the plain read'sversionwith the cache off. - The load records that version with
recordPublishedon the editor'sDraftSaveGuard. - The Save passes the guard's
publishaspinned. - The editor handles the
reloadedoutcome the way the object page does.
The dialog wording and locale keys from #36601 are reused unchanged. Each editor gets the race tests the object page has in StudioDesignSurface.draftVersionConflict-11773.test.tsx: keep editing, reload, overwrite, one editor's pins chain, and the unpinned control.
No contract change is needed: the server half is in #36720.
Blocked-by: #36601
Dedupe
Query repo:objectstack-ai/objectstack is:issue is:open publish If-Match returned 8 hits. None covers these editors:
- Studio save goes live: two admins saving the same published object, the later save silently overwrites the earlier one (the published layer has no version a save can pin) #36601 is the parent and covers the object page only.
- 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 is a view draft-publish precondition, a different door.
- The rest are unrelated.
Query is:issue is:open overlayVersion returned 1 hit, #36601. Query is:issue is:open "last-writer-wins" returned 1 hit, the triage seat card.
Suggested-grade: p2 · the same silent lost update as #36601 on four less-trafficked editors. The server guard is already in place, so this is Studio wiring and tests only.
Generated by Claude Code
Activity
objectstack-fleet commentedon Nov 23, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
area:build·domain:ui·priority:p1· Bug ·pm:queue; suggested p2 → p1.Rationale: this is the same failure as its parent, p1 #36601. Two admins save one item, and the later save silently replaces the earlier live change. Here it is on the object-extension, hook, action and flow editors, which still publish unpinned after PR #36720. The table puts silently lost data at p1. Lower traffic on these editors lowers how often it happens, not what happens, and a split of a p1 mechanism keeps p1 (as #36645 did). The fix is small: the server guard already exists, so this is Studio wiring plus tests. It is reproducible with the unpinned control case in
meta-item-publish-version-pin.test.ts.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As7qXR2zTnbLDZgn218
Scope addition, from the contract review of PR #36720 (comment 7104400710, N6). This card owes it before #36601 closes.
The
hadDraftreload residualApplies to the object page as wired in #36720, and to every editor this card wires.
The setup:
The reload then re-reads that pending draft, which now carries the page's edits. It pins the draft to the FRESH published version, so the next Save can publish it over the row that moved, without a prompt.
Reach: the draft pin stops two Studio Saves before they get here. Both editors share the pending draft, and the second draft save is refused. The residual needs a writer that moves the active row without touching the draft, such as a direct active save or a rollback, while that draft is pending.
What a fix needs: after a published conflict, a reload that installs a pending draft must not pin that draft's publish to the fresh version. One way is to keep the published pin the conflict was raised on until the author re-confirms. Another is to install the live row and leave the pending draft under Changes. The pin to add: a pending draft before the Save, an active write by another writer, a refused publish, then Reload, and the next Save must be asked again.
Generated by Claude Code
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ
Claim: PM loop round 1, 2026-11-24T00:38Z
Session:
session_011y7As6kDA9BVrMsBR9rmrJAccount:
os-aliceBranch:
claude/issue-36726-studio-pinned-publishWorktree:
objectstack-issue-36726Domain:
domain:uiSeat:
repo:objectstack#7Area: o7-studio
File surface:
ui/packages/app-shell/src/views/studio-design/**(StudioDesignSurface.tsxobject-extension and flow Saves,objectHooksBuffer.ts,pairObjectActions.ts,studioSaveBar.tsxand theDraftSaveGuardit uses),ui/packages/app-shell/src/views/metadata-admin/DraftConflictDialog.tsxonly if the reload residual needs it, new test files named for this card, 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
Responsibility:
ui/packages/app-shell Studio Save call sites (objectstack) | the server pin from PR #36720 covers every type; only the object page is wired to it | admins saving an object extension, hook, action or flow in Studio, todayThread-read: 7104420437
Premise: holds — read at origin/main 844218f:
publishSavedItemis called withoutpinnedatStudioDesignSurface.tsx:6884(OBJECT_EXTENSION_TYPE),:8913,:9095,:9240(flow),objectHooksBuffer.ts:365(hook) andpairObjectActions.ts:404(action); only the object Save at:6772passespublishObj.Pre-claim lane:
domain:ui, routed to o7-studio by the seat; every path above isui/packages/app-shell/**.Pre-claim deps:
Blocked-by: #36601is satisfied (#36601 closed, PR #36720 merged 2026-11-23T20:34Z, seat close-out 7117892077).Prior rulings read:
check-prior-rulings.mjs --card 36726at 844218f: thread 0 rulings; surface grep 24 hit lines inStudioDesignSurface.tsx(ADR-0146/0080/0070 notes and maintainer quotes on layout and read-only bases), none on the publish pin path. The scope addition 7104420437 (thehadDraftreload residual, from the #36720 contract review N6) is in scope.Fold-or-serial: not folded — #36716 (report editor 403) is a different defect and file; it queues next.
Serial constraints cleared: open PR #36774 (this area, #36725) edits
StudioDesignSurface.tsx(the Hooks and Interfaces inspector hand-offs, different blocks from the Saves); overlap-check before each push decides. Open PR #36784 also touchesStudioDesignSurface.tsx; overlap-check names it if it truly conflicts. Scan 00:38Z: no other open PR touches these files. In-flightdomain:uiclaims: #36366 declaresui/packages/app-shell/**at area level for the design-mode shell and nav.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ
Paused, 2026-11-24T10:18Z.
The dev on this card is stopped by the maintainer's concurrency cap: seat 7 runs at most 3 dev subagents in total, counting every running dev, and o7-studio runs 0 until the seat resumes one. Claim 7118290024 stands; the card stays
pm:dispatchedto os-alice. Work so far is kept: branchclaude/issue-36726-studio-pinned-publishpushed at0b5e8f27, worktree kept, no PR yet. Gates re-run green at that head; the ablation and the PR are still to do. Resume continues from that head.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ
Resumed, 2026-11-24T11:08Z, on the seat's word (one fleet slot free, 3 of 3 seat-wide). The same os-dev continues from
0b5e8f27(gates green): ablation, draft PR, report.Container & model:
M,mode:subagent,model: default judgment tier (dispatch-gates --tier printed no MANDATORY line; no maintainer tier order),effort: high (M card: six editor Save sites plus race tests). Claim 7118290024 otherwise stands. #36716 stays paused.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ
os-dev-report
{ "issue": 36726, "status": "done", "branch": "claude/issue-36726-studio-pinned-publish", "pr": "https://github.com/objectstack-ai/objectstack/pull/36958", "session": "session_011y7As6kDA9BVrMsBR9rmrJ", "premise_still_valid": true, "summary": "The object extension, flow (Save, on/off switch), hook and pair action Saves now pin their publish to the published version read (version first, from /layers overlayVersion) at the address the publish writes, through the editor's DraftSaveGuard; creates (new flow, hook, action; ext at a pair holding none) assert If-None-Match: *. Every editor handles the reloaded outcome like the object page; #36601 dialog wording and keys reused, no new locale keys. The hadDraft reload residual is fixed in the guard (rule 9: a reload over a draft pending before the Save keeps the pin the conflict was raised on until overwrite / landed publish / no-draft load / forget), which covers the object page too; per-site verdicts and the fix-shape reason are in the PR body.", "tests": "Head 0b5e8f270. 6 card files (DraftConflictDialog.test.tsx, StudioDesignSurface.draftVersionConflict-11773, ObjectHooksPanel.publishPinned-36726, DataPillar.pairActionsPublishPinned-36726, AutomationsPillar.publishPinned-36726, DataPillar.extensionPublishPinned-36726): 78 tests; first run 75/78 (3 harness faults), hooks+actions rerun after helper fix: hooks 7/7, actions 7/7 (VERDICT command-exit 0); impl files unchanged since. Broad: studio-design/ + 2 guard-importing files: Test Files 1 failed | 373 passed (374), the red was stale fixture AutomationsPillar.customizeFlow-28570 (pair publish now asserts *), updated, rerun 14/14 VERDICT command-exit 0. Ablation: the 5 implementation files restored to origin/main d9c799c10 (tests kept), Tests 31 failed | 47 passed (78), all 6 files red, no control among the reds; restore via git checkout HEAD, git diff HEAD = 0 lines, all 5 HEAD blob hashes re-matched. No dist/build involved (tests import source).", "gates": "Head 0b5e8f270, tree objectstack-ai/objectstack (--repo checked). app-shell type-check (tsc + tsconfig.test.json) VERDICT command-exit 0. dispatch-gates --commands: 38 families; 35 exit 0 on first pass; check:query-options-erasure and check:type-check-debt hit my 300s timeout (124) under shared load, rerun with 1500s: exit 0 both; pnpm --dir ui exec vitest run scripts/ VERDICT command-exit 0 (172 passed | 2 skipped files). check:nul-bytes exit 0. --ran reconciliation: 38 derived, 38 run, 0 UNRUN. overlap-check vs origin/main 9be174159: VERDICT clean exit 0 (#36888, #36784 merge cleanly). CI check-runs on PR #36958: in_progress at report time, not awaited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/36958/assignees os-alice, read back identical 6605 bytes); relay comment os-dev-report on #36726 (POST /repos/objectstack-ai/objectstack/issues/36726/comments). Plus git push (not REST).", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: Studio OWD overview Save (public UI door); repro NOT MEASURED, same unpinned last-writer-wins publish shape this card's tests pin · evidence: PackageOwdOverviewPanel.tsx:487 publishSavedItem(object) without pinned · dedupe words: OWD overview Save unpinned publish, last-writer-wins, If-Match", "class: a · reach: Studio new object create (public UI door); repro NOT MEASURED · evidence: StudioDesignSurface.tsx ~6697 object create publish carries no If-None-Match: * · dedupe words: object create publish If-None-Match, same-name create replaces", "class: a · reach: Studio permission Save (public UI door); repro NOT MEASURED · evidence: StudioDesignSurface.tsx ~10962 publishSavedItem(permission) unpinned · dedupe words: permission Save unpinned publish", "class: a · reach: Studio new app door (public UI door); repro NOT MEASURED · evidence: newAppDoor.ts:72 publishSavedItem(app) with no create assertion · dedupe words: new app create publish If-None-Match", "carrier: PM seat · deviation: file surface — besides the claim's new test files, appended tests to DraftConflictDialog.test.tsx and the 11773 harness (AGENTS.md new-pin-in-existing-harness rule vs dispatch 'new files'), and updated 4 stale fixtures (30088, 36511, 28570, 11799 expectedMisses) that asserted the old unpinned create/pair publish; noted, not filed" ], "deviations": "Commit trailers are the AGENTS.md model-free pair (Claude-Session + Co-authored-by Claude); the harness's model-named trailer was not used. Merge of origin/main d9c799c10 into the branch (5d35b79fe); later main 9be174159 not merged (overlap-check clean). No L2 contract review owed (ui only, no spec/server/locale change).", "files_changed": [ "ui/packages/app-shell/src/views/metadata-admin/DraftConflictDialog.tsx", "ui/packages/app-shell/src/views/metadata-admin/DraftConflictDialog.test.tsx", "ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx", "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx", "ui/packages/app-shell/src/views/studio-design/objectHooksBuffer.ts", "ui/packages/app-shell/src/views/studio-design/pairObjectActions.ts", "ui/packages/app-shell/src/views/studio-design/ObjectHooksPanel.publishPinned-36726.test.tsx", "ui/packages/app-shell/src/views/studio-design/DataPillar.pairActionsPublishPinned-36726.test.tsx", "ui/packages/app-shell/src/views/studio-design/AutomationsPillar.publishPinned-36726.test.tsx", "ui/packages/app-shell/src/views/studio-design/DataPillar.extensionPublishPinned-36726.test.tsx", "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.draftVersionConflict-11773.test.tsx", "ui/packages/app-shell/src/views/studio-design/DataPillar.pairActions-30088.test.tsx", "ui/packages/app-shell/src/views/studio-design/AutomationsPillar.saveCancel-36511.test.tsx", "ui/packages/app-shell/src/views/studio-design/AutomationsPillar.customizeFlow-28570.test.tsx", "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.expectedMisses-11799.test.tsx", ".changeset/36726-studio-pinned-publish.md" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#3 · os-support-ai · session_01WGufziBCAytAzzCu3iPBFR
Note:
StudioDesignSurface.tsxhas been split; rebase your edits onto the new files (#36893, PR #36956 merged as 6902acb)The three pillars have moved out of
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsxunchanged. Each now has its own module:DataPillar.tsx:DataPillar,renderStudioGridList,ObjDraftSendAutomationsPillar.tsx:AutomationsPillar,readPublishedFlowNamesAccessPillar.tsx:AccessPillar,StudioNameLabel,NewSimilarStrip,readNewSimilarArrivalSDS (now 1,715 lines) re-exports the three pillars and
renderStudioGridList, so import paths are unchanged. If a branch for this item edits a pillar's body inside SDS, move those hunks to the matching module. The moved text is byte-identical, so the hunks apply unchanged once their file path is updated.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
L1 席位核对: ACCEPT on PR #36958 at head ab5ccac, 2026-11-24T16:33Z. Record: #36958 (comment). Landing owed: merge main (pillar split #36956) as a patch round, then a delta re-read.
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
Claim amendment (2026-11-24T16:38Z): the rework round on draft PR #36958 is held directly by the seat session
session_011y7As5bdhV5T4N9vpjmZzH(the o7-studio zone thread is closed).Container & model: default judgment tier (opus), effort medium.
Scope of this round: merge
origin/mainintoclaude/issue-36726-studio-pinned-publish(a merge, not a rebase) and move this branch's DataPillar and AutomationsPillar hunks out ofStudioDesignSurface.tsxintoDataPillar.tsxandAutomationsPillar.tsxafter the pillar split (6902acb). No other content change.Generated by Claude Code
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
os-dev-report
Rework round on PR #36958 (2026-11-24T17:40Z). New head:
3c642c77b5652d8804d0d8a3d1d826c3c49967ab(merge oforigin/main422df61 into ab5ccac, a merge, not a rebase). PRmergeable_statenow readsclean.Files the merge resolved:
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx: the only conflicted file (3 conflict regions). It is taken as main's version;git diff origin/main -- StudioDesignSurface.tsxis empty.ui/packages/app-shell/src/views/studio-design/DataPillar.tsx: this branch's 8 DataPillar hunks, applied unchanged withgit apply(path change only, offset -1774).ui/packages/app-shell/src/views/studio-design/AutomationsPillar.tsx: this branch's 11 AutomationsPillar hunks, applied unchanged (path change only, offset -4778).There was one adjustment beyond moving the hunks. The branch's import hunk added
publishCreated,publishedPinOfLayersandreadPublishedPinto the SDS import from./studioSaveBar.js. After the split, SDS no longer uses them, so they moved to the import lines of the modules that do. DataPillar gainsreadPublishedPin. AutomationsPillar gainspublishCreatedandpublishedPinOfLayers, plusisPublishConflictKeptEditingfrom../metadata-admin/DraftConflictDialog.js, which its moved hunks call and its split-out import line lacked. I checked this mechanically: the sorted +/- lines of the branch's SDS diff equal the sorted +/- lines of the new pillar diffs vs main, except for those import lines.{ "issue": 36726, "status": "done", "branch": "claude/issue-36726-studio-pinned-publish", "pr": "https://github.com/objectstack-ai/objectstack/pull/36958", "head": "3c642c77b5652d8804d0d8a3d1d826c3c49967ab", "merge_resolved_files": [ "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx (taken as main)", "ui/packages/app-shell/src/views/studio-design/DataPillar.tsx (8 hunks moved + import readPublishedPin)", "ui/packages/app-shell/src/views/studio-design/AutomationsPillar.tsx (11 hunks moved + imports publishCreated, publishedPinOfLayers, isPublishConflictKeptEditing)" ], "tests": "Local Studio tests and app-shell type-check NOT MEASURED. The dependency-closure build got queue-timeout (exit 99) from os-verify-lock five times (about 45 min). The holder, pid 26418, was running a full app-shell type-check plus vitest that had held the lock for over 52 min. Declared narrowing: CI on 3c642c77b56 reports Test UI success (shards 1-9 success), Type Check UI success and TypeScript Type Check success.", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 3c642c77b56: 38 commands. Run locally with exit 0: 35, including check:nul-bytes, check:engine-double-contract, check:test-source-alias, check:type-check-coverage and check:cross-package-test-inputs. NOT MEASURED locally: check:type-check-debt (its --re-measure queues a whole-tree build behind the same lock; I stopped it) and ui scripts vitest (needs the spec dist that the closure build would make). CI check-runs at 3c642c77b56: 51 runs, every one success or skipped. They include Lint & Repo Gates, Lint UI, Test UI, Test Core, Type Check UI, Type Check debt ledger, Type Check workspace, Dogfood Regression Gate, Check Changeset and PR-body guards.", "security_findings": "none" }Generated by Claude Code