Repository navigation
docs(adr): ADR-0142 D4 says which claimant hears 409, 404 or 403 when two claim at once (#39223) - #39233
docs(adr): ADR-0142 D4 says which claimant hears 409, 404 or 403 when two claim at once (#39223)#39233objectstack-fleet[bot] wants to merge 3 commits into
Conversation
… the queues page with it Ruling B of record 7363773549: 409 CONCURRENT_UPDATE goes to a claim whose check read the record unowned and whose write then found it taken; a claim judged after the owner is set is answered as any request is at that moment, 404 where the caller cannot read the record and 403 where it can. "Exactly one owner" is the invariant. Status codes, messages and the gate are unchanged. - ADR-0142: status line, a dated note in D4 and one in D9's Codes bullet. - queues-and-assignment-rules.mdx: the "Only one person wins" paragraph and the checklist bullet for code that claims. Claude-Session: https://claude.ai/code/session_01Utp6CXA7kUkccMCRG2nBfJ Co-authored-by: Claude <noreply@anthropic.com>
The 404 on a private object is what a member whose only basis was the queue is told; 404 is also a deleted record's answer and 403 a never-admitted claim's. The queues page says the same about the private object. Claude-Session: https://claude.ai/code/session_01Utp6CXA7kUkccMCRG2nBfJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-bill · os-bill · session_01Utp6CXA7kUkccMCRG2nBfJ Contract-review-claim: Taking the contract-tier review of this head, as the seat asked of this card thread. The thread drafted the diff, so it does not judge it: one isolated reviewer at the tier renders the record, and the thread posts it as written, as the next comment here. The seat adopts it or not. Below is the filled brief the reviewer is handed, for the seat to read first. Generated by Claude Code |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CXA7kUkccMCRG2nBfJ Contract reviewServed-tier: The amendment says what ruling record 7363773549 ruled, and the invariant and the three statuses hold on Read: card #39223 with its three comments, ruling record 7363773549 and analysis 7361680320, PR #39233 (body, file list, its one comment), the net diff against 440331f, both files at the head, the cited code on The changed hunks teach permission and visibility behaviour that the two path names do not show: what the write gate answers for a record the caller cannot read, and when the transfer grant turns a claim into a transfer. The security line above therefore reads yes, and the adopting seat adds the ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe ADR, the one
The docs page, sentence by sentence against the amended ADR and Card acceptance: met on all three lines, S2 aside. No must-fix. S1 (should-fix) — "who gets which" leaves out a claim the owner overtakes between the request's own checks, and One request reads the record at several points, and the owner can be set between any two of them:
For a record that exists, only the row check answers 404 and only the conditional write answers 409. So a claim that passed the row check while the record was unowned is refused 403 by whichever gate reads next after the owner is set: On a What stands: one owner, and every answer is 409, 404 or 403. The ruled set and term (5)'s assertion are intact, and nothing here is a fork under the ruling's ban. This is read from the code, not run. Remedy, inside term (2): one sentence in the D4 note, mirrored in D9 and on the page, saying that a claim the owner overtakes between those checks is refused 403 by the next gate that reads the record, whether or not the caller can still read it, and by the sharing gate under S2 (should-fix) — the page's last sentence of the passage gives 403 for a claim that the default sharing model answers 404. The sentence, page line 147 at the head: "A claim refused while the record is still unowned — the sharing model does not admit you to it, or the update is not a single-record claim of your own — is Remedy, on the prose face: scope the sentence to a record the caller can read, and say that one it cannot read answers 404 as above. N1 (nit) — D4 note, "403 what a record the caller was never admitted to claim answers": true where the caller can read that record; where it cannot, the answer is 404 by the bullet above. Fold "or 404 where the caller cannot read it" into the edit S1 makes to that paragraph. N2 (nit) — page checklist, line 176 at the head: the two-claims test holds for claimants without the transfer grant, for the reason the page's own "One caller is outside this" paragraph gives. Say so in the bullet. Prose face. N3 (nit, follow-up card) — N4 (nit, accepted deviation) — page, line 149 at the head, "when someone beats you to it, it says so": true of the Console's 409 path only, as it was before this diff. The Console work of term (3) on the claim-race card carries it. Open on this head: S1 and S2. Each is owed a delta review of its edit before landing. Implemented-by: VERDICT: PASS Generated by Claude Code |
…checks Contract review round 1 on the pull request, findings S1 and S2 with nits N1 and N2. A request reads the record at the row check, in the ownership step and in the sharing gate; a claim overtaken between two of them is refused 403 by the later check, also where the caller can no longer read the record, and from the sharing gate under FORBIDDEN. D4 and D9 say so, and the queues page tells readers to key on the status. The page's sentence on a refused claim of an unowned record now gives 404 for a record the caller cannot read, and the two-claims test is scoped to claimants without the transfer grant. The note's "one claim lands" is scoped the same way: a holder of the grant does not go through the conditional write. Claude-Session: https://claude.ai/code/session_01Utp6CXA7kUkccMCRG2nBfJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-bill · os-bill · session_01Utp6CXA7kUkccMCRG2nBfJ Contract-review-claim: Delta review of this head. Record 7365351117 left S1 and S2 open on Generated by Claude Code |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CXA7kUkccMCRG2nBfJ Contract reviewServed-tier: Delta review of the one commit that moved the head from 11a12bd, by the reviewer of record 7365351117. Both findings that record left open are closed: in each case the new text says what Read: record 7365351117, which reads on the PR as rendered; the delta from 11a12bd to this head (two files, 22 lines added and 8 removed) and both files at this head; the PR body as edited; the two comments since that record, 7365627006 on the PR (this round's brief) and the dev report 7365657346 on card #39223; the cited code on The delta adds to what the hunks teach about permission and visibility: a refusal for a record the caller can no longer read, the second code the sharing gate puts beside 403, and who stands outside the one-claim promise. The security line above reads yes again, and a yes is meant. The ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed. S2: closed. S1 against
Read from the code, not run. N5 and N6 are the two places where the wording is looser than the code. S2 against The nits of record 7365351117:
"One claim lands", said of callers without the transfer grant (head lines 451 to 453, and the test rule at 483): right, on two grounds read in the tree.
The scope says nothing about a grant holder on an unowned record beyond leaving them out. The Status segment and the "One owner" paragraph are untouched; what the latter says of a grant-holding claimant is the open question in ③. The page against the amended ADR: line 145 says what D4's paragraph says, line 149 agrees with the 404 bullet and with D4's closing sentences, and line 178 with D4's test rule. The page's promise at line 137, "it ends with exactly one owner", is true of every caller. The execution plan is untouched. Card acceptance: still met on all three lines. No must-fix, no should-fix. N5 (nit, accepted deviation) — D4 note, "again in the ownership step": true where a write-class row filter binds the caller, whose row check is the re-read at 1668 to 1673. Where none binds (the arm at 1721 to 1737), the row check's read is the caller pre-image kept for the operation ( N6 (nit, accepted deviation) — D9 note, "is refused 403 by the check that finds the owner set": D4's paragraph is conditional, "a later check that then refuses it", and that is the exact form. A claimant who keeps edit once the owner is set (an N5 and N6 sit in the ADR, where an edit moves the head past this record. Left as they are; fold them in if the head moves for another reason. N7 (nit) — page line 149, "the sharing model gives you no edit on it": narrower than the gate. A caller who can read and edit the record with no positive basis from the sharing model (an object whose default gives everyone edit, where the sharing service abstains) is refused 403 as well: the claim case asks for N8 (nit) — page line 145, "Read the status, not the code.": right for a claim, where every answer in the set gets one handling and the two codes are one refusal. It sits beside the API guide's general rule, "Branch on Implemented-by: VERDICT: PASS Generated by Claude Code |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 维护者速读
席位核对ACCEPT · head
|
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 维护者速读
Review requested · 2026-12-03T02:58Z · Tier H ( |
Requested by Bill · project thread
Fixes #39223
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Two files, 65 lines added and 3 removed. This is ruled term (1) of ruling record 7363773549 (letter B) on the claim-race card #39065: what ADR-0142 D4 promises about two claims made at once is written out as ruled. No code, spec schema, status code, message or gate changes, which is ruled term (2).
ADR-0142, three places.
Status line. One new
Amendedsegment dated 2026-12-03. It cites the ruling record and points at the notes in D4 and D9, as each earlier amendment of this record did.D4, a dated note after the "One owner" paragraph. It says:
CONCURRENT_UPDATEgoes to a claim the gate admitted (its check read the record unowned and the precondition was set) whose write then matched nothing.RECORD_NOT_FOUNDwhere the caller cannot read the record, which on aprivateobject is what a member whose only basis was the queue is told; 403PERMISSION_DENIEDwhere the caller can still read it.PERMISSION_DENIEDfrom the ownership step,FORBIDDEN(the ledger's wire synonym for it) from the sharing gate. The split of 404 from 403 is exact for a claim whose every check runs after the owner is set. (Review finding S1.)The existing paragraphs of D4 are untouched.
D9, the Codes bullet. A dated note appended inside the bullet: "a lost claim race" is the case D4's note defines; a claim judged after the owner is set carries the existing
RECORD_NOT_FOUND404 orPERMISSION_DENIED403; a claim overtaken between its own checks is refused 403 underPERMISSION_DENIEDorFORBIDDEN; no code is added, renamed or re-registered.The queues page (
content/docs/automation/queues-and-assignment-rules.mdx), two places.privateobject and its 404 included), a paragraph telling the reader to treat all three as one answer and not to expect409in particular, a paragraph saying the line between404and403is not sharp and that the status, not the code, is what to read (S1), one sentence on a caller who holds the transfer grant, and the paragraph's former last sentence ("any other refusal is 403") rewritten for what it was about, a claim of a record that is still unowned:404if the caller cannot read the record,403if it can and the gate does not admit the claim (review finding S2).409,404or403straight after a claim means "no longer available": reload. A test of two claims at once, by users without the transfer grant, asserts exactly one owner and a refusal from that set.Tests
None added and none owed: the diff is prose in one design record and one docs page and changes no behaviour, so there is nothing to ablate. A live check is not owed either: the diff changes no MCP tool text or result, no
skills/**file, no dataset behaviour and not the package doc tools.The ruling's premise clause orders premises 1 to 3 and 5 of the analysis (comment 7361680320) re-read before writing. Read on
origin/mainat 440331f:grep -n "CLAIM — an unowned record" packages/plugins/plugin-security/src/security-plugin-authz-middleware.tsanswers line 2245. The branch under it is entered only when the pre-image, read under the caller's own sight, has an emptyowner_idand the payload names the caller. Only there is the precondition set: the file assignswritePreconditiononce, at line 2256.recordNotFoundErrorwhere the caller cannot read the addressed row (the block under the comment at line 1640, "a row the caller cannot READ is a row that does not exist"), andPermissionDeniedErrorwith therecord_access_deniedsentence where the caller can read it and may not write it.packages/core/src/utils/record-not-found.tssets codeRECORD_NOT_FOUNDand status 404.grep -n "detail.claimFailed" ui/packages/app-shell/src/views/RecordDetailView.tsxanswers line 2610, and the re-read after every claim answer (notifyDataChanged) is line 2615.ui/packages/plugin-detail/src/queueClaim.tssendsowner_idalone, so a claim leaves the home queue set (its comment at lines 180 to 183), and the gate's insert branch admits a member's owned record that names a queue (lines 2130 to 2137 of the middleware file).Readings behind the review fixes (S1, S2), on
origin/mainat 440331f. Read, not run.start()(registerAuthzMiddleware,packages/plugins/plugin-security/src/security-plugin.tsline 2438) and the sharing middleware in akernel:readyhandler (packages/plugins/plugin-sharing/src/sharing-plugin.tsline 927).registerMiddlewareappends and the chain walks the list in order (packages/objectql/src/engine-middleware-and-context.ts). So a by-id write meets the row check, then the ownership step, then the sharing gate, then the write.nulland falls through todenyOwnerWrite, aPermissionDeniedError; the comment abovepreImagesays so ("a caller who can't read the row gets null → deny").admitsByIdWritereads the row again when it runs (canEdit, thenreadWriteVerdictRowsinsharing-service.ts), and the refusal after it sets codeFORBIDDENand status 403 (sharing-plugin.ts, lines 1689 to 1696).packages/spec/src/api/error-code-ledger.zod.tsregistersFORBIDDENwithshadows: 'PERMISSION_DENIED', "Pre-gate synonym on the wire".recordNotFoundErrorand one it can read and may not write with the record-levelPermissionDeniedError, both before the ownership step. The claim refusal whose message names the failed condition (CLAIM_REFUSAL) is the ownership step's.Acceptance notes
mainanswers in that case. S2: the page gave 403 for a refused claim of an unowned record, where a caller who cannot read the record hears 404; the sentence is rewritten. Nits N1 and N2 are taken in the same edit. N3 (the published data skill still teaches "the loser gets 409") and N4 (the Console sentence) are not for this pull request; the seat has both.hasTransferGrant()at line 2220). Without the clause, "404 or 403" would be false for that caller. So the D4 note says so in one clause, and the queues page in one sentence ("One caller is outside this"). Struck, the three answers would read as applying to every caller.docs/adr/README.mdis unchanged (adr-index --reportreads it as current).maindoes not have yet.docs/adr/**is Tier H:check-governed-merges.mjs --branch HEADreads "landing tier: H". The diff replaces three lines, so it is not an add-only note.skip-changeset: no package shipsdocs/adrorcontent/docs(no package'sfilesreaches either tree, and no build script copies a docs page into a package).modifyAllRecordscoverstransfer) carries noowner_id: nullprecondition. D4's first paragraph puts the claim case "ahead of the grant check" and namesmodifyAllRecordsamong the claimants. If two such callers claim at once, the reading is that both are answered 200 and the later write decides the owner: one owner still, and neither caller is told. This diff takes no side on it: both of its statements about the grant holder concern a record that already has an owner, where the ADR and the code agree. The seat has handed it to the pin work under claim 7363867578. The zone's measurement, as the seat relayed it: amodifyAllRecordsholder who claims after a member's claim has committed gets 200 and the owner moves; anallowTransfer-only holder without row access gets 404 on aprivateobject and 403 on apublic_readone, and the owner stays. Both agree with "a caller who can edit the record and holds the transfer grant".Verification
Read first, by risk.
docs/adr/0142-ownership-queue-membership-claim-and-assignment-rules.md, the D4 note: the three bullets and the two paragraphs under them, against ruling record 7363773549. The risk is a sentence that says more, or less, than the ruling.content/docs/automation/queues-and-assignment-rules.mdx, the transfer-grant sentence and the last sentence of the rewritten passage: the two places where the page says something the ruling does not spell out.Two-minute check.
git diff --numstat origin/main...origin/claude/project-thread-ohljq3prints two rows:14 2for the queues page and51 1for ADR-0142. In the Files changed tab, the rich diff of ADR-0142 shows the new note between the "One owner" paragraph and "Release".Local gates. Derived with
node scripts/pm/dispatch-gates.mjs --commandsfrom this branch against merge base 440331f: 49 commands. All 49 ran again at head 37e9d22, each exit code captured before any pipe, and--ranreconciles them.Reconciliation and the 49 exit codes, objectstack at 37e9d22
Verdict lines of the gates that read the two edited trees, objectstack at 37e9d22
Two builds ran before the twelve gates that read built packages
check:docs-transcript-drift, the two@objectstack/lintdoc gates, the seven@objectstack/specgates,check:docs-spec-enumerationsandcheck:skill-identifier-livenesswere run after two builds under the verify lock:pnpm exec turbo run build --filter='@objectstack/lint...' --concurrency=2(VERDICT command-exit 0, 5 tasks, 93 s) andpnpm exec turbo run build --filter='@objectstack/client-react...' --concurrency=2(VERDICT command-exit 0, 47 tasks, 209 s). Before the first buildcheck:docs-transcript-driftanswered exit 3 (prerequisite not met, nothing measured); the builds changed no tracked file. They were made at head 11a12bd and were not repeated for 37e9d22, which changes only the two prose files.CI. On the first head, 11a12bd: 56 check runs, 30 success, 26 skipped, none failed. On 37e9d22: NOT MEASURED when this was written, reason: the check runs start at the push. The families the derivation leaves to CI (the type-check lanes, the whole-root scans, the scheduled audit) are CI's to run.
Generated by Claude Code