Skip to content

spec: the Change Owner default reads only the flat sharingModel, so a controlled_by_parent detail declared under security.sharingModel offers Change Owner #36263

Not planned

Description

@objectstack-fleet

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

Filing gate ① · Source: fleet · found by the #35270 review sweep (run record r04 S6) on PR #36154, re-read on main c30ce97

What happens

A detail object whose access follows its parent record ("controlled by parent") should have Change Owner off unless its author turns it on. The check reads the sharing setting from only one of the two places an object can declare it. An object that declares it in its security block (the nested spot) is treated as an ordinary object, so Change Owner is offered on it, while every access check treats it as following its parent.

  • packages/spec/src/data/user-action-transfer.ts:185-187 derivedTransferDefault: obj.sharingModel !== 'controlled_by_parent' — flat spot only; used at :205 by resolveUserActionTransfer, which change-record-owner.ts:181 changeOwnerOffReason reads.
  • The access gates read both spots: packages/plugins/plugin-sharing/src/sharing-service.ts:270, :307, :1790 (schema?.sharingModel ?? schema?.security?.sharingModel).
  • The sibling in core reads both and says why: packages/core/src/security/user-assigned-work.ts:84-96 (accessFollowsMaster, "a raw-registered object can reach the registry without the parse, which is why the nested spot is read").
  • No privilege is gained: an owner change still needs the same grant as a plain owner_id edit. The ruled default is missed for that shape.

Done when

  • derivedTransferDefault reads sharingModel ?? security.sharingModel, the one resolution every reader shares.
  • Pins (spec): an object with only security.sharingModel: 'controlled_by_parent' → resolveUserActionTransfer(...).enabled === false; with userActions.transfer: true → enabled; flat-spot control unchanged. One core pin: Change Owner on such an object → 403 CHANGE_OWNER_DISABLED.
  • Ablation: revert to the flat-only read and the nested-spot pin goes red.

reach: public HTTP Change Owner doors and os lint / console readers of userActions.transfer; only objects that declare controlled_by_parent in the nested security block. Read from the code, not measured.
Business reason: on child records whose access follows the parent, owner hand-over is supposed to be off by default; for some objects it is on, against the rule the maintainer set.
Reader: area:spec / domain:spec (packages/spec user-action-transfer).
Dedupe: transfer controlled_by_parent, derivedTransferDefault → #35399, #35315, #35403 (none carries this).
Grade: p3 — wrong default on one declaration shape; no privilege gained.

