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
change owner: a hand-away whose read-back is out of the caller's scope is answered 404 RECORD_NOT_FOUND (bulk lists it as failed), though the engine says the write landed #36258
Filing gate ① · Source: fleet · found by the #35270 review sweep (run records r03 S1, r04 S2) on PR #36154, re-read on main c30ce97
What happens
When someone hands a record away to another person with Change Owner, and the storage behind the object stops showing them the record once it is no longer theirs, the action answers "record not found" even though the hand-over succeeded. In a bulk hand-over the same record is listed as failed. The new owner is not notified for the single case. On the built-in SQL storage the record stays visible to the caller right after the write, so this does not show today; it shows on storage whose read-back applies the caller's row access (for example an OData-backed object).
packages/core/src/security/change-record-owner.ts:303-305 (single) and :363-365 (bulk) turn a null / undefined / 0 answer from engine.update into 404 RECORD_NOT_FOUND. The engine documents a null read-back after a by-id update as a write that landed and moved the row out of the caller's scope, naming this very case (packages/objectql/src/engine-update.ts:878-883: "reassigning owner_id away from yourself under an owner-scoped policy, reads back null while having succeeded. Reading either as 'not found' would answer 404 to a write that landed"). The engine refuses a missing row itself before the write. The unit doubles answer null for a missing row (change-record-owner.test.ts, change-owner-routes.test.ts), so the pins exercise a branch production never takes for that reason.
Done when
A null read-back is treated as moved (or existence is probed before the write, as protocol.updateData does): single answers 200 and notifies when asked; bulk counts the row under updated.
The test doubles throw RECORD_NOT_FOUND for a missing row, as the engine does.
Pins: (a) a double whose update resolves null for an existing row → single 200 + notify called, bulk updated: 1, failed: 0; (b) missing row → 404 from the engine's own throw.
Ablation: restore the written === null → recordNotFoundError branch and pin (a) goes red.
reach: public HTTP doors POST /api/v1/data/:object/:id/change-owner and POST /api/v1/data/:object/change-owner; live only on a driver whose read-back is row-scoped. Read from the code, not measured.
Business reason: a user who hands a record to a colleague is told it failed when it worked, may retry, and the colleague gets no notice.
Reader: area:data / domain:server (packages/core security, change-owner).
Dedupe: change owner / change-owner / readback null 404 → #35403, #35399, #35315 (console and hand-over cards, none carries this); 0 matches for the defect.
Grade: p3 — dead on the first-party SQL drivers today; wrong answer, no data loss.
Triage: lands in domain:server (change-owner doors) · pm:queue; rationale: area:data · Bug · a hand-away whose read-back falls outside the caller's scope answers 404 RECORD_NOT_FOUND after the write landed, so the caller reads a refusal for a done change. It is dead on the first-party SQL drivers today, read from code → p3 as filed (a wrong answer, no data loss) · size S. Linked under topic #36238.
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 · a hand-away whose read-back falls outside the caller's scope answers 404 RECORD_NOT_FOUND after the write landed, so the caller reads a refusal for a done change. It is dead on the first-party SQL drivers today, read from code → p3 as filed (a wrong answer, no data loss) · size S. Linked under topic #36238.