Skip to content

fix(opencode-claimant): raise the claimant binding rate (#6257) - #6263

Merged
dezren39 merged 1 commit into
mainfrom
fix/claimant-binding-rate
Nov 5, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/claimant-binding-rate

Conversation

@dezren39

@dezren39 dezren39 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Fixes the claimant binding rate diagnosed in #6257 (Drew: "fix it", 2026-11-05).

Root causes (all measured, two reads each): the standing claimant fires on schedule but its mode file is shadow, so it launches nothing - every bind since 2026-11-04 came from ad-hoc agent drives (29 binds, then 0 in the 6h before the fix while 26-43 candidates waited). The 12-session server-wide cap left cap_room at 0-2. And the deterministic executor, claimant.py, was never committed - it lived untracked in the laptop primary, so the fleet kept running the LLM-prompt form of the claimant.

Changes

  • claimant.py committed (pre-existing implementation, previously untracked) with three fixes: the shadow-mode gate its own docstring promised (Step 4 previously launched unconditionally - the scheduled task never ran it directly, which is the only reason that stayed latent), a single-instance flock so overlapping fires can never race a candidate list, and a bounded parallel launch pool (4 workers) across distinct candidates. Exactly-once stays anchored on the atomic DB bind (bind_repo_task_lane_session); each worker re-verifies its candidate, and a failed bind/prompt deletes the created session (previous behavior). Skips backfill without consuming cap room, as the serial loop did.
  • Cap 12 -> 20 in poll.py, claimant.py, prompt.md (headroom-matched: census ran 18-19 roots at load 4.5-7.5 on 16 cores; active-root counting with the 30-min window unchanged; a fire still launches at most cap_room).
  • prompt.md gains an EXECUTION section: a fire runs claimant.py deterministically and reports from its fire-log line.
  • install.mjs cadence */10 -> */5, halving worst-case bind wait.
  • README constants aligned.

Smoke test (shadow, pre-merge): patched claimant.py run end-to-end - 26 candidates discovered, 0 launched, skip recorded as shadow mode: no launches, cap_room 17 at cap 20, inflight log untouched.

Tests: bun test test/install.test.mjs 13/13. python3 -m unittest test_poll 35/36 - test_unknown_active_set_fails_closed fails identically on pristine origin/main (verified), pre-existing and unrelated.

Rollout after merge: reinstall the OpenChamber task from the primary (--enable), move the primary's untracked claimant.py aside, pull, flip the mode file to live, and verify on #6257 (candidate drain, time-to-bind, double-bind audit).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… parallel launches, live-fire cadence

The standing claimant never bound tasks: its mode file stayed on
shadow (a slice-1 gate whose parallel-run packet never landed), the
only binds were ad-hoc agent drives, and the 12-session server-wide
cap left cap_room ~0-2. Diagnosis + before-metrics: #6257.

- claimant.py: commit the deterministic executor (it existed only
  as an untracked file in the laptop primary checkout). Add the
  shadow-mode gate its docstring always promised (Step 4 launched
  unconditionally), a single-instance flock, and a bounded parallel
  launch pool (4 workers) across distinct candidates - exactly-once
  stays anchored on the atomic DB bind, skips backfill.
- poll.py + claimant.py + prompt.md: concurrency cap 12 -> 20
  (census headroom: 18-19 roots at load 4.5-7.5/16 cores).
- prompt.md: EXECUTION section - a fire executes claimant.py
  deterministically instead of improvising prompt.md by hand.
- install.mjs: fire cadence */10 -> */5.
- README.md: cap + cadence constants aligned.

Tests: install.test.mjs 13/13 pass. test_poll.py 35/36 - the one
failure (test_unknown_active_set_fails_closed) fails identically on
pristine origin/main; pre-existing, untouched here.
@dezren39
dezren39 requested a review from a team as a code owner November 5, 2026 15:30
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T15:31:30.150529Z 75d6c9f PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1410f2f9-78f8-46c1-afc3-ebe8300db9c5
Commits

Reviewing files that changed from the base of the PR and between 2a67620 and 75d6c9f.

Files selected for processing: 5

  • pm-stack/opencode-claimant/README.md
  • pm-stack/opencode-claimant/claimant.py
  • pm-stack/opencode-claimant/install.mjs
  • pm-stack/opencode-claimant/poll.py
  • pm-stack/opencode-claimant/prompt.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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