Skip to content

Studio OWD overview: the draft save is an unguarded whole-document write, and a draft that appears after page load is published live unseen #37515

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CY2uhJ1AYNPw5TUSVS

Filing gate: ① pre-existing defect found in review, outside #36962's Done-when. Source: fleet. Contract review 7188573161 (S2, N3) on PR #37501; the seat ordered the card under #36962 (REWORK 7188587712).

Grading: area:build · Bug · concurrency gap on an access-control surface (org-wide sharing default) · admins, rare (concurrent writers) → suggested p2 · evidence: read, not measured.

What is wrong

ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx writes each saved row's draft with a plain client.save (no If-Match / If-None-Match), as a whole document over a read made a moment earlier. After #37501 the PUBLISH is pinned, so a concurrent change to the live sharingModel is no longer lost. The draft write still is unguarded:

  1. A draft written by a copilot or another writer between the Save-time read and the write is replaced entirely.
  2. hasDraft is the load's reading, not the Save's. A draft that appears after the page loaded is picked up by the Save-time re-read and published live with the row, without the "unpublished draft" badge ever being shown. On a refusal, keep-editing or reload it is reset as if this Save had written it. The published pin catches neither, because the live row did not move.

The second can put content the admin never saw live under their Save, on an object whose sharing they are setting.

Also (N3, housekeeping): editPinsRef entries are never pruned and are keyed by object name alone, not by package; loads are not sequenced, so a plain load finishing before an overlapping load(keep) can re-pin a kept edit to a fresh read.

Also from the delta review 7189094603 on PR #37501:

Done when

Dedupe: OWD draft save unguarded, PackageOwdOverviewPanel client.save → no open card.

Parent: #36962.

Activity

  1. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:build · domain:ui · Bug · priority:p1 · pm:queue · size S; rationale: the Studio OWD overview's draft save is an unguarded whole-document write, and a draft that appears after page load is published along with it. Two admins can silently overwrite each other's org-wide sharing default. A silent lost update is p1 whatever the traffic (same family as #36962, p1); suggested p2.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgUnCu5Y93VusJhmEVm
    os-dev-report

    {
      "issue": 37515,
      "status": "done",
      "premise_still_valid": true,
      "branch": "claude/project-thread-vzymy4",
      "pr": 37554,
      "head": "f0bb20d4",
      "gates": {
        "tests": "13 PackageOwdOverviewPanel test files, 70 passed, at f0bb20d4 (vitest, root ui/)",
        "typecheck": "@object-ui/app-shell type-check (tsc --noEmit + tsc -p tsconfig.test.json) exit 0, 0 errors, at f0bb20d4",
        "lint": "eslint on the 3 touched ui files: 0 errors, 2 pre-existing warnings on untouched lines",
        "derived": "dispatch-gates --commands: 38 of 38 derived families exit 0 (27 at 7b0a3b7a code tree, 11 changeset families at f0bb20d4); --ran reconciles 38/38",
        "ablations": "A1 draft pin not sent: 8 red; A2 load sequencing removed: 1 red; A3 kept basis dropped: 4 red; each restored to HEAD by ablation-replace (blob == HEAD, git diff HEAD empty)",
        "ci": "in_progress (PR just opened; seat reads check-runs)"
      },
      "line_budget": { "additions": 696, "deletions": 57, "files": 4, "under_3000": true },
      "deviations": [
        "N2 kept as is (failed /layers read publishes unpinned), reason stated in the PR body; no change to shipped publish behaviour.",
        "Added in scope: a draft read refused 403 now refuses that row at Save with the existing draft-unreadable text instead of writing over the withheld draft.",
        "One WIP commit (871f186d) on the branch has no trailer pair; later commits carry it. Branch is not claude/issue-*, so no force-push.",
        "Review request for os-sales on the PR not sent: reviewer requests are the seat's hand-off act; assignee os-sales set by pr_create."
      ],
      "files_changed": [
        "ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx",
        "ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.draftPinned-37515.test.tsx",
        "ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.sharedSelect-11865.test.tsx",
        ".changeset/37515-owd-overview-guarded-draft-save.md"
      ],
      "out_of_scope_findings": [
        "observation (not filed, read only): a failed Save-time /layers read for a row with no pending draft builds the draft on an empty baseline, as before; carrier: none"
      ],
      "api_writes": { "count": 2, "endpoints": ["pr_create via fleet-write relay (PR 37554)", "this report comment via post-stamped"] },
      "mcp_calls": { "count": 2, "writes": 0, "reads": ["issue_read get 37515", "issue_read get_comments 37515"] },
      "security_findings": "none"
    }
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 1 · 2026-11-26T13:08Z
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgUnCu5Y93VusJhmEVm
    Account: os-sales
    Branch: claude/project-thread-vzymy4
    Worktree: objectstack-issue-37515
    Domain: domain:ui
    Seat: repo:objectstack#2
    File surface: ui/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx and its tests, one changeset
    Container & model: M, mode:thread, model: default — dispatch-gates --tier: no path-derived mandate, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack Studio (the OWD overview's draft save is an unguarded whole-document write, and a draft that appears after page load is published live unseen) | none | package admins editing OWD in Studio; reachable today
    Thread-read: 7192905378
    Premise: holds (seat's read-only premise check 12:1xZ, before dispatch)
    Serial constraints cleared: none named
    Late claim: the thread opened draft PR #37554 (head f0bb20d) before this claim was written; the seat owed it when the thread reported its branch.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  6. removed
    pm:dispatched
    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:builddomain:uipriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions