Repository navigation
feat(work): atomically reserve idle helper claims (#1017) - #1173
Conversation
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Board-core progress for #1017 / #307: #1121 manual leases, #1126 typed issue intake/import and legacy BuildIssue refusal, and #1173 atomic idle/established-state admission are merged. #1173 landed at2c91cf15c9d69c2f86750bfc411a278800f95342 (20:46:30Z), exactly the tree that passed merge-group44171256095. Exact sourcee4ef6897 also passed lane44167069880 on x86/ARM, required checks44168728208 and clear code/security reviews. Both before-fix runtime failures are documented above. The FULL assignment/leases row remains incomplete: native Owner import/reconciliation and fenced completion need production callers, and publication must retain immutable Receipt{number,key,lease} before work becomes consumable. Completion must use that original lease after the whole leased job ends, including acceptance/repair/save; WorkerFinished alone is earlier than job completion. These frontend/consumer pieces reuse the same Claims APIs and accounting; no second mutable store or new lab script is authorized. Runtime still requires explicit owner-selected Worker authority, complete source/import/partition reconciliation and startup/pause qualification. Helpers remain paused; no live queue publication, service cutover or activation occurred here. Native board and a2a remain ahead of Python removal, cleanup and release. |
T3. Ports night-watch + feeder + goal-loop → board: assignment/leases from #307, specifically finish-before-next and known-bootstrap admission for #1017 / consumer #1162. Own diff:186 additions, no deletions.
Adds
Claims::claim_idle_for(entry, policy, worker, now, ttl). The target must have validated Saved state; transient lock markers cannot establish known bootstrap. Under the SAME directory lock held through admission/save, the method refuses any outstanding target lease or any lease held by that worker, including expired work, until fenced completion. It reuses the existing row reader without recursively acquiring the lock. Role/pin/skill/import-hold checks and durable attempt/generation accounting remain. Genericclaim_for/assignsemantics are unchanged; actual helper dispatch must use the idle seam. Consumer integration/CLI qualification remains with #1162; this API alone is not runtime activation.Before-fix evidence:
work_refill::paused_partitioned_role_checked_admission_retains_one_exact_lease, no_task line68. Source revalidation reserved another ref for the same worker after the preliminary assignments scan; the old target-only claim still published the target.idle_claims_require_saved_state_not_a_denied_claim_markerfailed its intended marker-only admission assertion at board_controls.rs663: a refused Reviewer claim left only a .lock, yet idle admission created a lease. The other failure was an incorrect test assertion that a deliberately preseeded record did not exist; it now requires its exact bytes remain unchanged on refusal. No control was removed.Final head e4ef689 adds the established-state check under the same lock. Existing board_controls fixtures/import APIs are reused. Direct controls cover disabled/no files; Reviewer denial before and after establishment; imported holds; expired worker/target leases; unrelated-worker admission; fenced completion without refunds; missing established state; and six concurrent same-worker reservations across distinct refs with exactly one lease/attempt.
Local verification: repository-configured rustfmt --check and git diff --check pass. No local builds/tests. Exact fixed-head lane44167069880 completed SUCCESS at e4ef689 on both x86 and ARM. The lane plan selected exactly oxa-cli, oxa-parity, oxa-work, based on e417e45. Exact-head required checks44168728208 also completed SUCCESS, including whole-workspace bwrap partitions and the all-expected-tests-once/no-runtime-skips guard. Exact-head Cloud code review and security review both completed clear. The PR is in the normal merge queue; integrated merge-group44171256095 is qualifying tree2c91cf15c9d69c2f86750bfc411a278800f95342. Queue admission is not evidence of actual merge.
Removes: nothing. No existing assertions/history/state removed; no second store, worker lock, registry, lab script, GitHub-write path, helper launch or activation. Original worktrees and all published parent histories are retained.