Skip to content

Sprint 6: Worker Adapter — gh models as a self-metering budgeted fleet worker#61

Merged
Ryfter merged 8 commits into
masterfrom
feat/worker-adapter-sprint6
Jun 20, 2026
Merged

Sprint 6: Worker Adapter — gh models as a self-metering budgeted fleet worker#61
Ryfter merged 8 commits into
masterfrom
feat/worker-adapter-sprint6

Conversation

@Ryfter

@Ryfter Ryfter commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Sprint 6 of the Baton v2 economic-conductor MVP. Makes `gh models run ` a first-class, self-metering, budget-aware fleet worker — closing the dispatch → meter → forecast → route-around loop without manual `/baton:usage tick`.

What's new

  • `scripts/worker-lib.ps1` — pure `Get-RateLimitState` (gh output → `limited`/`cooling_down`/`waiting_for_reset` + ETA, fail-open), `Test-WorkerAdapter`/`Get-AdapterParser` (adapter dispatch table — the seam a future external worker plugs into), `Test-WorkerApiHit`, `Format-WorkerReport`; seamed `Invoke-Worker` (wraps `Invoke-Fleet` via injectable `-Dispatcher`, auto-ticks, maps rate-limits to Usage-Governor states) + `Get-WorkerStatus` (budget/utilization/forecast).
  • `scripts/fleet-worker.ps1` — `/baton:worker run|status`.
  • `commands/worker.md`, `github-models` seed row (`adapter: github-models`, `enabled: false`, budget commented/box-private), bootstrap manifest + 2 deploy asserts.

Decisions (d-wa-1..5)

adapter-marker concept anchor; wrapper not instrumented dispatch; tick-on-real-API-hit; fail-open metering; active saturation driver deferred to its own slice.

Tests

worker-lib 35/35 hermetic (dispatch stubbed via `-Dispatcher`, temp `BATON_HOME`, zero network/model/real-journal) + bootstrap 41 (deploys cleanly). Final opus whole-branch review: READY TO MERGE, 0 Critical / 0 Important (one Minor — bare-429 false-positive — fixed in 16c6b90).

Plugin `1.2.0 → 1.3.0-rc.1`. Spec: `docs/superpowers/specs/2026-06-20-worker-adapter-sprint6-design.md`. Plan: `docs/superpowers/plans/2026-06-20-worker-adapter.md`.

🤖 Generated with Claude Code

Ryfter and others added 8 commits June 20, 2026 11:34
Spec for the GitHub Models worker adapter — a self-metering, budget-aware
fleet worker that closes the dispatch->meter->forecast->route-around loop.
Decisions d-wa-1..5. Also corrects the next-session release note (Sprint 5
shipped in stable v1.2.0; rc line closed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Ryfter
Ryfter merged commit e393c73 into master Jun 20, 2026
@Ryfter
Ryfter deleted the feat/worker-adapter-sprint6 branch June 20, 2026 18:04
Ryfter added a commit that referenced this pull request Jun 21, 2026
…sh Gate

Finalize plugin 1.3.0-rc.2 -> 1.3.0 (rc line closed). Closes the 7-sprint
Baton v2 MVP with Sprint 6 (Worker Adapter, PR #61/#62, d055) and Sprint 7
(Acceptance/Polish Gate, PR #63, d056) on top of v1.2.0. Both gates green
(gate 39/39, bootstrap 44/0), 0 open issues. Release notes:
docs/releases/2026-06-21-v1.3.0.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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