Skip to content

feat(work): atomically reserve idle helper claims (#1017) - #1173

Merged
oxa-orchestrator[bot] merged 3 commits into
mainfrom
agent/1017-idle-worker-claims
Nov 17, 2026
Merged

oxa-orchestrator[bot] merged 3 commits into
mainfrom
agent/1017-idle-worker-claims

Conversation

@n0rpan

@n0rpan n0rpan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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. Generic claim_for/assign semantics 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:

  • Consumer head1271fbc4c093dbff3b83ca96e8c5a697222397af, lane44164194412, FAILURE: exactly1/1284 x86 failure at 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.
  • Core tests-first head812c0890b399e68450a50d025db793e50244edec, lane44165423429, FAILURE. ARM1292 tests:1290 passed/2 failed. idle_claims_require_saved_state_not_a_denied_claim_marker failed 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.

@oxa-agent
oxa-agent Bot marked this pull request as ready for review November 17, 2026 20:23
@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T20:25:53.643736Z e4ef689 Manual request
🔒 Security Review ✅ Completed 2026-11-17T20:27:33.059707Z e4ef689 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e4ef6897df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: e4ef6897df

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@oxa-agent

oxa-agent Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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.

Merged via the queue into main with commit 2c91cf1 Nov 17, 2026
50 checks passed
@oxa-orchestrator
oxa-orchestrator Bot deleted the agent/1017-idle-worker-claims branch November 17, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant