Skip to content

Sharing: an authored delete policy refuses the owner of a row they did not create (ownership adds no rows beside the policy), against ruling C #39339

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

Filing gate: ① product defect with a named landing point and a measured reproduction (engine level) · Source: fleet (found by the #39217 card thread and confirmed by the L1 and contract reviews of PR #39327)
Grade: area:data · Bug · p2 · reach: an app that authors a row-level delete policy on an object with an owner field — the owner (or a manager above them, or a writeScope 'org' holder) of a row they did not create is refused 403 on rows the policy does not admit · evidence: measured (engine probe on the #39216 pin stack, both sharing models) + code read at origin/main

What happens

Ruling C on #38517 (7288570890) says delete on an owned object follows the record's owner, a manager above the owner, or a Modify All holder; a creator who no longer owns the row cannot delete. #39216 built that.

When the object also carries an authored delete row policy, the platform keeps its created_by floor as one term of the OR beside the authored policy (packages/plugins/plugin-security/src/security-plugin-rls-filter.ts:399–445, the #35917 composition). The ownership allow then adds no rows, so the owner of a row they did not create is refused 403 on every row the authored policy does not admit. The authored policy, meant to widen delete, narrows the owner. By code reading only, update on private and public_read has the same shape (not measured).

Expected

Either ownership (owner, manager above, write depth) admits a row beside an authored widener, with Modify All kept out per ADR-0066 ①, or the current composition is confirmed as intended and documented. Which one is a maintainer question (it meets #35917's composition), so triage routes this to the decision inbox if it agrees.

Business reason

An app builder who adds a delete policy to let, say, a team lead delete closed records silently takes delete away from record owners who did not create their rows (reassigned leads, imported data). The data skill cannot teach the rule until it is settled.

Reader

Triage first touch (grade, and decision inbox or pm:queue); then the repo:objectstack lane seat that claims it.

Dedupe: authored delete policy owner 304 hits, delete policy created_by floor 48, owner refused delete policy 404 (read the top 4 of each): #35917 (closed) is the composition that causes this, #38517 (closed) the ruling it now conflicts with, #36365 / #36367 are the controlled_by_parent predicate-write outcome; none is this defect.

Activity

  1. added
    priority:p2
    finding
    domain:server
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:server · Bug · p2 · pm:queue · size M, touched 2026-12-03T14:13Z. Rationale: the filer's grade stands. Under an authored row-level delete policy, the owner of a row they did not create is refused, which goes against ruling C on #38517. That is a row-permission correctness defect, area:data ④, measured at the engine on both sharing models. The finding label is retired by this touch.
    Grade: area:data · Bug · p2 · apps authoring a row-level delete policy on an owned object · measured (engine probe) plus read.

  3. added
    pm:queue
    and removed
    finding
    on Dec 3, 2026
  4. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

    Claim: PM loop round 2 · 2026-12-03T14:23Z
    Session: session_01Utp6CaJjkQx5fPE4Fbmoeq
    Account: os-bill
    Branch: claude/issue-39339-owner-beside-delete-policy
    Worktree: objectstack-issue-39339
    Domain: domain:server
    Seat: repo:objectstack@os-bill
    Area: data-1203
    File surface: packages/plugins/plugin-security/src/security-plugin-rls-filter.ts, a pin test in packages/plugins/plugin-security/src/ (reason: owner, manager above the owner and write-depth holder admitted beside an authored delete policy on both sharing models; Modify All kept out), a patch changeset. Any other plugin-security or plugin-sharing file is named in the report before widening; stop on any other breach.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at 850d240b: no path-derived mandate), effort: high (reason: row-permission composition across two maintainer rulings; design judgment)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: security-plugin-rls-filter.ts (the floor term OR'd beside an authored using policy is created_by only) in objectstack plugin-security; no platform path covers it; every app that authors a row-level delete policy on an owned object, for owners who did not create their rows (reassigned or imported records), today.
    Thread-read: 7381095597
    Premise: holds — read at origin/main 850d240: the composition comment at security-plugin-rls-filter.ts:241 and :261 names owner_only_writes / owner_only_deletes as created_by == current_user.id; measured by the #39217 card thread (engine probe, both sharing models) and confirmed by the L1 and contract reviews of PR #39327.
    Pre-claim lane: domain:server (plugin-security); the seat keeps it.
    Pre-claim deps: none open.
    Prior rulings read: 「Ruled: A — admit: under a sharing allow, the creator/owner floor stays an OR term beside an authored update/delete using policy」 (#35917, 7063130499); ruling C on #38517 (7288570890): delete on an owned object follows the owner, a manager above the owner, or a Modify All holder; a creator who no longer owns the row cannot delete. check-prior-rulings.mjs --card 39339: thread 0 rulings; ADR candidates (ADR-0055 §3, ADR-0090 D11, ADR-0066 ①) owed a read by the dev.
    Serial constraints cleared: check-handover.mjs --inflight --card=39339 → no overlap read (2 claims name no path: #38415, #35238, this seat's own, neither on plugin-security).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 3, 2026
  6. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

    Paused: 2026-12-03T14:53Z · the maintainer paused this card for quota (seat order, relayed to the zone). The claim 7381373535 is kept; no PR is open.
    Resume-from: claude/issue-39339-owner-beside-delete-policy@589dcbe2e8

    • Done on the branch: fix in security-plugin-rls-filter.ts (on delete, when the declared authority answers allow and the caller holds no Modify All, ownership admits the row beside the authored term; Modify All keeps today's composition per ADR-0066 ①; objects with no owner column keep the created_by floor; update untouched). New pin owner-beside-authored-delete-policy.test.ts (20 cases, 9 red before, all green after). Two existing pins that encoded the defect rewritten to ruling C: predicate-write-floor-deferral.test.ts, delegated-write-never-exceeds-delegator.test.ts (outside the claim's named surface, named here). Patch changeset.
    • Left: full plugin-security suite at the tip, the derived gates (7 of 69 ran, all exit 0), the draft PR with Fixes #39339, the os-dev report, L1.
    • Noted for the resumer, not filed: update on private / public_read has the same shape (code reading; the update allow also carries edit shares and the queue, which neither ruling covers); a Modify All holder who owns a row they did not create is still refused beside an authored delete policy; the delegated by-id delete keeps both floors (pre-existing, pinned).
  7. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

    Release: 2026-12-03T22:41Z · session session_01Utp6CaQsbKBMQtm6Tpsamd releases claim 7381373535 · because the maintainer hands this half-done card to the seat repo:objectstack@os-elon-musk (mailbox #39411) · into pm:queue, assignee cleared, for that seat to re-claim.
    Resume-from: claude/issue-39339-owner-beside-delete-policy@589dcbe2e8
    Source: the maintainer (Bill), project chat of seat repo:objectstack@os-bill, 2026-12-03T22:36Z: 「这些任务用信箱交接给 os-elon-musk 做到一半」.

    • Done on the branch: the fix in security-plugin-rls-filter.ts and the pin owner-beside-authored-delete-policy.test.ts; detail in the pause note 7382216369.
    • Left: the full plugin-security suite at the tip, the derived gates (7 of 69 ran, all exit 0), the draft PR with Fixes #39339, L1. The pause note lists three adjacent shapes noted for the resumer and not filed.
  8. added
    pm:queue
    and removed
    pm:dispatched
    on Dec 3, 2026
  9. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cwiNRyb9B38wT2fjYj

    Claim: PM loop round 1 (zone em-bill takeover) · 2026-12-03T22:47Z · re-claims after os-bill's Release 7394570768; source: the maintainer (Elon), project thread of zone em-bill, 2026-12-03T22:42:37Z: 「bill 交接过来的卡也开专区处理」; os-bill's split knock 7394630899 on #39411 leaves this card.
    Session: session_016WV4cwiNRyb9B38wT2fjYj
    Account: os-elon-musk
    Branch: claude/issue-39339-owner-beside-delete-policy
    Worktree: objectstack-issue-39339
    Domain: domain:server
    Seat: repo:objectstack@os-elon-musk
    Area: em-bill
    File surface: packages/plugins/plugin-security/src/security-plugin-rls-filter.ts, packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts, packages/plugins/plugin-security/src/delegated-write-never-exceeds-delegator.test.ts, the pin packages/plugins/plugin-security/src/owner-beside-authored-delete-policy.test.ts (already on the branch); stop on any other breach.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at f32b7d6d: no path-derived mandate), effort: high (reason: row-permission composition across two maintainer rulings; the resumer verifies the design before PR)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: security-plugin-rls-filter.ts (the floor term OR'd beside an authored using delete policy is created_by only) in objectstack plugin-security; no platform path covers it; every app that authors a row-level delete policy on an owned object, for owners who did not create their rows (reassigned or imported records), today.
    Thread-read: 7394570768
    Premise: holds — the branch's pin owner-beside-authored-delete-policy.test.ts was measured 9 red before the fix (pause note 7382216369); re-measured by the dev at the rebased tip.
    Pre-claim lane: domain:server (paths under packages/plugins/plugin-security/); the seat keeps it.
    Pre-claim deps: the card names no Blocked-by: and no "after #N"; overlap-check.mjs --branch=origin/claude/issue-39339-owner-beside-delete-policy → VERDICT clean (merges cleanly onto f32b7d6, 0 PR heads).
    Prior rulings read: 「Ruled: A — admit: under a sharing allow, the creator/owner floor stays an OR term beside an authored update/delete using policy」 (#35917, 7063130499); ruling C on #38517 (7288570890): delete on an owned object follows the owner, a manager above the owner, or a Modify All holder; a creator who no longer owns the row cannot delete. check-prior-rulings.mjs --card 39339 at f32b7d6: 0 thread rulings; ruling-hit refs #25234, #35802, #36367 and ADR-0055 §3, ADR-0090 D11, ADR-0066 ① owed a read by the dev.
    Serial constraints cleared: check-handover.mjs --inflight --card=39339 at f32b7d6 → no in-flight claim names a plugin-security path (38 held claims read).
    Resume-from: claude/issue-39339-owner-beside-delete-policy@589dcbe2e8

  10. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 3, 2026
  11. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cwiNRyb9B38wT2fjYj

    Claim amendment: 2026-12-03T23:57Z · amendment 7394754694 changes the branch only; nothing else changes.
    Branch: claude/issue-39339-wip (this project lets cloud sessions push only claude/issue-N-wip; the dev starts it from the Resume-from sha named in the claim)

  12. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cwiNRyb9B38wT2fjYj
    os-dev-report

    {
      "issue": 39339,
      "status": "done",
      "branch": "claude/issue-39339-wip",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39448",
      "pr_number": 39448,
      "head_sha": "e8c0f8ff6eb585e6356e66f1525c0d73b53be2a2",
      "session": "session_016WV4cwiNRyb9B38wT2fjYj",
      "premise_still_valid": true,
      "summary": "Resumed os-bill's branch at 589dcbe2e8 onto claude/issue-39339-wip, merged origin/main 5c00c572 once (merge e8c0f8ff, no conflicts, no regenerated artefacts), and opened draft PR #39448 with Fixes #39339. Design verified against the code: the widening is gated on delete + a checkDelete allow (floor replaced) + no Modify All (hasSuperuserWriteBypass, the same predicate ISharingService.hasWriteBypass reaches), so update is untouched and ruling A's OR term is kept and widened to ownership, not dropped (a deny keeps floor + authored term). PM assumption holds.",
      "files_changed": [
        ".changeset/39339-owner-beside-delete-policy.md",
        "packages/plugins/plugin-security/src/security-plugin-rls-filter.ts",
        "packages/plugins/plugin-security/src/owner-beside-authored-delete-policy.test.ts",
        "packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts",
        "packages/plugins/plugin-security/src/delegated-write-never-exceeds-delegator.test.ts"
      ],
      "line_budget": "422 changed lines (+408 / -14, 5 files) vs merge base 5c00c5726, under the 3000 human-merge threshold (dispatch-gates reading at e8c0f8ff)",
      "tests": "At e8c0f8ff: pin src/owner-beside-authored-delete-policy.test.ts 20 passed; fix reverted on disk via scripts/ablation-replace.mjs (anchor x1->x0, blob 2b4ebae9c700->b88a5348b620; subject imported from src, no build in path) => 'Tests 9 failed | 11 passed (20)' (owner/manager/org-depth by id on both objects, owner predicate delete on both, manager predicate delete); restored blob == HEAD, git diff HEAD empty. pnpm --filter @objectstack/plugin-security test => 'Test Files 293 passed (293) / Tests 7439 passed | 52 skipped (7491)' VERDICT command-exit 0. pnpm --filter @objectstack/plugin-security typecheck => VERDICT command-exit 0, check:test-typecheck OK 0 errors. Build closure pnpm turbo run build --filter='@objectstack/plugin-security^...' => 20/20 tasks, exit 0.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at e8c0f8ff: 69 families. 67 run exit 0 (exit captured before any pipe, cmd > log 2>&1; EXIT=$?). 2 NOT MEASURED: pnpm check:dual-build-cjs-loads exit 3, pnpm check:i18n exit 3 (PREREQUISITE NOT MET: read every package's dist/, no full build here; CI runs both). node scripts/check-plugin-teardown-shape.mjs --self-test exit 3 first (shallow clone, pinned fixture 621a4876 unreachable), exit 0 after git fetch --depth=1 of that commit. pnpm check:query-options-erasure hit my 280 s per-gate timeout once (exit 124), rerun exit 0. dispatch-gates --ran: '69 derived, 67 run, 2 NOT-MEASURED, 0 UNRUN', exit 0. PR check-runs: not read, CI had not converged at report time (relay run 47237644280 still in_progress).",
      "mcp_calls": "0",
      "api_writes": "3 write strokes: git push (claude/issue-39339-wip, new branch); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /repos/objectstack-ai/objectstack/issues/39448/assignees os-elon-musk), dispatch 204, the dispatch CLI ended UNCONFIRMED exit 6 at its 300 s wait with run 47237644280 in_progress, PR read back by GET: #39448 draft open on e8c0f8ff, assignee os-elon-musk, body identical to the one sent plus a trailing newline; post-stamped os-dev-report comment on #39339.",
      "deviations": [
        "Branch is claude/issue-39339-wip, not the claim's Branch claude/issue-39339-owner-beside-delete-policy: the dispatch order allows pushes only to that name. Built by hand with git worktree add from 589dcbe2e8, not by dev-worktree.sh --resume-from, which builds the same-name branch only.",
        "The first gate batch was moved to the background by the harness when it ran past the 600 s foreground cap. It was stopped with TaskStop and gates 62-69 and 54 were rerun in the foreground. No background process remains.",
        "Dispatch asks for 'machine-checkable fields only'; the os-dev template's prose fields (summary, tests) are kept beside them, as os-dev.md wins on conflict."
      ],
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #39339 pause note 7382216369 · noted, not filed: update on private / public_read has the same shape (code reading only, not measured; the update allow also carries edit shares and the queue)",
        "carrier: #39339 pause note 7382216369 · noted, not filed: a Modify All holder who owns a row they did not create is still refused beside an authored delete policy (ADR-0066 ① keeps Modify All out of the widened term)",
        "carrier: #39339 pause note 7382216369 · noted, not filed: the delegated by-id delete keeps both floors (pre-existing, pinned in delegated-write-never-exceeds-delegator.test.ts)"
      ]
    }
  13. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cwiNRyb9B38wT2fjYj

    Claim: PM loop round 1 (zone em-bill takeover, re-posted to name the push branch) · 2026-12-04T00:48Z · re-claims after os-bill's Release 7394570768; source: the maintainer (Elon), project thread of zone em-bill, 2026-12-03T22:42Z: 「bill 交接过来的卡也开专区处理」; os-bill's split knock 7394630899 on #39411 leaves this card.
    Session: session_016WV4cwiNRyb9B38wT2fjYj
    Account: os-elon-musk
    Branch: claude/issue-39339-wip
    Worktree: objectstack-issue-39339
    Domain: domain:server
    Seat: repo:objectstack@os-elon-musk
    Area: em-bill
    File surface: packages/plugins/plugin-security/src/security-plugin-rls-filter.ts, packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts, packages/plugins/plugin-security/src/delegated-write-never-exceeds-delegator.test.ts, the pin packages/plugins/plugin-security/src/owner-beside-authored-delete-policy.test.ts (already on the branch); stop on any other breach.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at f32b7d6d: no path-derived mandate), effort: high (reason: row-permission composition across two maintainer rulings; the resumer verifies the design before PR)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: security-plugin-rls-filter.ts (the floor term OR'd beside an authored using delete policy is created_by only) in objectstack plugin-security; no platform path covers it; every app that authors a row-level delete policy on an owned object, for owners who did not create their rows (reassigned or imported records), today.
    Thread-read: 7397150541
    Premise: holds — the branch's pin owner-beside-authored-delete-policy.test.ts was measured 9 red before the fix (pause note 7382216369); re-measured by the dev at the rebased tip.
    Pre-claim lane: domain:server (paths under packages/plugins/plugin-security/); the seat keeps it.
    Pre-claim deps: the card names no Blocked-by: and no "after #N"; overlap-check.mjs --branch=origin/claude/issue-39339-owner-beside-delete-policy → VERDICT clean (merges cleanly onto f32b7d6, 0 PR heads).
    Prior rulings read: 「Ruled: A — admit: under a sharing allow, the creator/owner floor stays an OR term beside an authored update/delete using policy」 (#35917, 7063130499); ruling C on #38517 (7288570890): delete on an owned object follows the owner, a manager above the owner, or a Modify All holder; a creator who no longer owns the row cannot delete. check-prior-rulings.mjs --card 39339 at f32b7d6: 0 thread rulings; ruling-hit refs #25234, #35802, #36367 and ADR-0055 §3, ADR-0090 D11, ADR-0066 ① owed a read by the dev.
    Serial constraints cleared: check-handover.mjs --inflight --card=39339 at f32b7d6 → no in-flight claim names a plugin-security path (38 held claims read).
    Resume-from: claude/issue-39339-owner-beside-delete-policy@589dcbe2e8

  14. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions