Skip to content

feat(opencode-claimant): laptop-side claimant/executor for opencode-lane tasks (#3026 slice 1) - #3032

Merged
dezren39 merged 2 commits into
mainfrom
queue/4387-3026-opencode-claimant
Oct 31, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/4387-3026-opencode-claimant

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Slice 1 of #3026 (queue task 4387), with Drew's 2026-10-31 mechanism correction applied: the claimant/executor is an OpenChamber native scheduled task, not the systemd service the original packet framing named (that framing is superseded on the issue; #2019's systemd composition stays fallback-only).

What's here (pm-stack/opencode-claimant/)

  • prompt.md — the scheduled task's prompt (source of truth): polls the four repo-health queues for claimed tasks lane-assigned opencode with no bound session, launches worker sessions on the standing OpenCode server with the packet's route (Workhorse default), binds the session id in the task record at launch (pm-dispatch PATCH-then-ledger precedent), enforces the 12-session cap, and leaves terminal states to the worker session's helper verbs with --execution records.
  • poll.py — read-only candidate discovery + cap count. It cannot mutate anything.
  • install.mjs — idempotent installer into the laptop's code-project OpenChamber store (stable task id, preserves other tasks, timestamped backup, --dry-run writes nothing). Installs disabled; shadow mode is also the prompt's own default.
  • test/install.test.mjs — bun tests: 7/7 pass (merge idempotence, prompt embedding, store-shape refusal, foreign-prompt rejection).

Worked example (shadow/dry-run, recorded on #3026)

  • install.mjs --dry-run against the live store: would insert the task disabled, 2 existing tasks preserved, nothing written. The real install was then run: task f1b4a33b… now sits disabled in the store beside the two live code lanes.
  • poll.py live shadow run: all four queues read (claimed 4/1/2/0), 0 unbound opencode-lane candidates, live root sessions listed = 41 → cap_room 0 (fails closed).

Known gap (in README, named on the issue): the session count includes finished-but-unarchived sessions, so the cap reads saturated until the gate packet refines it to active-only. Shadow mode launches nothing, so slice 1 is safe beside the live conductor; enabling + live mode belong to the slice-2 gate packet, which this task's completion enqueues.

Supervision choice (#3026 work item 4): claimant self-check on each fire + fleet-watchdog ledger backstop — recorded on the issue.

Refs #3026 (does not close it — the issue stays open until the stand-down lands).


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

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 11:08
@coderabbitai

coderabbitai Bot commented Oct 31, 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 1 minute.

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: 461f581a-b6f9-42cc-8231-8030415ea7d4
Commits

Reviewing files that changed from the base of the PR and between 92979e4 and c13868d.

Files selected for processing: 5
  • pm-stack/opencode-claimant/README.md
  • pm-stack/opencode-claimant/install.mjs
  • pm-stack/opencode-claimant/poll.py
  • pm-stack/opencode-claimant/prompt.md
  • pm-stack/opencode-claimant/test/install.test.mjs
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-10-31T11:35:44.303838Z c13868d 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd471d1e75

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

Comment thread pm-stack/opencode-claimant/prompt.md Resolved
Comment thread pm-stack/opencode-claimant/prompt.md Resolved
…prompt send (#3026)

Codex P2s on #3032: (1) supervision sat after the gate/cap early-returns, so the normal all-bound state never got bound-session checks -- supervision is now step 1 on every live fire, independent of launch gates (shadow mode runs its read-only part). (2) A prompt send whose response was lost left a possibly-executing session unbound and the task eligible for a second launch -- the flow now binds the session id immediately after creation, BEFORE the prompt send, and a failed/lost send reconciles that bound session (check messages, resend once to the SAME session only if the prompt demonstrably never landed) instead of ever relaunching. bun test 7/7 in pm-stack/opencode-claimant.
@dezren39

Copy link
Copy Markdown
Member Author

@codex review — new head c13868d fixes both P2s (supervision moved before launch gates; bind-before-send with reconcile-on-lost-response). Please re-review.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: c13868de85

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

@dezren39
dezren39 merged commit 41ffb8b into main Oct 31, 2026
1 check passed
@dezren39
dezren39 deleted the queue/4387-3026-opencode-claimant branch October 31, 2026 11:56
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