Repository navigation
fix(console): a claim answered 404 or 403 says the record is no longer waiting; race pins per ruling B - #39238
Queued
objectstack-fleet[bot] wants to merge 7 commits into
Queued
objectstack-fleet[bot] wants to merge 7 commits into
objectstack-fleet[bot] wants to merge 7 commits into
Conversation
…ilable (red first) Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
…no longer waiting, and reloads Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
… ahead of one claimant Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
…ne owner and a loser answered 409, 404 or 403 Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
…onger waiting Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
…ce (contract review 7365351117) Claude-Session: https://claude.ai/code/session_01Utp6CYUove7YBXgHy4iEsr Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr 维护者速读
席位核对ACCEPT — head
|
objectstack-fleet
Bot
added this pull request to the merge queue
Dec 3, 2026
Any commits made after this event will not be merged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr
Fixes #39065
Ruling-ref: 7363773549
Clause-②: no
Metadata-protocol: none
Skills-docs: follow-up #39242
维护者速读
What changes
Ruling B on #39065 (record 7363773549): exactly one owner is the invariant; a losing claim whose gate read the record unowned answers
409 CONCURRENT_UPDATE, and one whose gate runs after the winner's commit gets what any request gets then,404(private) or403(public_read). Status codes, messages and the ownership gate are unchanged. The ADR note is carried by #39223; this PR is ruled term (3).claimQueuedRecord(@object-ui/plugin-detail) reports a404or403as a new outcome,unavailable, where it reportedrefused. The record page shows one sentence for it, "This record is no longer waiting to be claimed.", and re-reads the record, as it does for a409. The sentence names no claimant, because a404is also what a deleted record answers. The keydetail.claimUnavailableis added to all 11 shipped locales.ownership-claim-race-sqlite.test.tsnow states the ruling: one owner always;409for a loser whose gate read the row unowned;404/403for one whose gate ran after the commit. The five lockstep cells still pin the409. Two new cells (private,public_read) put one real I/O tick ahead of one claimant, alternating which, and assert one owner per round, the stored owner is the winner, and every loser answered from 409, 404, 403.packages/verify/src/claim-race-http-door-39065.test.ts, boots the real stack and races two members'PATCH /api/v1/data/OBJECT/IDwith{ owner_id: SELF }on aprivateand apublic_readobject, asserting the same invariant and set.Read first, by risk:
ui/packages/plugin-detail/src/queueClaim.ts, therefusalStatusOfhelper and theunavailablebranch inclaimQueuedRecord: it readshttpStatus,statusandstatusCode, the spellingsis404Errorin@object-ui/data-objectstackalready reads.ui/packages/app-shell/src/views/RecordDetailView.tsx, theunavailablearm inhandleClaim: the only consumer of the outcome; the sharednotifyDataChangedre-read already follows every answer.packages/plugins/plugin-security/src/ownership-claim-race-sqlite.test.ts, theioTickcells.Tests
claimQueuedRecorddescribe failed 3 of 16 on the unchangedqueueClaim.ts(expected { outcome: 'refused', … } to deeply equal { outcome: 'unavailable', … }), then passed 16 of 16.unavailableline fromqueueClaim.ts(anchor hit 1 to 0, restored blob equal to HEAD) turns the same 3 cases red.private{"RECORD_NOT_FOUND/404":25},public_read{"PERMISSION_DENIED/403":25}. The ruling's named premise holds: one owner in every round, every loser in the set.private{"RECORD_NOT_FOUND/404":4},public_read{"PERMISSION_DENIED/403":4}.all-locales-key-parity.test.tspassed.Acceptance notes
queueClaim.tsand the plugin-detail translation bundles. The 409 toast and reload live inRecordDetailView.tsx(app-shell), its only consumer, and the Console's claim sentences live inui/packages/i18n/src/locales/*.ts; both were edited, nothing else.403; under the ruling a403isunavailable, so it now uses a400 VALIDATION_FAILED.skills/objectstack-data/rules/security.md(the Claim paragraph) and the eval inskills/objectstack-data/evals/hooks-security-seeds-datasources.jsonstill teach "the other gets409 CONCURRENT_UPDATE" only. Not edited here (skills/**is outside this PR); a follow-up is owed.ui/AGENTS.mdrule ✨ Set up Copilot instructions #2 asks for a docs page update;content/docs/**is outside this PR, and the docs paragraph is ruled term (1), carried by ADR-0142 D4: amend the claim-race promise to the ruled answers (409 / 404 / 403, exactly one owner) and the queues docs paragraph with it #39223.Verification
Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-detail/src/queueClaim-25769.test.tsx; expect 16 passed, including four cases under "a 404 or 403 straight after a claim is no longer waiting".Local gates, at 55b556c (after the merge of origin/main)
dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: 75 derived, 73 run, 2 NOT MEASURED, 0 unrun. Every run family exited 0 (exit codes captured before any pipe).pnpm check:dual-build-cjs-loadsandpnpm check:i18n, both "PREREQUISITE NOT MET" (exit 3): they read built output of packages this tree has not built, and a fullpnpm builddoes not fit the foreground limit. CI runs both.pnpm --dir ui exec vitest run scripts/: 172 files passed, 2 skipped.pnpm check:new-line-citations(ui): 0 new citations.@object-ui/plugin-detailand@object-ui/i18ntype-checkexit 0;@objectstack/plugin-securityand@objectstack/verifytypecheckexit 0 (test layer included).@object-ui/app-shelltype-check(its build closure is not built here: 386 errors, the TS2307 "cannot find module" family and the implicit-any errors it cascades into; none at the edited lines).Type Check UIin CI measures it.plugin-detailandi18nsuites together hit the 570 s foreground limit; the two touched test files ran and passed.Test UIin CI runs them.Generated by Claude Code