Repository navigation
Description
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv
Filing gate ① · Source: fleet · found by the #35270 review sweep (run records r03 M1, r04 S4) on PR #36154, re-read on main c30ce97
What happens
Change Owner can tell the user a record moved, and tell the named person "a record was assigned to you", when the record did not move. This happens when the object locks the owner field under a condition (for example "owner is read-only once the case is closed"): the platform quietly skips the locked field and the action still reports success. The answer is built from what was asked, not from what was saved. The same pattern reports notified: true whenever the messaging call returns, even when nothing was delivered (topic muted, channel unavailable).
packages/core/src/security/change-record-owner.ts:302/:362:engine.update(object, changeSet, { where: { id }, context })with neitherstrictReadonlyWritesnoronFieldsDropped.:306-310(single) and:348-357(bulk):ownerId/queuecopied from the request; any non-throwing update counts as moved.- The engine strips a caller key that a TRUE
readonlyWhenlocks and answers the stored row (engine-update.ts,everyCallerKeyDropped:480;strictReadonlyWritesdocumented:345-372, read:437). Only a staticreadonly: truemakes an object ineligible for Change Owner, so a conditional lock is reachable from metadata alone. - Queue target: only
queuelands, the owner stays, the receipt saysownerId: null. notified::259-279returnstrueafterawait messaging.emit(...)without reading its result;service-messaging/src/messaging-service.ts:244-251documents the delivered / enqueued counts that say whether anything went out.
Done when
- Each owner write passes
strictReadonlyWrites: true(a strippedowner_id/queuebecomes that row's refusal with its own code), or the written row is compared with the target and a mismatch is a failure. notifiedis true only when the emit result reports a delivered or enqueued row.- Pins: an object with
owner_id.readonlyWhentrue for the record → single answers a refusal (not 200), bulk lists the row underfailures, no notification sent; a queue-target case whereowner_idis stripped; an emit that resolves with zero delivered/enqueued →notified: false. - Ablation: drop
strictReadonlyWritesfrom the update options and the readonlyWhen pin goes red.
reach: public HTTP doors POST /api/v1/data/:object/:id/change-owner and POST /api/v1/data/:object/change-owner plus the client's data.changeOwner / changeOwnerMany; reachable from ordinary field metadata. Read from the code, not measured.
Business reason: users and admins are told ownership changed when it did not, and a colleague is told a record is theirs that is not — work falls through the cracks with no error to notice.
Reader: area:data / domain:server (packages/core security, change-owner).
Dedupe: change owner, owner readonlyWhen, notified emit → #35403, #35399, #35315, #35802 (none carries this); 0 matches for the defect.
Grade: p2 — false success and a false notification on a shipped door, reachable from metadata; no privilege gained.
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(change-owner doors) ·pm:queue; rationale: area:data · Bug · when areadonlyWhenlock keepsowner_idunchanged, the door still answers 「moved」 and notifies the new owner: a false success and a false notification on a shipped door, reachable from metadata. No privilege is gained → p2 as filed · size S. Linked under topic #36238.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Claim: PM loop round 1
Session:
session_011y7As6FyXmJyGyHNKXUkV7Account:
os-aliceBranch:
claude/issue-36259-change-owner-readonly-whenWorktree:
objectstack-issue-36259Domain:
domain:serverSeat:
repo:objectstack#7Area:
o7-dataFile surface:
packages/core/src/security/change-record-owner.ts and its tests, packages/rest/src/change-owner-routes.ts tests, one .changeset file(stop on breach; explain in the report)Container & model:
S,mode:subagent,model: default (dispatch-gates --tier: "no path-derived mandate"),effort: highClause-②: no
Metadata-protocol: none
Responsibility:
objectstack (packages/core/src/security/change-record-owner.ts builds the answer from the request, not the stored row) | the engine's strictReadonlyWrites option already covers it, unused here | any Change Owner caller on an object with a conditional owner_id lock; reachable from metadataThread-read: 7074396763
Premise: holds (origin/main 3cf6a44: the two engine.update calls carry neither strictReadonlyWrites nor onFieldsDropped; notifyNewOwner returns true after await messaging.emit without reading its result)
Pre-claim lane: repo:objectstack#7 · o7-data — packages/core/src/security/** is an o7-data path root on #35557
Pre-claim deps: no Blocked-by and no "after #N" on the card; open PR #36525 (#35315 cascade, draft) edits the same file, judged by overlap-check before each push
Prior rulings read: check-prior-rulings --card 36259: 5 hit lines in change-record-owner.ts, all the #35315 rulings 7000556646 / 7000907189 (object eligibility, the transfer grant, bulk per-row reporting); none rules on readonlyWhen or the notified flag; the fix keeps per-row reporting
Serial constraints cleared: open PR #36525 (claude/issue-35315-change-owner-cascade) shares packages/core/src/security/change-record-owner.ts — overlap-check before each push, the later lander merges; os-verify-lock depth 1 · go
Fold-or-serial: not folded — no other o7-data card shares this defect or file
objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
os-dev-report
{ "issue": 36259, "status": "needs_decision", "branch": "claude/issue-36259-change-owner-readonly-when", "pr": "https://github.com/objectstack-ai/objectstack/pull/36683", "session": "session_011y7As6FyXmJyGyHNKXUkV7", "premise_still_valid": true, "summary": "Premise held on origin/main 3cf6a44b: both engine.update calls carried neither strictReadonlyWrites nor onFieldsDropped, and notifyNewOwner returned true after await emit. Every owner write (single and bulk) now goes through writeOwner: a by-id update under the caller's context with strictReadonlyWrites: true; the engine's refusal of a readonlyWhen-locked owner_id/queue is answered as the row's own 403 FIELD_NOT_ACCESSIBLE naming the column (single throws, bulk lists the row under failures, no notice names it; a queue target changes neither key). notified is true only when the emit answer reports delivered > 0 or enqueued > 0. Measured on the way: the engine's bare ERR_READONLY_FIELD_REJECTED carries no status, and the /data classification answered it 404 OBJECT_NOT_FOUND (message heuristic), so the mapping lives in core and no route code changed. The #35315 rulings stand (per-row by-id updates, every failure with its row id in the existing report shape, row cap unchanged). One open item: check:error-status-conformance goes red because FIELD_NOT_ACCESSIBLE is now pinned at 403 while still listed in scripts/error-status-unpinned-baseline.json; the gate's --update is marked MAINTAINER-ONLY and this session's classifier refused the run, so the baseline is untouched (see open_questions).", "tests": "head ed59773d32: `pnpm --filter @objectstack/core test` -> Test Files 156 passed (156), Tests 3714 passed (3714); `pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/change-owner-routes.test.ts` (after `pnpm --filter @objectstack/core build`; the rest suite reads core's dist/) -> Test Files 1 passed (1), Tests 18 passed (18), incl. 4 pins over a REAL ObjectQL + SQLite :memory: with owner_id.readonlyWhen: single 403 FIELD_NOT_ACCESSIBLE with the stored owner unchanged and no emit, bulk failure row + only the open rows notified, queue target with owner and queue unchanged, zero delivered/enqueued -> notified false. `pnpm --filter @objectstack/core typecheck` and `pnpm --filter @objectstack/rest typecheck` exit 0. Ablation at 36b626db94 (lock VERDICT command-exit 0): scripts/ablation-replace.mjs anchor `const OWNER_WRITE_OPTIONS = { strictReadonlyWrites: true } as const;` x1->x0, replacement x0->x1, blob 3078e5bd8d6f->7ea0d78d9da5; core rebuilt; ablation-dist-preflight --absent: marker absent from all 20 built files; core suite 6 failed / 23 passed, rest suite 6 failed / 12 passed (every readonlyWhen pin red incl. the three real-engine ones). Restore: blob == HEAD 3078e5bd8d6f, git diff HEAD empty; core rebuilt; preflight: marker present in 2 built files; both suites green.", "gates": "Local derived set (dispatch-gates --commands, 4 paths vs merge base 9348f02b9, head ed59773d32): 65 families, --ran reconciliation `65 derived, 64 run, 1 NOT-MEASURED`. All exit 0 except: `pnpm check:error-status-conformance :: exit 1` (FIELD_NOT_ACCESSIBLE: baselined as unpinned, but a producer now declares its status, ratchet the baseline down with --update; maintainer-only ratchet, see open_questions); `node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3` NOT MEASURED, reason: shallow clone cannot reach its pinned positive-control commit (PREREQUISITE NOT MET). `pnpm --filter @objectstack/spec run check:error-code-provenance` was red at an intermediate head (a constdef stamp of ERR_READONLY_FIELD_REJECTED in core), fixed by reading the code inline, exit 0 at head. overlap-check: exit 1 on every run (#36525 shares change-record-owner.ts; after moving my hunks one textual conflict remains, on the single-record update line). PR #36683 check-runs at ed59773d32 when this was written: Lint (ESLint, CI/release/engine gates, PM dispatch-gates, docs & code guards, repo & tooling gates, scoped x3), Type Check (workspace, source gates, consumer gates, debt ledger), Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, filter, Flag docs affected: in_progress; opt-in/queue/borrowed/schedule checks: skipped. Expected red in CI: the job that runs check:error-status-conformance.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /repos/objectstack-ai/objectstack/issues/36683/assignees, one stroke); os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/36259/comments). git push x5 not counted (not REST).", "open_questions": [ { "question": "check:error-status-conformance is red: FIELD_NOT_ACCESSIBLE is now pinned at 403 by this PR's producer but still listed in scripts/error-status-unpinned-baseline.json. The gate's --update is marked MAINTAINER-ONLY and was refused in this session. How should the row go?", "options": [ "A: the maintainer (or a seat they authorise) runs `node scripts/check-error-status-conformance.mjs --update` on this branch, removing the one FIELD_NOT_ACCESSIBLE row (shrink only; docs already publish 403 for it). Cost: one maintainer stroke, no code change.", "B: answer the lock as 403 PERMISSION_DENIED (already pinned) instead. Cost: small code+test change, no baseline edit; but the console can no longer tell a locked owner from a missing transfer grant, which the owner guard already answers PERMISSION_DENIED.", "C: answer the engine's own ERR_READONLY_FIELD_REJECTED with a declared status. Cost: a provenance row under @objectstack/core in packages/spec error-code-ledger.zod.ts (spec + ledger edit, outside the file surface) and a fresh status pairing for that code." ], "recommendation": "A, because FIELD_NOT_ACCESSIBLE/403 is the pairing the record-file door already answers for the same engine refusal, the docs publish 403 for it, and the remaining step is a mechanical shrink of a census row." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — the shared classifier (packages/types/src/data-error-classification.ts, looksLikeUnknownObject) answers any bare ERR_READONLY_FIELD_REJECTED as 404 OBJECT_NOT_FOUND because the engine's message quotes the object name and contains 'not'; measured through the change-owner door at intermediate commit c3a65531a; no public door passes strictReadonlyWrites after this PR, so no public reach (PR Acceptance notes 2)", "carrier: #36525 · noted, not filed — its cascade child update is a second owner write that will need OWNER_WRITE_OPTIONS once both land; the later lander carries it (PR Acceptance notes 3)" ], "deviations": "overlap-check was not run before the first push (c3a65531a) nor before the push of 26eff9823e (a manual merge-tree against #36525 stood in for the second); it was run before the other pushes and answered exit 1 each time. The rungates loop lost stdin on its second pass and skipped 24 families; they were re-run with stdin closed and are in the reconciliation above. Surface: no file outside the claimed surface was changed; the stale baseline row is left for the decision above.", "files_changed": [ "packages/core/src/security/change-record-owner.ts", "packages/core/src/security/change-record-owner.test.ts", "packages/rest/src/change-owner-routes.test.ts", ".changeset/36259-change-owner-answers-what-was-saved.md" ] }objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Serial note · 2026-11-23T11:24Z · PR #36683 (this card) stays draft.
overlap-checkanswers exit 1 against open draft PR feat: Change Owner cascade, transferBehavior on a relationship, ticked in the dialog #36525 (claude/issue-35315-change-owner-cascade, console: the default record form never renders owner_id, and the console has no Change Owner action, so an object without an authored form cannot be reassigned #35315): one textual conflict on the single-recordengine.updateline ofpackages/core/src/security/change-record-owner.ts. fix(core)!: change owner answers what was saved when the owner or queue is locked, and notified reads the emit answer #36683 queues behind feat: Change Owner cascade, transferBehavior on a relationship, ticked in the dialog #36525. Seat 7 has knocked seat 2 (Notify: serial). Whichever lands second carries the conflict, plus the cascade child update'sOWNER_WRITE_OPTIONS(PR fix(core)!: change owner answers what was saved when the owner or queue is locked, and notified reads the emit answer #36683 Acceptance notes 3).needs_decisionon theFIELD_NOT_ACCESSIBLErow ofscripts/error-status-unpinned-baseline.json(os-dev-report 7099512890), with the maintainer through the seat.--updateis not run and route B is not taken until it is answered.chore(error-status): drop FIELD_NOT_ACCESSIBLE from the unpinned base…
objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
Ruling · 2026-11-23T14:17Z · on the dev report 7099512890 open question (the unpinned-baseline row). The maintainer (Alice) chose option A on the seat's decision card in the fleet project at 2026-11-23T14:14Z, card text verbatim: 「允许座位删掉错误状态基线里 FIELD_NOT_ACCESSIBLE 这一行吗?」 → 「允许,座位执行 --update」.
node scripts/check-error-status-conformance.mjs --updateonclaude/issue-36259-change-owner-readonly-when, one row removed (FIELD_NOT_ACCESSIBLE), shrink only, commit00ca61b93468c4d2a5c77e0330489e82171a3b33; the gate reads green locally at that commit.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
os-dev-report
{ "issue": 36259, "status": "done", "branch": "claude/issue-36259-change-owner-readonly-when", "pr": "https://github.com/objectstack-ai/objectstack/pull/36683", "session": "session_011y7As6FyXmJyGyHNKXUkV7", "premise_still_valid": true, "head": "c32cb7bd84657541b7abbbf52f9efc45f2ac819d", "summary": "Patch round on L1-a REWORK 7103895155 and the contract review PASS 7104020664 section 2, text only, no code change. Worktree recreated from origin at the seat's 00ca61b934 (baseline shrink, maintainer option A, ruling 7103795578); two commits on top, no force-push: 4cd6965999 (changeset declares the narrowing) and c32cb7bd84 (changeset banner names both halves and the caller's fix; content/docs/api/data-api.mdx and the FIELD_NOT_ACCESSIBLE entry of error-catalog.mdx updated, 10 insertions / 3 deletions). Changeset and PR body carry `Clause-②: no (narrowing: ...)`, a BREAKING banner in two halves, (a) both doors refuse a record whose owner_id or queue is locked, read-only or under a holding readonlyWhen, with 403 FIELD_NOT_ACCESSIBLE / a failures row where they answered success, notified false where no delivery or outbox row was taken, (b) a custom ChangeOwnerMessaging.emit must return { delivered, enqueued }, with FROM / TO / the caller's fix, and the adr-0087 marker `not-required (no-migration-prescription)`. The PR body adds `Skills-docs: updated here` and drops the stale baseline/red-gate text. PR title now `fix(core)!: ...`, set through relay issue_patch with the signed trailer as the last non-empty line. Before editing: origin/main 0d727b7071 re-fetched, #36674 still open and unmerged, merge-tree of the head against origin/main clean, so no rebase was needed. The PR stays draft; nothing armed or enqueued.", "tests": "No code change since ed59773d32 (core test 156/156 files, 3714/3714 tests; rest change-owner-routes 18/18; core and rest typecheck exit 0; ablation at 36b626db94, all in the earlier report and the PR body). The dogfood battery ran at the final head, see dogfood_battery.", "gates": "Local at c32cb7bd84: `pnpm check:adr-0087-registration :: exit 0` ([BREAKING+bang+clause-②-narrowing] not-required (no-migration-prescription)); `node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0`; `node scripts/check-adr-0087-registration.mjs --self-test :: exit 0`; `node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0`; `node scripts/check-empty-changeset.mjs --base origin/main :: exit 0`; `pnpm check:error-status-conformance :: exit 0`; `pnpm check:doc-authoring :: exit 0`; `pnpm check:nul-bytes :: exit 0`; `pnpm check:issue-citations :: exit 0`; `node scripts/docs-audit/check-affected-docs.mjs :: exit 0`; `node scripts/docs-audit/check-drift-comment.mjs :: exit 0`. The 41 families the docs paths newly derive: 40 exit 0 (incl. spec check:docs, check:liveness, check:yaml-examples, check:doc-anchors, check:docs-transcript-drift after the build); `pnpm --filter @objectstack/spec run check:skill-examples :: exit 3`, NOT MEASURED locally, reason: the client SDK packages are not built in this tree (PREREQUISITE NOT MET). The 65 code-path families were read at ed59773d32 (64 exit 0, 1 NOT MEASURED, the teardown self-test on a shallow clone); the code paths are unchanged since. overlap-check before each push: exit 1 (conflicts with #36674 and #36525, which both also share data-api.mdx). PR #36683 check-runs at c32cb7bd84 when this was written: 60 success incl. all eleven required (Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Lint UI shards via Lint ·, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate), 12 skipped, 0 failed; Check Changeset and PR-body guards re-running in_progress after the body edit (their earlier runs at this head: success).", "dogfood_battery": "c32cb7bd84 · `pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build` VERDICT command-exit 0, then `pnpm --filter @objectstack/dogfood test` (no OS_TEST_SHARD, no path) VERDICT command-exit 0 · held the lock 1850s · Test Files 487 passed, 3 skipped (490) · Tests 4121 passed, 68 skipped (4189) · no failure", "mcp_calls": "0", "api_writes": "this round 2 — relay issue_patch on #36683 (PATCH /repos/objectstack-ai/objectstack/issues/36683, title + body, read back byte-identical 10238 bytes); os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/36259/comments). Earlier round 2 (pr_create stroke, report comment 7099512890). git push x2 this round, not REST.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — the shared classifier (packages/types/src/data-error-classification.ts, looksLikeUnknownObject) answers any bare ERR_READONLY_FIELD_REJECTED as 404 OBJECT_NOT_FOUND; no public door passes strictReadonlyWrites, so no public reach (PR Acceptance notes 2)", "carrier: #36525 · noted, not filed — its cascade child update is a second owner write that will need OWNER_WRITE_OPTIONS once both land; the later lander carries it (PR Acceptance notes 3)" ], "deviations": "Pushed twice this round, not once (4cd6965999 for the first coordinator message, then c32cb7bd84 for the additions that arrived while dogfood was queued); both fast-forward, no force-push. The first dogfood attempt (at 4cd6965999) never acquired the lock (queue-timeout 99 behind another agent's battery) and was stopped by its recorded pid; a later attempt died mid-build at the usage-limit stop and was restarted; the battery that counts ran in full at c32cb7bd84. The earlier report's `status: needs_decision` is resolved by ruling 7103795578 (option A), so this report is `done`.", "files_changed": [ "packages/core/src/security/change-record-owner.ts", "packages/core/src/security/change-record-owner.test.ts", "packages/rest/src/change-owner-routes.test.ts", ".changeset/36259-change-owner-answers-what-was-saved.md", "content/docs/api/data-api.mdx", "content/docs/api/error-catalog.mdx", "scripts/error-status-unpinned-baseline.json (the seat's commit 00ca61b934)" ] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Delivered · 2026-11-24T00:14Z · PR #36683 merged 2026-11-23T21:48Z (L1-a ACCEPT 7112481068, contract review PASS 7112452212, approved and enqueued by os-zhuang for the declared narrowing). Change Owner now refuses a locked
owner_id/queuewith403 FIELD_NOT_ACCESSIBLE(single door) or afailuresrow (bulk door) instead of answering success, andnotifiedis true only when a notice was delivered or enqueued. The classifier follow-up is #36731. #36525 and #36674 rebase on this merge.pm:dispatchedis removed with this note.sweep-closed-cards --pr 36683: this card is the only one the merge closed.