GeezerVison is showing github.com — feat(queue): claim-time execution-lane assignment — ledger + lane verb in repo-queue.py (OpenCode-half step 1) · Issue #1654 · developing-today/code
feat(queue): claim-time execution-lane assignment — ledger + lane verb in repo-queue.py (OpenCode-half step 1) #1654DescriptionPart of the OpenCode-half redesign (design: files/opencode-half-redesign-2026-10-28.md in the keep-the-four-repos-healthy goal workspace; tracking: #1425). Drew's order, 2026-10-28: at least half of fleet tasks execute via OpenCode sessions.
Scope
Claim-time execution-lane assignment for the repo queues:
- A per-queue assignment ledger stored with the queue (a small table beside
agent.tasks in muse-dev): queue, task_id, assigned_lane (opencode | direct), executed_lane (filled at terminal state), fallback_reason, session_id, exclusion_reason, timestamps.
- A new verb in
~/tools/repo-queue.py: lane <TASK_ID> --worker <WORKER> — atomically reads the ledger counts for the task's queue (in-flight + executed per lane), assigns opencode iff opencode_count ≤ direct_count (ties to opencode), writes the assignment row, and prints the lane. Safe under concurrent claims from two lanes.
- The terminal verbs (
complete / fail, and park resume bookkeeping) record the executed lane back into the ledger row; a repo-queue.py helper or the existing result payload carries the execution block (see the measurement issue for the tally consumer).
Acceptance criteria
- Two lanes claiming alternately from the same queue receive a deterministic, replayable assignment sequence with ≥50% opencode at every prefix.
- A task assigned opencode that terminates as direct (fallback) moves its count to the direct side, and the next assignment for that queue is opencode until parity is restored.
- Ledger rows exist for 100% of tasks claimed after the verb ships; a claim with no ledger row is detectable by the fleet monitor.
- No change to claim atomicity, leases, or existing verbs' behavior for queues the verb is not invoked on.
Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 Intake review
- Related: step 1 of the OpenCode-half redesign; tracking Deployed laptop opencode config has drifted from canonical HEAD — claude-code pause (PR #1316) not in effect live #1425; unblocks feat(fleet): shift executor mode — launch + shepherd OpenCode sessions for opencode-lane tasks (OpenCode-half step 2) #1655 (executor mode), feat(fleet): daily lane-share measurement, publishing + below-floor alert (OpenCode-half step 4) #1657 (lane-share measurement) and rollout(fleet): OpenCode-half pilot on the code queue + extension to opencode/openchamber/nix (OpenCode-half step 5) #1658 (rollout).
- Still live: filed today (2026-10-28); a merged-PR search for lane assignment in this repo returned no resolving PR.
- Notes: the body already carries an
## Acceptance criteria section, so no body edit was made. The ledger is a small table beside agent.tasks in muse-dev — additive, in the style of the pilot's earlier migrations (0008/0009); the lane verb must be safe under concurrent claims, per the body's deterministic-assignment criterion.
- Risks: a claim with no ledger row must be detectable by the fleet monitor (body criterion) — worth adding that check to the monitor's Duty 1 pass when the verb ships, so the measurement cannot silently undercount.
- Suggested approach: migration +
lane verb + terminal-verb bookkeeping in one PR against ~/tools/repo-queue.py, verified by the alternating-claims replay in the acceptance criteria.
- Labels normalized by fleet monitor:
priority/high (foundation step for the ordered ≥50% split), effort/m, source/human, status/needs-triage, area/infra, meta/enriched.
dezren39 commented on Oct 28, 2026 🤖 Agent note · picked up
- Agent: queue worker (repo-worker-code), Lane A shift
- Session / ID: queue task 1919
- Found via: queue claim
- Task: Implement claim-time lane ledger (migration 0010: agent.repo_task_lane_ledger + atomic assign/record RPCs) and the
lane verb in ~/tools/repo-queue.py, with terminal-verb execution recording; test on a scratch queue.
- Expectation: effort m; done = lane verb live, deterministic ≥50% opencode assignment verified on scratch queue, fallback self-correction verified.
- Links: design
files/opencode-half-redesign-2026-10-28.md (goal workspace) · tracking Deployed laptop opencode config has drifted from canonical HEAD — claude-code pause (PR #1316) not in effect live #1425
dezren39 commented on Oct 28, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), Lane A shift
- Session / ID: queue task 1919
- Found via: queue claim
- Task: Lane ledger +
lane verb implemented and verified.
- Result:
- Migration 0010 applied to muse-dev (additive): table
agent.repo_task_lane_ledger (queue, task_id, assigned_lane, executed_lane, fallback_reason, session_id, exclusion_reason, timestamps) + RPCs agent.assign_repo_task_lane (per-queue advisory lock; assign opencode iff opencode_count ≤ direct_count, counting coalesce(executed, assigned); excluded rows count toward neither side; idempotent per task) and agent.record_repo_task_lane_execution (same lock; loud failure when no ledger row exists). SQL: ~/workspace/0010_apply.sql, copy in the goal workspace hidden_files/migrations/0010_lane_ledger.sql.
~/tools/repo-queue.py: new lane <TASK_ID> [--exclusion-reason ...] verb; complete / fail / park accept --execution {lane, session_id, fallback_reason, assigned} — complete merges it into result.execution, and all three record the executed lane into the ledger after the terminal verb succeeds. No change to existing verbs when --execution is omitted. Committed + pushed: dezren39/hatch e488cf1.
- Tests (scratch queue, cleaned up after): two workers claiming alternately → assignments O,D,O,D,O,D (≥50% opencode at every prefix, deterministic); an opencode-assigned task completed as direct with
fallback_reason=session_failed moved its count to direct and the next assignment was opencode (self-correction); exclusion assignment recorded with reason; repeat lane call idempotent; pilot health regression OK.
- Note: this task itself was claimed before the verb shipped, so it has no ledger row — the 100%-coverage acceptance applies to claims from now on, and a claimed task with no row is detectable by a simple ledger-vs-claims query for the fleet monitor (feat(fleet): daily lane-share measurement, publishing + below-floor alert (OpenCode-half step 4) #1657's tally can consume the ledger directly).
- Expectation: done — steps 2–5 of the redesign (feat(fleet): shift executor mode — launch + shepherd OpenCode sessions for opencode-lane tasks (OpenCode-half step 2) #1655 executor mode, feat(keeper): binding-aware supervision for queue-spawned OpenCode sessions (OpenCode-half step 3) #1656 keeper, feat(fleet): daily lane-share measurement, publishing + below-floor alert (OpenCode-half step 4) #1657 measurement, rollout(fleet): OpenCode-half pilot on the code queue + extension to opencode/openchamber/nix (OpenCode-half step 5) #1658 rollout) remain separate issues.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|