You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
Follow-up from #36137 (direction B, PR #36318). Found by the dev and the L1 on PR #36318 (L1 7076070176); filed by the seat. Parent: #36137.
What happens
PR #36318 pins the view settings panel's draft save, so a settings save that crosses "Save to this view" (draft write, then publish) is now refused instead of overwriting the draft. Direction B covers only the writers that are pinned. One writer is not: the draft branch of ObjectStackAdapter.updateView (rename, pin to top, set as default on a view that has an unpublished draft) still reads the draft, merges and writes it back with no version precondition. It can land in the same window between the draft write and the publish, and the publish then sends its change out for everyone. Ruling 7058616478 on #35955 says an unpublished draft is never published on someone else's behalf, so the window is still open, only narrower.
Why the client cannot close it alone
MetadataClient.publish takes no precondition on the draft's version. Every new draft writer would have to remember its own pin, and a missed one reopens the window.
Give the /meta publish door a draft-version precondition (for example If-Match on the draft's version), refused with the ADR-0112 envelope (409 METADATA_CONFLICT) when the draft moved.
MetadataClient.publish accepts and sends it; "Save to this view" passes the version its own draft write returned.
This changes the publish door and the client, so it is a protocol face: its L2 runs on the rules/schema face at the contract-review tier.
Acceptance
A test interleaves an updateView draft write between "Save to this view"'s draft write and its publish: the publish is refused and nothing unreviewed is published.
A test pins the door's refusal code and status.
Blocked-by: #36318 (the pinned settings save must be on main first)
Grade
p2 · area:ux · domain:rest. Same harm as #36137 on a narrower path: a draft someone has not reviewed can be published for everyone.
Triage: lands in domain:server (view draft publish precondition) · pm:blocked as filed; rationale: area:ux · Bug · after PR #36318 pins the settings panel's draft save, the one unpinned draft writer can no longer be published by 「Save to this view」: the save is refused instead of landing. Follow-up of #36137 → p2 as filed · size S.
Unblock · 2026-11-23T12:26Z: this card's only Blocked-by:, #36318, closed at 2026-11-22T10:14Z (merged or completed). The pm:blocked label was stale, so the card goes back to pm:queue. The grade is unchanged. Whoever picks it up re-reads the premise on a base that contains #36318.
Claim: PM loop round 1 · 2026-11-25T13:41Z
Session: session_012MmDsSBHy5paNUz6zke9Re
Account: os-lizheng
Branch: claude/issue-36350-view-draft-publish-pin
Worktree: objectstack-issue-36350
Domain: domain:server
Seat: repo:objectstack#6
File surface: the /meta per-item publish door (packages/rest/src/rest-server.ts publish route and its version-pin reading), the protocol publish path in packages/metadata-protocol/src/ only if the precondition must be checked there, ui/packages/data-objectstack/src/metadata-client.ts (publish options) and ui/packages/data-objectstack/src/index.ts (updateView draft branch), the "Save to this view" caller in ui/packages/app-shell/src/views/, tests, changesets (stop on breach; explain in the report)
Container & model: M, mode:subagent, model: default tier — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate", effort: high
Clause-②: yes (widening, expected: a publish precondition on the draft's version is a new accepted request shape at a published door; measured on the built declarations by the dev, and this line is amended then)
Metadata-protocol: none
Responsibility: platform code in objectstack (ObjectStackAdapter.updateView's draft branch writes the draft unpinned, and the publish door has no draft-version precondition) | partial: since #36601 POST /publish takes If-Match on the ACTIVE row's version, which does not see a draft moved underneath — whether that already closes this window is the dev's first measurement | admins who "Save to this view" while a rename / pin / set-default lands on the same view's pending draft
Thread-read: 7101106047
Premise: corrected context — the card predates #36601: MetadataClient.publish (metadata-client.ts:2044) now takes ifMatch/ifNoneMatch on the active published row (packages/rest/src/meta-item-publish-version-pin.test.ts); a draft-version precondition is still absent (read on origin/main 4fb03eb). The dev measures first whether the window is still open and stops with a fork if the draft pin cannot coexist with the active-row If-Match on one door
Pre-claim lane: rest / metadata-protocol / data-objectstack / app-shell — all repo:objectstack lane paths; owes a contract-review-tier L2 (protocol face, per the card)
Pre-claim deps: Blocked-by: #36318 merged 2026-11-22
Prior rulings read: publish,view,draft,precondition,… → 203 hits; ADR-0045 Decision §3, ADR-0086 D6, ADR-0003 Decision §3, ADR-0037 Decision §2, ADR-0038 Decision §5, ADR-0045 Decision §5, ADR-0087 D6; ruling 7058616478 on #35955 (cited by the card: an unpublished draft is never published on someone else's behalf); thread: none
Serial constraints cleared: PR #37069 (draft, claude/project-thread-g0avze) touches packages/metadata-protocol/src/protocol-save.ts — the dev runs overlap-check.mjs before every push and queues behind it on a real overlap
The maintainer answered the seat's decision card (7164652312) in the os-lizheng fleet project, in this seat's session, verbatim: 「A1」. The question asked was the four options in 7164652312's 速读 and table; A1 was the seat's recommendation.
Ruling
The per-item publish door takes a draft-version precondition of its own. It is one new optional member on PublishMetaItemRequestSchema (the option's proposed name is draftVersion), sent in the publish body beside message. The door checks it against the draft row's keyed token and refuses a moved draft with 409 METADATA_CONFLICT, whose currentVersion names the draft's current token; nothing is promoted. The enforcement point is the existing expectedDraftHash in packages/metadata-protocol/src/protocol-history-and-publish.ts.
If-Match on that door keeps its shipped meaning (the active row's token, PublishMetaItemRequestSchema.parentVersion: "It pins the active row only"). Not taken: A2 (overloading If-Match), B-extended (client pins only, measured insufficient in M2) and C (Save to this view writing the active row).
Client side, in the same PR: MetadataClient.publish sends the new member. "Save to this view" passes the version its own draft write returned. ObjectStackAdapter.updateView's draft branch is pinned to the draft version it read. The draft bar's Publish (publishRuntimeMetadata) passes the draft token it showed, which closes the dev's out-of-scope finding on that caller.
Execution parameters (set with the ruling)
Clause-②: yes (widening), Metadata-protocol: none. The PR owes a contract-review-tier L2, because the published schema packages/spec/src/** is touched.
Acceptance as the card states it (unchanged): the interleaving test is refused and nothing unreviewed is published; a test pins the door's refusal code and status.
Resume-from: claude/issue-36350-view-draft-publish-pin@1896afa3. That commit holds the measurement test packages/rest/src/meta-item-publish-draft-interleave-36350.test.ts, whose M1 is red on main. It becomes the acceptance pin.
Correction to the ruling record 7168616260: the seat's wind-down note on #35381 is comment 7168409761 (not 7168418871). The ruling and its execution parameters are unchanged; a claim cites Ruling-ref: 7168616260.
Claim: PM loop round 4 · 2026-11-25T22:53Z
Session: session_012MmDsSBHy5paNUz6zke9Re
Account: os-lizheng
Branch: claude/issue-36350-view-draft-publish-pin
Worktree: objectstack-issue-36350
Domain: domain:server
Seat: repo:objectstack#6
Ruling-ref: 7168616260
File surface: packages/spec/src/api/protocol.zod.ts (PublishMetaItemRequestSchema gains the optional draft-version member) and its generated outputs, the publish route in packages/rest/src/, the promotion path in packages/metadata-protocol/src/protocol-history-and-publish.ts (expectedDraftHash), MetadataClient.publish in ui/packages/data-objectstack/src/metadata-client.ts, ObjectStackAdapter.updateView in ui/packages/data-objectstack/src/index.ts, the "Save to this view" and draft-bar Publish callers in ui/packages/app-shell/src/views/ (runtime-metadata-persistence.ts), tests, changesets (stop on breach; explain in the report)
Container & model: M, mode:cloud, model: default tier — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate", effort: high
Clause-②: yes (widening)
Metadata-protocol: none
Responsibility: platform code in objectstack (the per-item publish door has no draft-version precondition; ObjectStackAdapter.updateView and the draft bar's Publish write or promote unpinned) | #36601's active-row If-Match does not see a moved draft (measured M1 red, M2 insufficient, report 7164597391) | admins who "Save to this view" or press the draft bar's Publish while another admin's write lands on the same pending draft
Thread-read: 7168644634
Premise: holds — the ruling's premise is the dev's measurement at 4fb03eb (M1 red on main: an interleaved draft is published); the dev re-runs the committed measurement test packages/rest/src/meta-item-publish-draft-interleave-36350.test.ts on current main before any code
Pre-claim lane: spec / rest / metadata-protocol / data-objectstack / app-shell — repo:objectstack lane paths; packages/spec/src/** stays in this lane under the lane-keep rule. packages/spec/src/** plus other packages makes this build-heavy, hence mode:cloud
Pre-claim deps: Blocked-by: #36318 merged; no open Blocked-by:
Prior rulings read: ruling 7168616260 (this card, A1); ruling 7058616478 (#35955); prior scan publish,view,draft,precondition,… → 203 hits (ADR-0045 Decision §3, ADR-0086 D6, ADR-0003 Decision §3, ADR-0037 Decision §2, ADR-0038 Decision §5, ADR-0045 Decision §5, ADR-0087 D6)
Resume-from: claude/issue-36350-view-draft-publish-pin@1896afa3
Serial constraints cleared: open-PR census on the named files runs in the dispatch order's first step (overlap-check.mjs before every push); PR #37069 touched protocol-save.ts earlier and is re-checked then
Dispatched · 2026-11-25T22:55Z · mode:cloud dev session session_012MmDsSpwtcn5gbWrBDA3Jm (model opus, effort high), on claude/issue-36350-view-draft-publish-pin from 1896afa3, under claim 7176924040 and ruling 7168616260. It delivers a draft PR plus an os-dev-report comment here.
{
"issue": 36350,
"status": "done",
"branch": "claude/issue-36350-view-draft-publish-pin",
"pr": "https://github.com/objectstack-ai/objectstack/pull/37387",
"session": "session_012MmDsSpwtcn5gbWrBDA3Jm",
"premise_still_valid": true,
"summary": "Ruling 7168616260 (A1) executed. Main merged into the branch as a real merge commit (516fa62a); the window was measured open (M1) before any code. PublishMetaItemRequestSchema gains optional draftVersion. publishMetaItem judges it against the draft row it reads, before any authoring rule, using the keyed storedParentForToken. A moved draft, or one no longer pending, is refused 409 METADATA_CONFLICT with currentVersion = the draft's current token (null when none); nothing is promoted and the usual conflict audit row is written. expectedDraftHash still locks the write. The REST publish door reads draftVersion from the body beside message; a present non-string is refused 400. If-Match keeps its active-row meaning. Client side: MetadataClient.publish sends draftVersion. updateView's draft branch reads getDraft (envelope version) before /layers and writes pinned (If-Match, or If-None-Match: * when it saw no draft). Save to this view passes its own receipt's version; on a moved-draft 409 it resolves 'pending-draft' and does not discard the moved draft. The draft bar's Publish passes the token it read (readRuntimeDraftForPublish). The measurement file's M1 became the acceptance pin, a top-level describe in the existing meta-item-publish-version-pin harness. The measurement file was removed: M0 is asserted there; M2 and M3 measured the untaken options B-extended and C. Owed: a contract-review-tier L2 (published schema packages/spec/src/**), not requested here, for the seat to route.",
"tests": "HEAD 8eee7080. Acceptance harness: pnpm --filter @objectstack/rest exec vitest run src/meta-item-publish-version-pin.test.ts gives Tests 17 passed (17). The [#36350] describe covers: interleaved updateView write, pinned and unpinned, refused 409 METADATA_CONFLICT with currentVersion = the moved draft token (MetadataConflictErrorSchema), active row 'live', rename still pending; a control; absent member stays unpinned; a pinned draft no longer pending gives 409 with currentVersion null; a draft token sent as If-Match still gets the active-row refusal; non-string draftVersion gives 400 x3. Ablation via scripts/ablation-replace.mjs: anchor 'if (request.draftVersion !== undefined) {' changed x1 to x0, blob 83b0ed27 to 9d6f53eb. After rebuild, ablation-dist-preflight finds the marker in dist/index.cjs and dist/index.js: Tests 3 failed | 14 passed (17); red are both acceptance pins and the no-longer-pending pin. Restore: blob == HEAD 83b0ed27, git diff HEAD empty, rebuilt, preflight --absent clean, Tests 17 passed (17). Package suites, all under os-verify-lock with VERDICT command-exit 0: spec Test Files 895 passed (895), Tests 28420 passed | 1 todo; metadata-protocol 370 passed | 9 skipped files, 23435 tests passed; rest 429 passed (429), 8851 passed | 351 skipped. UI (cd ui && pnpm exec vitest run): data-objectstack Test Files 127 passed, Tests 1435 passed. app-shell at 8cee4222: 2 failed | 2428 passed | 1 skipped. The two ReportView files waited on the draft bar's old get read; fixed in 8eee7080, and the 4 affected files now pass (25 tests). Typecheck exit 0 for spec, metadata-protocol, rest; type-check exit 0 for @object-ui/data-objectstack and @object-ui/app-shell (UI dependency closure built first). The app-shell full suite was not re-run after 8eee7080, only the 4 affected files.",
"gates": "Local subset from node scripts/pm/dispatch-gates.mjs --commands, run sequentially with exit codes captured before any pipe. --ran reconciliation reads: 125 derived, 123 run, 2 NOT-MEASURED, 0 UNRUN (exit 0). NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exits 3 because its positive control is pinned to a commit this shallow clone cannot reach. NOT MEASURED: pnpm check:dual-build-cjs-loads exits 3 because packages outside this diff have no dist/ in this container (PREREQUISITE NOT MET). Both run in CI. check:skill-examples first exited 3 because client-react was unbuilt; after building it, the re-run exits 0. spec check:generated found 1 stale artifact (check:docs); fixed with --fix and committed (content/docs/references/api/protocol.mdx). Re-run on 8eee7080, all exit 0: check:cross-package-test-inputs, test-source-alias, type-check-debt, type-check-coverage, tier-file-adoption, nul-bytes, issue-citations, doc-authoring, undeclared-dep-imports. overlap-check before every push gives VERDICT clean; the only shared head is #37371, which shares the generated reference page and merges cleanly. PR #37387 check-runs: in_progress, not read at report time; CI convergence is the seat's.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))",
"mcp_calls": "2 — mcp__github__issue_read (get, get_comments) on #36350; no MCP write tool used",
"api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (relay pr_create opening draft PR #37387, assignee os-lizheng, body read back identical 11412 bytes); POST /repos/objectstack-ai/objectstack/issues/36350/comments (this os-dev-report via post-stamped.mjs). git push of the branch is not a REST write. Labels and assignee of the card were not touched.",
"open_questions": [
{
"question": "When Save to this view's publish is refused because the draft moved in its window, what does the save answer? The moved draft now holds this save's body with the other writer's rename, pin or default on top.",
"options": [
"A (implemented): resolve 'pending-draft', the same answer as a draft found pending before the write. The caller says a draft is pending and points to the view settings. The moved draft is kept for review, never discarded.",
"B: rethrow the 409, so the caller shows a conflict error toast. The draft is still kept.",
"C: discard the draft as the other refusals do. This deletes the other writer's unreviewed change, so it is ruled out by 7058616478."
],
"recommendation": "A, because the outcome the user needs is the one 'pending-draft' already says: a draft is pending and needs review. Deleting it (C) would destroy someone else's change. Not a contract-shape fork; recorded so the seat or L2 can flip it to B if preferred."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: seat (family note for an eventual close-out card, not filed) · noted, not filed — other draft-then-publish callers in ui/packages/app-shell do not send draftVersion yet, so the door's new pin is not used there: studio-design/studioSaveBar.tsx:323 and :398, metadata-admin/DraftConflictDialog.tsx:412, metadata-admin/detailSaveAtOnce.ts:78, recordTabsConfigSave.ts:166, objectExtensionArrangementSave.ts:161, layout/designModeMenuSave.ts:338 and :433. Ruling 7168616260 item 3 scoped this PR to the four named callers. Not reproduced per caller, so no class (a) claim. Dedupe words: draftVersion publish callers, Studio save publish unpinned draft, draft-then-publish pin family"
]
}
Correction to the ruling record's execution parameters · 2026-11-26T01:35Z (ruling record 7168616260; claim 7176924040)
Metadata-protocol: added
The parameter Metadata-protocol: none in 7168616260 was the seat's own prediction beside the maintainer's answer 「A1」. It was not ruled. It is wrong: the diff adds api/PublishMetaItemRequest:draftVersion to packages/spec/authorable-surface/api.json, and Check Changeset reads that as added.
The contract review 7179921339 (M1) found this, and the precedent on the same schema agrees: .changeset/36601-published-layer-version-pin.md declares added, with @objectstack/specminor and the other packages patch.
So the PR declares Metadata-protocol: added, ships @objectstack/spec at minor, and carries the Skills-docs: line that kind owes. Clause-②: yes (widening) is unchanged.
{
"issue": 36350,
"status": "done",
"branch": "claude/issue-36350-view-draft-publish-pin",
"pr": "https://github.com/objectstack-ai/objectstack/pull/37387",
"session": "session_012MmDsSpwtcn5gbWrBDA3Jm",
"premise_still_valid": true,
"summary": "Patch round on the contract-tier L2 FAIL 7179921339 and the parameter correction 7179935180. New head a0b4863e; main not merged, no conflict. M1: all five changesets read Metadata-protocol: added, and @objectstack/spec is now minor (precedent 36601). Skills-docs measured: skills/** has 0 hits for the per-item publish request, so 'none'. M2: the view settings panel hands the draft bar its own save's receipt version (savedDraftVersion, from useDraftSaveGuard().heldDraftVersion) with each savedSignal bump, and the bar pins its Publish to it; no re-read. S1: MetadataConflictErrorSchema docblock and currentVersion name the draft pin (sent back as draftVersion, never If-Match; null means nothing pending to publish); plugin-rest-api.zod.ts lists the 409 causes, both body keys and the 400; docs regenerated. S2: PublishMetaItemRequest in protocol-door-requests.ts declares draftVersion and parentVersion. S3: a publish 409 with currentVersion null rethrows; a moved draft still answers 'pending-draft'. N1: in-process off-type draftVersion refused 400. N2: the describe says the draft is judged first and NO_DRAFT precedes. N3: audit row asserted. N4 and N5: in the PR body text handed to the seat. The PR body is NOT updated by me (open question 1): Check Changeset stays red until the seat writes the replacement body, sent by send_message.",
"tests": "HEAD a0b4863e. rest harness meta-item-publish-version-pin.test.ts: Tests 18 passed (18); adds the in-process off-type pin and the publish/denied metadata_conflict audit-row assertion. Ablation of the M2 pin (UI test resolves source, no build leg): scripts/ablation-replace.mjs changed 'shownDraftVersionRef.current = savedDraftVersion;' to undefined, blob da8e79d7 to e00baf11. RuntimeDraftBar.test.tsx then gives Tests 2 failed | 11 passed (13); red are the after-save pin and the save-then-publish window. Restored: blob == HEAD, git diff HEAD empty. Suites under os-verify-lock, VERDICT 0: spec 895 files, 28420 tests passed; metadata-protocol 370 files passed | 9 skipped, 23435 tests; rest 429 files passed, 8852 tests | 351 skipped. UI vitest over the draft-bar, persistence, ViewConfigPanel (incl. the new pinnedDraftSave describe) and ReportView files plus all of app-shell views/metadata-admin/: Test Files 810 passed (810), Tests 8717 passed | 1 skipped. Typecheck chained with &&, VERDICT command-exit 0: spec, metadata-protocol, rest typecheck and @object-ui/app-shell type-check. Not re-run this round: the full app-shell suite (63 min locally; Test UI carries it) and data-objectstack (unchanged this round).",
"gates": "dispatch-gates --commands on a0b4863e gives the same 125 families as round 1, all re-run. --ran with exit codes: 125 derived, 123 run, 2 NOT-MEASURED, 0 UNRUN. NOT MEASURED, both exit 3 and both run in CI: check-plugin-teardown-shape --self-test (shallow clone cannot reach its pinned control) and check:dual-build-cjs-loads (packages outside the diff unbuilt). check:skill-examples exited 3 until client-react was built, then 0. spec check:generated: check:docs stale, fixed with --fix and committed; api-surface green on the built dist. pnpm --dir ui exec vitest run scripts/ gives 172 files passed. overlap-check before push: VERDICT clean (#37371 shares only the generated reference page and merges cleanly). PR check-runs on a0b4863e not read at report time. Check Changeset is expected red until the PR body is rewritten (open question 1).",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))",
"mcp_calls": "4 this session: mcp__github__issue_read x4 (round 1: get and get_comments on #36350; round 2: get_comments on PR #37387 and on #36350); plus 1 mcp__claude-code-remote__send_message to the seat (cross-session, not a GitHub write). No GitHub MCP write tool used.",
"api_writes": "Round 2: 1, this report via post-stamped.mjs (relay dispatch). Session total: 3. They are POST /repos/objectstack-ai/objectstack/dispatches for pr_create (#37387, round 1), plus the round-1 and round-2 os-dev-report comments on #36350. git push is not a REST write. The PR body, labels and card assignee were not written.",
"open_questions": [
{
"question": "Your patch order asks me to edit the PR body (M1's Metadata-protocol line and Skills-docs line, M2's sentence, N4, N5). os-dev.md rule 3 says a subagent writes the PR body only at pr_create and never PATCHes it ('PR 正文子代理只在 pr_create 写、⛔ 不 PATCH 由席代写'), and the relay has no PR-body edit verb. os-dev.md wins where a dispatch order conflicts with it, so I did not write the body.",
"options": [
"A: the seat writes the replacement body I sent by send_message, verbatim between the BEGIN/END markers. Check Changeset then reads Metadata-protocol: added and spec minor.",
"B: the seat authorises a dev PATCH explicitly for this card, and I write it in another round."
],
"recommendation": "A, because it is the write os-dev.md assigns to the seat, and the text is ready."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: seat (close-out card, per L2 7179921339) · noted, not filed — eight other draft-then-publish call sites in six files send no draftVersion: studio-design/studioSaveBar.tsx:323 and :398, metadata-admin/DraftConflictDialog.tsx:412, metadata-admin/detailSaveAtOnce.ts:78, recordTabsConfigSave.ts:166, objectExtensionArrangementSave.ts:161, layout/designModeMenuSave.ts:338 and :433. @objectstack/client publishItem can state neither pin. Now also in the PR acceptance notes (N5), via the replacement body. Dedupe words: draftVersion publish callers, Studio save publish unpinned draft, draft-then-publish pin family"
]
}
{
"issue": 36350,
"status": "done",
"branch": "claude/issue-36350-view-draft-publish-pin",
"pr": "https://github.com/objectstack-ai/objectstack/pull/37387",
"session": "session_012MmDsSpwtcn5gbWrBDA3Jm",
"premise_still_valid": true,
"summary": "Addendum to the patch round (seat message of 01:44Z, seen after report 7181146930): I re-read the 8 hand-written pages the Docs Drift Check names. No sentence on them describes the per-item publish body, its 409 causes or its currentVersion in a way this PR makes false, so no page was edited and the head is unchanged at a0b4863e. A repo-wide sweep of content/docs (outside references/ and releases/) for 'only read key', publish-body message, publish 409, publishMetaItem and PublishMetaItemRequest found two more mentions. deployment/validating-metadata.mdx:479 says the promotion runs the authoring rules, which is still true. api/client-sdk.mdx:237 is covered in the page list. The false sentence the seat quoted ('the body's only read key is message', the single 409 cause) lived in packages/spec/src/api/plugin-rest-api.zod.ts, which this round already corrected (S1). Pages: content/docs/api/metadata-api.mdx — not about this: the only per-item publish mention (:75) lists the route among the doors that need manage_metadata and, under group/isolated tenancy, the platform operator. It describes no body, 409 or currentVersion. | content/docs/concepts/metadata-lifecycle.mdx — already true. :101 is the 422 WRITABLE_PACKAGE_REQUIRED refusal of a publish. :238 describes the repository put()'s ConflictError path, which this PR leaves unchanged: 409 metadata_conflict at save, publish, rollback and overlay-delete. It does not claim that path is the only 409 cause, and the draft pin is a protocol pre-check beside it, so nothing there becomes false. | content/docs/protocol/kernel/error-handling.mdx — not about this: its currentVersion rows (:176, :254) are CONCURRENT_UPDATE on the data PATCH route, and :545 is POST /packages/publish. The page has no METADATA_CONFLICT row. | content/docs/api/client-sdk.mdx — already true: :237 calls client.meta.publishItem(..., { message }) on @objectstack/client, which this PR does not change. That publishItem cannot state either pin; it is already on the out-of-scope list. | content/docs/kernel/contracts/metadata-service.mdx — already true: :506 and :514 name the route as 'Promote a metadata item's pending draft to live', with no body or refusal described. | content/docs/data-modeling/currency.mdx — already true: :109 says publishing a draft is judged and refused 422 INVALID_METADATA. That still holds for a pinned draft that has not moved; a moved draft's 409 comes before any judging, and the page makes no claim about that. | content/docs/deployment/cli.mdx — not about this: :1536 lists the route among the writes that fill stored expressions. | content/docs/permissions/system-context.mdx — not about this: :213 is POST /packages/publish (the marketplace route).",
"tests": "No code or docs change in this addendum; readings of report 7181146930 stand for head a0b4863e.",
"gates": "No new commit, no push in this addendum; gates of report 7181146930 stand for a0b4863e.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))",
"mcp_calls": "4 GitHub reads this session (unchanged; this addendum made none), plus 1 cross-session send_message earlier. No GitHub MCP write tool used.",
"api_writes": "This addendum: 1, this os-dev-report comment on #36350 via post-stamped.mjs. Session total: 4 (pr_create dispatch plus three report comments).",
"open_questions": [
{
"question": "Still open from report 7181146930: the PR body replacement is the seat's write (os-dev.md rule 3); Check Changeset stays red until it lands.",
"options": [
"A: the seat writes the body sent by send_message",
"B: the seat authorises a dev PATCH"
],
"recommendation": "A, the text is ready."
}
],
"security_findings": "none",
"out_of_scope_findings": []
}
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(view draft publish precondition) ·pm:blockedas filed; rationale: area:ux · Bug · after PR #36318 pins the settings panel's draft save, the one unpinned draft writer can no longer be published by 「Save to this view」: the save is refused instead of landing. Follow-up of #36137 → p2 as filed · size S.fix(console): pin the view settings draft save to the draft it opened…
objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj
Unblock · 2026-11-23T12:26Z: this card's only
Blocked-by:, #36318, closed at 2026-11-22T10:14Z (merged or completed). Thepm:blockedlabel was stale, so the card goes back topm:queue. The grade is unchanged. Whoever picks it up re-reads the premise on a base that contains #36318.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Claim: PM loop round 1 · 2026-11-25T13:41Z
Session:
session_012MmDsSBHy5paNUz6zke9ReAccount:
os-lizhengBranch:
claude/issue-36350-view-draft-publish-pinWorktree:
objectstack-issue-36350Domain:
domain:serverSeat:
repo:objectstack#6File surface: the
/metaper-item publish door (packages/rest/src/rest-server.tspublish route and its version-pin reading), the protocol publish path inpackages/metadata-protocol/src/only if the precondition must be checked there,ui/packages/data-objectstack/src/metadata-client.ts(publishoptions) andui/packages/data-objectstack/src/index.ts(updateViewdraft branch), the "Save to this view" caller inui/packages/app-shell/src/views/, tests, changesets (stop on breach; explain in the report)Container & model:
M,mode:subagent,model: default tier — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate",effort: highClause-②: yes (widening, expected: a publish precondition on the draft's version is a new accepted request shape at a published door; measured on the built declarations by the dev, and this line is amended then)
Metadata-protocol: none
Responsibility:
platform code in objectstack (ObjectStackAdapter.updateView's draft branch writes the draft unpinned, and the publish door has no draft-version precondition) | partial: since #36601 POST /publish takes If-Match on the ACTIVE row's version, which does not see a draft moved underneath — whether that already closes this window is the dev's first measurement | admins who "Save to this view" while a rename / pin / set-default lands on the same view's pending draftThread-read: 7101106047
Premise: corrected context — the card predates #36601:
MetadataClient.publish(metadata-client.ts:2044) now takesifMatch/ifNoneMatchon the active published row (packages/rest/src/meta-item-publish-version-pin.test.ts); a draft-version precondition is still absent (read on origin/main 4fb03eb). The dev measures first whether the window is still open and stops with a fork if the draft pin cannot coexist with the active-rowIf-Matchon one doorPre-claim lane: rest / metadata-protocol / data-objectstack / app-shell — all repo:objectstack lane paths; owes a contract-review-tier L2 (protocol face, per the card)
Pre-claim deps:
Blocked-by: #36318merged 2026-11-22Prior rulings read: publish,view,draft,precondition,… → 203 hits; ADR-0045 Decision §3, ADR-0086 D6, ADR-0003 Decision §3, ADR-0037 Decision §2, ADR-0038 Decision §5, ADR-0045 Decision §5, ADR-0087 D6; ruling 7058616478 on #35955 (cited by the card: an unpublished draft is never published on someone else's behalf); thread: none
Serial constraints cleared: PR #37069 (draft,
claude/project-thread-g0avze) touchespackages/metadata-protocol/src/protocol-save.ts— the dev runsoverlap-check.mjsbefore every push and queues behind it on a real overlap3 remaining items
objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Ruled: A1 ·
needs-user-decisioncleared →pm:queue· 2026-11-25T16:49ZThe maintainer answered the seat's decision card (7164652312) in the os-lizheng fleet project, in this seat's session, verbatim: 「A1」. The question asked was the four options in 7164652312's 速读 and table; A1 was the seat's recommendation.
Ruling
PublishMetaItemRequestSchema(the option's proposed name isdraftVersion), sent in the publish body besidemessage. The door checks it against the draft row's keyed token and refuses a moved draft with409 METADATA_CONFLICT, whosecurrentVersionnames the draft's current token; nothing is promoted. The enforcement point is the existingexpectedDraftHashinpackages/metadata-protocol/src/protocol-history-and-publish.ts.If-Matchon that door keeps its shipped meaning (the active row's token,PublishMetaItemRequestSchema.parentVersion: "It pins the active row only"). Not taken: A2 (overloadingIf-Match), B-extended (client pins only, measured insufficient in M2) and C (Save to this view writing the active row).MetadataClient.publishsends the new member. "Save to this view" passes the version its own draft write returned.ObjectStackAdapter.updateView's draft branch is pinned to the draft version it read. The draft bar's Publish (publishRuntimeMetadata) passes the draft token it showed, which closes the dev's out-of-scope finding on that caller.Execution parameters (set with the ruling)
Clause-②: yes (widening),Metadata-protocol: none. The PR owes a contract-review-tier L2, because the published schemapackages/spec/src/**is touched.claude/issue-36350-view-draft-publish-pin@1896afa3. That commit holds the measurement testpackages/rest/src/meta-item-publish-draft-interleave-36350.test.ts, whose M1 is red on main. It becomes the acceptance pin.Ruling-ref:this comment.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Correction to the ruling record 7168616260: the seat's wind-down note on #35381 is comment 7168409761 (not 7168418871). The ruling and its execution parameters are unchanged; a claim cites
Ruling-ref: 7168616260.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Claim: PM loop round 4 · 2026-11-25T22:53Z
Session:
session_012MmDsSBHy5paNUz6zke9ReAccount:
os-lizhengBranch:
claude/issue-36350-view-draft-publish-pinWorktree:
objectstack-issue-36350Domain:
domain:serverSeat:
repo:objectstack#6Ruling-ref: 7168616260
File surface:
packages/spec/src/api/protocol.zod.ts(PublishMetaItemRequestSchemagains the optional draft-version member) and its generated outputs, the publish route inpackages/rest/src/, the promotion path inpackages/metadata-protocol/src/protocol-history-and-publish.ts(expectedDraftHash),MetadataClient.publishinui/packages/data-objectstack/src/metadata-client.ts,ObjectStackAdapter.updateViewinui/packages/data-objectstack/src/index.ts, the "Save to this view" and draft-bar Publish callers inui/packages/app-shell/src/views/(runtime-metadata-persistence.ts), tests, changesets (stop on breach; explain in the report)Container & model:
M,mode:cloud,model: default tier — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate",effort: highClause-②: yes (widening)
Metadata-protocol: none
Responsibility:
platform code in objectstack (the per-item publish door has no draft-version precondition; ObjectStackAdapter.updateView and the draft bar's Publish write or promote unpinned) | #36601's active-row If-Match does not see a moved draft (measured M1 red, M2 insufficient, report 7164597391) | admins who "Save to this view" or press the draft bar's Publish while another admin's write lands on the same pending draftThread-read: 7168644634
Premise: holds — the ruling's premise is the dev's measurement at 4fb03eb (M1 red on main: an interleaved draft is published); the dev re-runs the committed measurement test
packages/rest/src/meta-item-publish-draft-interleave-36350.test.tson current main before any codePre-claim lane: spec / rest / metadata-protocol / data-objectstack / app-shell — repo:objectstack lane paths;
packages/spec/src/**stays in this lane under the lane-keep rule.packages/spec/src/**plus other packages makes this build-heavy, hencemode:cloudPre-claim deps:
Blocked-by: #36318merged; no openBlocked-by:Prior rulings read: ruling 7168616260 (this card, A1); ruling 7058616478 (#35955); prior scan publish,view,draft,precondition,… → 203 hits (ADR-0045 Decision §3, ADR-0086 D6, ADR-0003 Decision §3, ADR-0037 Decision §2, ADR-0038 Decision §5, ADR-0045 Decision §5, ADR-0087 D6)
Resume-from:
claude/issue-36350-view-draft-publish-pin@1896afa3Serial constraints cleared: open-PR census on the named files runs in the dispatch order's first step (
overlap-check.mjsbefore every push); PR #37069 touchedprotocol-save.tsearlier and is re-checked thenobjectstack-fleet commentedon Nov 25, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Dispatched · 2026-11-25T22:55Z ·
mode:clouddev sessionsession_012MmDsSpwtcn5gbWrBDA3Jm(model opus, effort high), onclaude/issue-36350-view-draft-publish-pinfrom1896afa3, under claim 7176924040 and ruling 7168616260. It delivers a draft PR plus anos-dev-reportcomment here.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSpwtcn5gbWrBDA3Jm
os-dev-report
{ "issue": 36350, "status": "done", "branch": "claude/issue-36350-view-draft-publish-pin", "pr": "https://github.com/objectstack-ai/objectstack/pull/37387", "session": "session_012MmDsSpwtcn5gbWrBDA3Jm", "premise_still_valid": true, "summary": "Ruling 7168616260 (A1) executed. Main merged into the branch as a real merge commit (516fa62a); the window was measured open (M1) before any code. PublishMetaItemRequestSchema gains optional draftVersion. publishMetaItem judges it against the draft row it reads, before any authoring rule, using the keyed storedParentForToken. A moved draft, or one no longer pending, is refused 409 METADATA_CONFLICT with currentVersion = the draft's current token (null when none); nothing is promoted and the usual conflict audit row is written. expectedDraftHash still locks the write. The REST publish door reads draftVersion from the body beside message; a present non-string is refused 400. If-Match keeps its active-row meaning. Client side: MetadataClient.publish sends draftVersion. updateView's draft branch reads getDraft (envelope version) before /layers and writes pinned (If-Match, or If-None-Match: * when it saw no draft). Save to this view passes its own receipt's version; on a moved-draft 409 it resolves 'pending-draft' and does not discard the moved draft. The draft bar's Publish passes the token it read (readRuntimeDraftForPublish). The measurement file's M1 became the acceptance pin, a top-level describe in the existing meta-item-publish-version-pin harness. The measurement file was removed: M0 is asserted there; M2 and M3 measured the untaken options B-extended and C. Owed: a contract-review-tier L2 (published schema packages/spec/src/**), not requested here, for the seat to route.", "tests": "HEAD 8eee7080. Acceptance harness: pnpm --filter @objectstack/rest exec vitest run src/meta-item-publish-version-pin.test.ts gives Tests 17 passed (17). The [#36350] describe covers: interleaved updateView write, pinned and unpinned, refused 409 METADATA_CONFLICT with currentVersion = the moved draft token (MetadataConflictErrorSchema), active row 'live', rename still pending; a control; absent member stays unpinned; a pinned draft no longer pending gives 409 with currentVersion null; a draft token sent as If-Match still gets the active-row refusal; non-string draftVersion gives 400 x3. Ablation via scripts/ablation-replace.mjs: anchor 'if (request.draftVersion !== undefined) {' changed x1 to x0, blob 83b0ed27 to 9d6f53eb. After rebuild, ablation-dist-preflight finds the marker in dist/index.cjs and dist/index.js: Tests 3 failed | 14 passed (17); red are both acceptance pins and the no-longer-pending pin. Restore: blob == HEAD 83b0ed27, git diff HEAD empty, rebuilt, preflight --absent clean, Tests 17 passed (17). Package suites, all under os-verify-lock with VERDICT command-exit 0: spec Test Files 895 passed (895), Tests 28420 passed | 1 todo; metadata-protocol 370 passed | 9 skipped files, 23435 tests passed; rest 429 passed (429), 8851 passed | 351 skipped. UI (cd ui && pnpm exec vitest run): data-objectstack Test Files 127 passed, Tests 1435 passed. app-shell at 8cee4222: 2 failed | 2428 passed | 1 skipped. The two ReportView files waited on the draft bar's old get read; fixed in 8eee7080, and the 4 affected files now pass (25 tests). Typecheck exit 0 for spec, metadata-protocol, rest; type-check exit 0 for @object-ui/data-objectstack and @object-ui/app-shell (UI dependency closure built first). The app-shell full suite was not re-run after 8eee7080, only the 4 affected files.", "gates": "Local subset from node scripts/pm/dispatch-gates.mjs --commands, run sequentially with exit codes captured before any pipe. --ran reconciliation reads: 125 derived, 123 run, 2 NOT-MEASURED, 0 UNRUN (exit 0). NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exits 3 because its positive control is pinned to a commit this shallow clone cannot reach. NOT MEASURED: pnpm check:dual-build-cjs-loads exits 3 because packages outside this diff have no dist/ in this container (PREREQUISITE NOT MET). Both run in CI. check:skill-examples first exited 3 because client-react was unbuilt; after building it, the re-run exits 0. spec check:generated found 1 stale artifact (check:docs); fixed with --fix and committed (content/docs/references/api/protocol.mdx). Re-run on 8eee7080, all exit 0: check:cross-package-test-inputs, test-source-alias, type-check-debt, type-check-coverage, tier-file-adoption, nul-bytes, issue-citations, doc-authoring, undeclared-dep-imports. overlap-check before every push gives VERDICT clean; the only shared head is #37371, which shares the generated reference page and merges cleanly. PR #37387 check-runs: in_progress, not read at report time; CI convergence is the seat's.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))", "mcp_calls": "2 — mcp__github__issue_read (get, get_comments) on #36350; no MCP write tool used", "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (relay pr_create opening draft PR #37387, assignee os-lizheng, body read back identical 11412 bytes); POST /repos/objectstack-ai/objectstack/issues/36350/comments (this os-dev-report via post-stamped.mjs). git push of the branch is not a REST write. Labels and assignee of the card were not touched.", "open_questions": [ { "question": "When Save to this view's publish is refused because the draft moved in its window, what does the save answer? The moved draft now holds this save's body with the other writer's rename, pin or default on top.", "options": [ "A (implemented): resolve 'pending-draft', the same answer as a draft found pending before the write. The caller says a draft is pending and points to the view settings. The moved draft is kept for review, never discarded.", "B: rethrow the 409, so the caller shows a conflict error toast. The draft is still kept.", "C: discard the draft as the other refusals do. This deletes the other writer's unreviewed change, so it is ruled out by 7058616478." ], "recommendation": "A, because the outcome the user needs is the one 'pending-draft' already says: a draft is pending and needs review. Deleting it (C) would destroy someone else's change. Not a contract-shape fork; recorded so the seat or L2 can flip it to B if preferred." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: seat (family note for an eventual close-out card, not filed) · noted, not filed — other draft-then-publish callers in ui/packages/app-shell do not send draftVersion yet, so the door's new pin is not used there: studio-design/studioSaveBar.tsx:323 and :398, metadata-admin/DraftConflictDialog.tsx:412, metadata-admin/detailSaveAtOnce.ts:78, recordTabsConfigSave.ts:166, objectExtensionArrangementSave.ts:161, layout/designModeMenuSave.ts:338 and :433. Ruling 7168616260 item 3 scoped this PR to the four named callers. Not reproduced per caller, so no class (a) claim. Dedupe words: draftVersion publish callers, Studio save publish unpinned draft, draft-then-publish pin family" ] }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSBHy5paNUz6zke9Re
Correction to the ruling record's execution parameters · 2026-11-26T01:35Z (ruling record 7168616260; claim 7176924040)
Metadata-protocol: added
Metadata-protocol: nonein 7168616260 was the seat's own prediction beside the maintainer's answer 「A1」. It was not ruled. It is wrong: the diff addsapi/PublishMetaItemRequest:draftVersiontopackages/spec/authorable-surface/api.json, andCheck Changesetreads that asadded..changeset/36601-published-layer-version-pin.mddeclaresadded, with@objectstack/specminorand the other packagespatch.Metadata-protocol: added, ships@objectstack/specatminor, and carries theSkills-docs:line that kind owes.Clause-②: yes (widening)is unchanged.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSpwtcn5gbWrBDA3Jm
os-dev-report
{ "issue": 36350, "status": "done", "branch": "claude/issue-36350-view-draft-publish-pin", "pr": "https://github.com/objectstack-ai/objectstack/pull/37387", "session": "session_012MmDsSpwtcn5gbWrBDA3Jm", "premise_still_valid": true, "summary": "Patch round on the contract-tier L2 FAIL 7179921339 and the parameter correction 7179935180. New head a0b4863e; main not merged, no conflict. M1: all five changesets read Metadata-protocol: added, and @objectstack/spec is now minor (precedent 36601). Skills-docs measured: skills/** has 0 hits for the per-item publish request, so 'none'. M2: the view settings panel hands the draft bar its own save's receipt version (savedDraftVersion, from useDraftSaveGuard().heldDraftVersion) with each savedSignal bump, and the bar pins its Publish to it; no re-read. S1: MetadataConflictErrorSchema docblock and currentVersion name the draft pin (sent back as draftVersion, never If-Match; null means nothing pending to publish); plugin-rest-api.zod.ts lists the 409 causes, both body keys and the 400; docs regenerated. S2: PublishMetaItemRequest in protocol-door-requests.ts declares draftVersion and parentVersion. S3: a publish 409 with currentVersion null rethrows; a moved draft still answers 'pending-draft'. N1: in-process off-type draftVersion refused 400. N2: the describe says the draft is judged first and NO_DRAFT precedes. N3: audit row asserted. N4 and N5: in the PR body text handed to the seat. The PR body is NOT updated by me (open question 1): Check Changeset stays red until the seat writes the replacement body, sent by send_message.", "tests": "HEAD a0b4863e. rest harness meta-item-publish-version-pin.test.ts: Tests 18 passed (18); adds the in-process off-type pin and the publish/denied metadata_conflict audit-row assertion. Ablation of the M2 pin (UI test resolves source, no build leg): scripts/ablation-replace.mjs changed 'shownDraftVersionRef.current = savedDraftVersion;' to undefined, blob da8e79d7 to e00baf11. RuntimeDraftBar.test.tsx then gives Tests 2 failed | 11 passed (13); red are the after-save pin and the save-then-publish window. Restored: blob == HEAD, git diff HEAD empty. Suites under os-verify-lock, VERDICT 0: spec 895 files, 28420 tests passed; metadata-protocol 370 files passed | 9 skipped, 23435 tests; rest 429 files passed, 8852 tests | 351 skipped. UI vitest over the draft-bar, persistence, ViewConfigPanel (incl. the new pinnedDraftSave describe) and ReportView files plus all of app-shell views/metadata-admin/: Test Files 810 passed (810), Tests 8717 passed | 1 skipped. Typecheck chained with &&, VERDICT command-exit 0: spec, metadata-protocol, rest typecheck and @object-ui/app-shell type-check. Not re-run this round: the full app-shell suite (63 min locally; Test UI carries it) and data-objectstack (unchanged this round).", "gates": "dispatch-gates --commands on a0b4863e gives the same 125 families as round 1, all re-run. --ran with exit codes: 125 derived, 123 run, 2 NOT-MEASURED, 0 UNRUN. NOT MEASURED, both exit 3 and both run in CI: check-plugin-teardown-shape --self-test (shallow clone cannot reach its pinned control) and check:dual-build-cjs-loads (packages outside the diff unbuilt). check:skill-examples exited 3 until client-react was built, then 0. spec check:generated: check:docs stale, fixed with --fix and committed; api-surface green on the built dist. pnpm --dir ui exec vitest run scripts/ gives 172 files passed. overlap-check before push: VERDICT clean (#37371 shares only the generated reference page and merges cleanly). PR check-runs on a0b4863e not read at report time. Check Changeset is expected red until the PR body is rewritten (open question 1).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))", "mcp_calls": "4 this session: mcp__github__issue_read x4 (round 1: get and get_comments on #36350; round 2: get_comments on PR #37387 and on #36350); plus 1 mcp__claude-code-remote__send_message to the seat (cross-session, not a GitHub write). No GitHub MCP write tool used.", "api_writes": "Round 2: 1, this report via post-stamped.mjs (relay dispatch). Session total: 3. They are POST /repos/objectstack-ai/objectstack/dispatches for pr_create (#37387, round 1), plus the round-1 and round-2 os-dev-report comments on #36350. git push is not a REST write. The PR body, labels and card assignee were not written.", "open_questions": [ { "question": "Your patch order asks me to edit the PR body (M1's Metadata-protocol line and Skills-docs line, M2's sentence, N4, N5). os-dev.md rule 3 says a subagent writes the PR body only at pr_create and never PATCHes it ('PR 正文子代理只在 pr_create 写、⛔ 不 PATCH 由席代写'), and the relay has no PR-body edit verb. os-dev.md wins where a dispatch order conflicts with it, so I did not write the body.", "options": [ "A: the seat writes the replacement body I sent by send_message, verbatim between the BEGIN/END markers. Check Changeset then reads Metadata-protocol: added and spec minor.", "B: the seat authorises a dev PATCH explicitly for this card, and I write it in another round." ], "recommendation": "A, because it is the write os-dev.md assigns to the seat, and the text is ready." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: seat (close-out card, per L2 7179921339) · noted, not filed — eight other draft-then-publish call sites in six files send no draftVersion: studio-design/studioSaveBar.tsx:323 and :398, metadata-admin/DraftConflictDialog.tsx:412, metadata-admin/detailSaveAtOnce.ts:78, recordTabsConfigSave.ts:166, objectExtensionArrangementSave.ts:161, layout/designModeMenuSave.ts:338 and :433. @objectstack/client publishItem can state neither pin. Now also in the PR acceptance notes (N5), via the replacement body. Dedupe words: draftVersion publish callers, Studio save publish unpinned draft, draft-then-publish pin family" ] }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#6 · os-lizheng · session_012MmDsSpwtcn5gbWrBDA3Jm
os-dev-report
{ "issue": 36350, "status": "done", "branch": "claude/issue-36350-view-draft-publish-pin", "pr": "https://github.com/objectstack-ai/objectstack/pull/37387", "session": "session_012MmDsSpwtcn5gbWrBDA3Jm", "premise_still_valid": true, "summary": "Addendum to the patch round (seat message of 01:44Z, seen after report 7181146930): I re-read the 8 hand-written pages the Docs Drift Check names. No sentence on them describes the per-item publish body, its 409 causes or its currentVersion in a way this PR makes false, so no page was edited and the head is unchanged at a0b4863e. A repo-wide sweep of content/docs (outside references/ and releases/) for 'only read key', publish-body message, publish 409, publishMetaItem and PublishMetaItemRequest found two more mentions. deployment/validating-metadata.mdx:479 says the promotion runs the authoring rules, which is still true. api/client-sdk.mdx:237 is covered in the page list. The false sentence the seat quoted ('the body's only read key is message', the single 409 cause) lived in packages/spec/src/api/plugin-rest-api.zod.ts, which this round already corrected (S1). Pages: content/docs/api/metadata-api.mdx — not about this: the only per-item publish mention (:75) lists the route among the doors that need manage_metadata and, under group/isolated tenancy, the platform operator. It describes no body, 409 or currentVersion. | content/docs/concepts/metadata-lifecycle.mdx — already true. :101 is the 422 WRITABLE_PACKAGE_REQUIRED refusal of a publish. :238 describes the repository put()'s ConflictError path, which this PR leaves unchanged: 409 metadata_conflict at save, publish, rollback and overlay-delete. It does not claim that path is the only 409 cause, and the draft pin is a protocol pre-check beside it, so nothing there becomes false. | content/docs/protocol/kernel/error-handling.mdx — not about this: its currentVersion rows (:176, :254) are CONCURRENT_UPDATE on the data PATCH route, and :545 is POST /packages/publish. The page has no METADATA_CONFLICT row. | content/docs/api/client-sdk.mdx — already true: :237 calls client.meta.publishItem(..., { message }) on @objectstack/client, which this PR does not change. That publishItem cannot state either pin; it is already on the out-of-scope list. | content/docs/kernel/contracts/metadata-service.mdx — already true: :506 and :514 name the route as 'Promote a metadata item's pending draft to live', with no body or refusal described. | content/docs/data-modeling/currency.mdx — already true: :109 says publishing a draft is judged and refused 422 INVALID_METADATA. That still holds for a pinned draft that has not moved; a moved draft's 409 comes before any judging, and the page makes no claim about that. | content/docs/deployment/cli.mdx — not about this: :1536 lists the route among the writes that fill stored expressions. | content/docs/permissions/system-context.mdx — not about this: :213 is POST /packages/publish (the marketplace route).", "tests": "No code or docs change in this addendum; readings of report 7181146930 stand for head a0b4863e.", "gates": "No new commit, no push in this addendum; gates of report 7181146930 stand for a0b4863e.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes (widening))", "mcp_calls": "4 GitHub reads this session (unchanged; this addendum made none), plus 1 cross-session send_message earlier. No GitHub MCP write tool used.", "api_writes": "This addendum: 1, this os-dev-report comment on #36350 via post-stamped.mjs. Session total: 4 (pr_create dispatch plus three report comments).", "open_questions": [ { "question": "Still open from report 7181146930: the PR body replacement is the seat's write (os-dev.md rule 3); Check Changeset stays red until it lands.", "options": [ "A: the seat writes the body sent by send_message", "B: the seat authorises a dev PATCH" ], "recommendation": "A, the text is ready." } ], "security_findings": "none", "out_of_scope_findings": [] }