Skip to content

feat(queue): claim-time execution-lane assignment — ledger + lane verb in repo-queue.py (OpenCode-half step 1) #1654

Closed

Description

@dezren39

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

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    source/humanFiled directly by a human
    area/infraInfrastructure, deployment, and operations
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 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
  5. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/infraInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/highImportant and time-sensitivesource/humanFiled directly by a humanstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions