Skip to content

feat(buzz-acp): provider failover for hosted agents (Azure Foundry) - #83

Merged
Cvv9 merged 3 commits into
mainfrom
feat/provider-failover
Sep 15, 2026
Merged

Cvv9 merged 3 commits into
mainfrom
feat/provider-failover

Conversation

@Cvv9

@Cvv9 Cvv9 commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add harness-generic provider failover to buzz-acp: after consecutive usage-limit-shaped application errors (default 2, triggers include the bare -32603 Internal error that codex-acp emits for ChatGPT subscription limits), the agent process is replaced by one spawned with configurable failover args/env/model, and returns to the primary provider after a cooldown (default 3600s). A provider switch does not count against the crash circuit breaker; the controller's primary model revision is not re-applied to a failover process.
  • New env/flags: BUZZ_ACP_FAILOVER_AGENT_ARGS, BUZZ_ACP_FAILOVER_ENV (JSON object), BUZZ_ACP_FAILOVER_MODEL, BUZZ_ACP_FAILOVER_TRIGGERS, BUZZ_ACP_FAILOVER_THRESHOLD, BUZZ_ACP_FAILOVER_COOLDOWN_SECS.
  • Compose bundle: agent-entrypoint.sh turns AZURE_FOUNDRY_API_KEY/BASE_URL/DEPLOYMENT into BUZZ_ACP_FAILOVER_ENV carrying MODEL_PROVIDER and a CODEX_CONFIG with an inline model_providers.azure-foundry definition. It never touches config.toml, so read-only config mounts keep working. codex-acp 1.1.14 ignores CLI config flags; env is the only path.
  • Bump buzz-relay to 0.2.17 so the hosted agent runtime publisher can ship this.

Verification

  • cargo test -p buzz-acp: 848 + 10 passed; clippy -D warnings clean; fmt clean.
  • bats deploy/compose/tests/agent-entrypoint-failover.bats: 8/8.
  • Live probe: a Responses API call to the Azure deployment used in production returned HTTP 200.

Production wiring for the Suite lives in the companion varvik-suite PR.

🤖 Generated with Claude Code

Cvv9 and others added 3 commits September 15, 2026 10:06
When the primary agent process returns consecutive usage-limit-shaped
errors, replace it with one spawned under a configurable failover
args/env/model (harness-generic), and return to the primary provider
after a cooldown. The compose bundle wires this for a ChatGPT-subscription
codex-acp fleet failing over to an Azure AI Foundry Responses endpoint,
delivered through CODEX_CONFIG/MODEL_PROVIDER so read-only config mounts
are never touched.

Bump buzz-relay to 0.2.17 so the hosted agent runtime publisher can ship
the change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Cvv <varun.cumbamangalam@oralens.com>
## Summary

CI is failing in `main` before tests start because Docker Hub denies
pulls for `minio/minio` and `minio/mc`. Retrying the failed jobs
produced the same errors.

Use MinIO’s Quay images in the development, harness, deployment Compose,
and Helm configurations. Pin each image to its multi-platform digest and
retain the release tags already used by deployment templates. Update the
architecture reference to match.

### Related issue

No duplicate issue or PR found. Addresses the image-pull failures in
[main CI attempt
2](https://github.com/block/buzz/actions/runs/34645306855/attempts/2).

### Testing

- Pulled both pinned images for Linux ARM64 and AMD64.
- Started an isolated Compose stack derived from the updated MinIO
service definitions, once per architecture (AMD64 under local
emulation).
- Verified the existing health check passed and the bucket initializer
exited with code 0.
- Uploaded an object with `mc cp`, read it with `mc cat`, compared its
content, and deleted it with `mc rm` on both architectures.
- Confirmed the initialized bucket was private and removed the temporary
stack and volume.

Generated with Codex

Signed-off-by: Salman Mohammed <smohammed@squareup.com>
(cherry picked from commit f3940ff)
Signed-off-by: Cvv <varun.cumbamangalam@oralens.com>
cargo-deny's advisory check (CI Security job) fails on the pre-existing
rustls 0.23.42 pin. Update rustls, rustls-webpki, and aws-lc to the
patched compatible releases.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Cvv <varun.cumbamangalam@oralens.com>
@Cvv9
Cvv9 merged commit cc00949 into main Sep 15, 2026
35 checks passed
@Cvv9
Cvv9 deleted the feat/provider-failover branch September 15, 2026 05:28
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.

2 participants