Skip to content

🤖 tests: the bug bash defaults to Sonnet alone and refuses a budget below its estimate - #6191

Merged
ThomasK33 merged 2 commits into
mainfrom
bugbash-default-cost
Oct 11, 2026
Merged

ThomasK33 merged 2 commits into
mainfrom
bugbash-default-cost

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

make bug-bash now runs Sonnet 5.5 alone by default: 6 charters, 6 jobs. Before any job starts, it prints its cost estimate and a recommended budget. It refuses with exit 2 and set BUGBASH_BUDGET_USD to at least $X when the budget is lower. Opus stays opt-in through BUGBASH_MODELS. Refs #5714.

Background

The old default was Opus 5.5 plus Sonnet 5.5: 12 jobs with 8 at a time. An audit estimated it at about $8 at list price, with $5–8 of the budget held by reservations of calls in flight. So a $10 budget could refuse calls late in the run, and a $5 budget failed partway, with no warning beforehand. The coordinator chose Sonnet alone plus an up-front check, after a clean-context review.

Implementation

Run Estimate Headroom Recommended
default: 6 charters × Sonnet, parallel 8 $2.70 $5.78 (6 calls in flight) $9
6 × Sonnet, --parallel 2 $2.70 $1.93 $5
6 × (Sonnet + Opus), parallel 8 $13.50 $15.42 $29

Validation

  • New run.test.ts cases: the default refuses $8 and accepts $9, starts 6 Sonnet jobs and sends no probe before the refusal. A lower --parallel needs less headroom. Opus gets a labeled guess. Both cases fail on the old code.
  • Dogfood with a fake key: BUGBASH_BUDGET_USD=5 bun tests/bugbash/run.ts printed the estimate and set BUGBASH_BUDGET_USD to at least $9 (it is $5).
  • bun test ./tests/bugbash (Bun 1.3.12) passed: 259 tests. make static-check passed.

Risks

Low. The default now finds fewer distinct bugs than Sonnet plus Opus, and the run header says how to opt in. The check can refuse a run that would have fit: the headroom assumes every in-flight call reserves the maximum. The measured highest reservation was $0.64 for Sonnet, against the $0.96 assumed.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $5.68

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-11T18:10:07.667531Z d50869f New commits
🔒 Security Review ✅ Completed 2026-10-11T18:10:33.458311Z d50869f New commits
ℹ️ 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

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f074899636

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@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: f074899636

ℹ️ 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 tests/bugbash/run.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@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: f074899636

ℹ️ 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 tests/bugbash/run.ts Outdated
Comment thread tests/bugbash/run.test.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f074899636

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 8f02179927

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: e4e0c5f3a2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@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: e4e0c5f3a2

ℹ️ 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 tests/bugbash/run.ts Outdated
@ThomasK33
ThomasK33 force-pushed the bugbash-default-cost branch from e4e0c5f to edcaa79 Compare October 11, 2026 17:46
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: edcaa79433

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: edcaa79433

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

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 11, 2026
@ThomasK33
ThomasK33 removed this pull request from the merge queue due to a manual request Oct 11, 2026
@ThomasK33
ThomasK33 force-pushed the bugbash-default-cost branch from edcaa79 to d50869f Compare October 11, 2026 18:08
@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit e3131d9 Oct 11, 2026
32 checks passed
@ThomasK33
ThomasK33 deleted the bugbash-default-cost branch October 11, 2026 18:28
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Oct 12, 2026
coder#6195)

## Summary

When the probe gets HTTP 401 or 403, the bug bash now refuses with exit
2 and `ANTHROPIC_API_KEY rejected by <host> (HTTP 401): check the key`.
This works in every `BUGBASH_AI` mode and for both `make bug-bash` and
`make mcp-apps-e2e`. Refs coder#5714.

Rebased onto main after coder#6191 (U4) merged.

## Background

The readiness review of coder#6190 found a gap: a mock run with a rejected
key ignored the probe's 401 and started every job. Each explorer's first
call then got 401. A non-200 answer keeps its full reservation (about
$0.64 per call), so the jobs then failed with misleading budget refusals
(402) instead of naming the key.

## Implementation

- `launch.ts` exports `keyRejected(job, status, records)`. It returns
the refusal text for 401 or 403, naming the host but never the URL path
or the key. It also reads the upstream status from the probe's call
records, so a 401 with an unreadable body (HTML from a gateway), which
`probeApp` reports as 502, is caught too.
- `run.ts` checks it right after the unreachable-upstream check, before
the `auto` fallback to the mock, so it applies in every mode.
- The MCP Apps probe in `launchJob` uses the same text.
- The fake upstream gets `[fake:401]` and `[fake:403]` modes, in
Anthropic's error shapes, and `[fake:401html]`.

## Validation

- I wrote the tests first, and all 4 failed before the change.
`run.test.ts` covers mock/401, auto/401 and real/403. `runner.test.ts`
covers an MCP Apps job against a fake 401: it refuses before `docker
run` and keeps the probe's record.
- Dogfood against a loopback fake upstream answering 401 (no provider
reached): `bun tests/bugbash/run.ts` in mock and auto, and the MCP Apps
launch, each exited 2 with `ANTHROPIC_API_KEY rejected by
127.0.0.1:<port> (HTTP 401): check the key`.
- `bun test ./tests/bugbash` (Bun 1.3.12) passed 279 tests, and `make
static-check` passed.

## Risks

Low. A 401 or 403 from the probe already refused in `real` and `auto`
mode. Only the text changed there. In mock mode, a run that a broken key
used to let start now refuses.

---

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking:
`high` • Cost: `$24.76`_

<!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high
costs=24.76 -->
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Oct 12, 2026
## Summary

`docs/AGENTS.md` gets one "Run a Bug Bash" section. With it, a new user
can run `make bug-bash` and `make mcp-apps-e2e` from the docs alone. It
also fixes the stale lines that described the bug bash before the
sandbox. Refs coder#5714.

**Merge after coder#6195.** The runbook quotes its rejected-key message
(`ANTHROPIC_API_KEY rejected by <host>`), which main does not have until
coder#6195 lands.

## Background

A fresh-user audit of the bug bash found 12 doc gaps. The docs gave no
host requirements, no image pull, no defaults, no cost, no output paths
and no way to rerun one charter. They also had stale statements: host
Node.js and `E2E_NODE` for the sandboxed targets, an app AI described as
always the mock, and terminals running on the host. coder#6189, coder#6190, coder#6191
and coder#6195 changed the behavior, and this section describes the final
result.

## Implementation

- **New section**, before "Bug Bash and Repro Tests":
- Host: Linux on amd64 (or arm64 with amd64 emulation), non-root, a
local rootful Docker socket, git, make and Bun 1.3.12, and the ~1.4 GB
image pulled on first run.
- Env: `ANTHROPIC_BASE_URL` with or without `/v1`, and
`BUGBASH_BUDGET_USD`.
- Defaults: 6 charters × Sonnet 5.5 = 6 jobs, parallel 8, 6 steps,
medium effort.
- Cost: $9 by default, $12 at high effort, $29 with Opus, $5 for
`mcp-apps-e2e`.
- The two probe refusals, with a note that a 403 can mean the key has no
access to the model (coder#6094 item 13 tracks the message text).
- Where `findings.md` and the logs go, how to rerun one charter,
`BUGBASH_MODELS`, `BUGBASH_EFFORT` and `MCP_APPS_E2E_ARGS`, the exit
codes, and the $0 dry runs.
- **Vendored skill:** `.xum/skills/bug-bash/` is unchanged. The new
section lists which of its statements AGENTS.md overrides.
- **Stale lines:** fixed in "Agent E2E" (no host Node.js for the
sandboxed targets), the last sentence of the real-mode bullet, and
`tests/bugbash/charters.txt:3`.
- **Makefile, comments only:** the `bug-bash` comment now describes the
probed app AI. Both targets warn not to share a make command line with a
build goal under `-j`, because the inner `$(MAKE)` would build it a
second time at once.
- **Regenerated:** `builtInSkillContent.generated.ts`, from
`docs/AGENTS.md`.

## Validation

I checked every number and message against the merged code and the
measured runs. The budgets are `estimateRun`'s output: `make bug-bash
BUGBASH_BUDGET_USD=5` printed `set BUGBASH_BUDGET_USD to at least $9`,
and `BUGBASH_EFFORT=high` needs $12. `make static-check` passed. The
Makefile diff has 0 non-comment lines.

## Follow-ups (deferred from review round 2, coder#6094 item 14)

- Exit 4 also means a launcher or e2e internal error, not only
incomplete evidence.
- After a stop or a proxy fault, `findings.md` lists only the charters
that started.

## Fixed from review round 3

The amd64 host requirement, the cached-image timing in the Makefile
comment, the mock-only claims in the override list, and the priced-model
limit of `BUGBASH_MODELS`. A runner refusal of a non-amd64 host before
the pull is code, so a separate PR delivers it.

---

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking:
`high` • Cost: `$30.61`_

<!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high
costs=30.61 -->
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