Activity

  1. added
    bug
    pm:queue
    domain:spec
    on Nov 22, 2026
  2. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:spec (Change Owner default) · pm:queue; rationale: area:data · Bug · the default reads only the flat sharingModel, so a controlled_by_parent detail declared under the nested shape gets the wrong transfer default. No privilege is gained → p3 as filed · size XS. Linked under topic #36238.

  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As8fiqghPfkY5FTbE3X

    Claim: PM loop round 1
    Session: session_011y7As8fiqghPfkY5FTbE3X
    Account: os-alice
    Branch: claude/issue-36263-transfer-default-nested-sharing
    Worktree: objectstack-issue-36263
    Domain: domain:spec
    Seat: repo:objectstack#7
    File surface: packages/spec/src/data/user-action-transfer.ts and its test, one core pin under packages/core/src/security/, one .changeset/*.md (stop on breach; explain in the report)
    Container & model: XS, premise-first, mode:subagent, model: default tier (dispatch-gates --tier at ecd10e9e: "no path-derived mandate … floor sonnet · default opus · ceiling fable"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: packages/spec user-action-transfer.ts derivedTransferDefault (objectstack) | none | public Change Owner doors and os lint readers; only an object carrying a nested security.sharingModel, which may be unreachable (see Premise)
    Thread-read: 7074399151
    Premise: contested — the dev tests it before any edit. The card leans on a raw-registered object reaching the registry unparsed and on the sibling accessFollowsMaster in packages/core/src/security/user-assigned-work.ts reading the nested spot; on origin/main ecd10e9 that sibling no longer exists in that file, and packages/lint/src/validate-security-posture.ts:69-74 plus validate-sharing-rule-enforceability.ts:376-379 state that ObjectSchema is strict, declares no security key and REFUSES a nested OWD. If no shippable path delivers a nested security.sharingModel to resolveUserActionTransfer, the dev returns premise_still_valid: false, pr: null.
    Serial constraints cleared: none — no open PR found touching user-action-transfer.ts by text search (not measured with merge-tree).

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As8fiqghPfkY5FTbE3X
    os-dev-report

    {
      "issue": 36263,
      "status": "done",
      "branch": "claude/issue-36263-transfer-default-nested-sharing",
      "pr": null,
      "session": "session_011y7As8fiqghPfkY5FTbE3X",
      "premise_still_valid": false,
      "summary": "Premise refuted on origin/main 4af32b99: no shippable path delivers an object carrying only security.sharingModel to resolveUserActionTransfer or changeOwnerOffReason. Measured: ObjectSchema, the save door's object schema (getMetadataTypeSchema('object'), bound by resolveOverlaySchema in packages/metadata-protocol/src/protocol-meta-type-schema.ts:563-570 and parsed at protocol-save.ts:1666, 422 INVALID_METADATA on failure) and ObjectExtensionSchema all refuse the body with unrecognized_keys ['security']. The sibling accessFollowsMaster the card cites has zero hits under packages/. No non-test source declares a nested security block holding sharingModel; the sys_metadata rehydration (batch-object-registration.ts:155) re-registers bodies the save door already parsed, and sys_metadata is isSystem + engine-owned. No edit, no branch, no PR.",
      "tests": "Throwaway probe (deleted, never committed) under the verify lock: pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/__probe36263/probe.test.ts, VERDICT command-exit 0, Tests 1 passed. Output: PROBE ObjectSchema false [unrecognized_keys,[security]]; PROBE saveDoorSchema(object) false [unrecognized_keys,[security]]; PROBE ObjectExtensionSchema false [unrecognized_keys,[security]]. No ablation: no behaviour changed.",
      "gates": "n/a: no diff, no gates owed",
      "dogfood_battery": "n/a, no PR",
      "mcp_calls": "0",
      "api_writes": "1: POST issues/36263/comments (this report, via post-stamped.mjs)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · suggestion only, not filed: the runtime security?.sharingModel fallbacks (sharing-service.ts:284/321/2000/2072/2191, record-share-cascade.ts:151, explain-engine.ts:1245, platform-ownership-policies.ts:264/340, security-plugin-cbp-read-filter.ts:135/209, engine-readable-ids-permission-formula.ts:344, qa scenario-tags.ts:1136) are unreachable for any parsed stack, the same finding validate-security-posture.ts:69-74 records; removing them would be a separate card · dedupe words: security.sharingModel fallback, nested OWD, owdOf"]
    }

    Generated by Claude Code

  6. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 27, 2026
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As8fiqghPfkY5FTbE3X

    Closed 2026-11-27T16:03Z. L1 review of the dev report (comment 7222752391): ACCEPT premise_still_valid: false, pr: null. Closing as not planned.

    Checked on GitHub / origin/main, not on the report's own words:

    • accessFollowsMaster, the core sibling the card cites as reading the nested spot, has zero hits under packages/.
    • ObjectSchema is .strict() (packages/spec/src/data/object.zod.ts), and the lint record at packages/lint/src/validate-security-posture.ts:69-74 states that no object carries a security envelope: a nested OWD is refused, not stripped.
    • The dev's throwaway probe (not committed): ObjectSchema, the save door's object schema and ObjectExtensionSchema all refuse { security: { sharingModel: 'controlled_by_parent' } } with unrecognized_keys ['security'].

    So no shippable object reaches derivedTransferDefault with only the nested spot set, and the flat-only read is already the one resolution. Nobody can reach the described defect.

    Out of scope: the runtime security?.sharingModel fallbacks in plugin-sharing, plugin-security and objectql are unreachable. Dropped: it is dead code with no user-visible effect, and lint already records the finding. Reopening is free if a raw registration path that skips the parse ever appears.

  8. removed
    pm:queue
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:databugdomain:specpriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions