CodeWhale icon indicating copy to clipboard operation
CodeWhale copied to clipboard

main is red on v0.9.8: cli provider-count assertions still hold the pre-release numbers

Open Lstarsky0 opened this issue 3 months ago • 2 comments

main is red on the v0.9.8 head: two provider-count assertions in crates/cli/src/lib.rs still hold the pre-v0.9.8 numbers.

thread 'tests::cli_provider_helpers_follow_config_metadata' panicked at crates\cli\src\lib.rs:7852:9:
assertion `left == right` failed
  left: 45
 right: 43

That is CI's own Windows leg on 2acbd5376, run 31814345366 — 179 passed, 1 failed, and it is the only failure there. It reproduces byte-identically on macOS here.

Nothing environmental: all_providers() returns &PROVIDER_REGISTRY, a static, so the count can't vary with config or HOME.

Where it came from

Two v0.9.8 commits each registered a provider and left the assertion behind:

commit registry ProviderKind::ALL
c9b9559a7 (pre-v0.9.8) 43 38
53af08ce3 Google Gemini as its own backend 44 39
531b64ed9 Antigravity (agy 1.1.13) credential plane 45 40

crates/cli/src/lib.rs:7852-7853 still asserts 43 and 38. Both are wrong now — the run panics on the first, so the second is only visible once you fix it.

Worth noting because it shows this was close to caught: the same count is asserted in crates/config/src/tests.rs:4816, and that one was updated to 40. The registry's own crate kept its test in step; the CLI crate's copy was missed. display_order_is_complete_and_unique compares two live values so it never pinned anything.

Fix is the two integers. I have it on a branch with a full --workspace --all-features run and will send it right after this.

Why it reached a release

This is the second regression of this exact shape in two days (#5377 was nine reasoning-effort assertions left behind by 6f6c35183). Both shipped. That is not two people ignoring a red X — for most commits on main there is no verdict to ignore.

The 40 most recent CI runs on main, spanning 2026-08-12T09:04 to 2026-08-14T15:24:

outcome count
cancelled before finishing 27
success, real Test legs (17–60 min) 8
success, Test legs finished in under 10s 2
failure 2
still running 1

So roughly seven in ten runs on main are cancelled before they can say anything. The mechanism is in ci.yml:

concurrency:
  group: ci-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

On a push to main there is no pull_request.number, so every push to main shares one group and cancels the run before it. For PRs that is exactly right — only the latest head matters. For main every commit is one you may need to bisect to later, and a burst guarantees the middle ones are never tested. The v0.9.8 release pushed three commits in six minutes and killed two live runs doing it; the macOS leg on 40766aecd had been going 2m49s when it was cancelled.

The two rows at "under 10s" are a separate thing worth knowing while reading that table: those Test legs exit on a light-change condition without running anything, so conclusion: success there is not evidence the suite passed. I mis-read one of those as "main is green" while chasing #5377.

Happy to open that as its own issue if you'd rather keep this one to the assertion fix — I put it here because "why didn't CI catch it" is the first thing I'd ask, and the answer isn't specific to this bug.

Lstarsky0 avatar Aug 14 '26 15:08 Lstarsky0

Thanks @Lstarsky0 for the report.

This issue is staying open for maintainer triage. CodeWhale gets better because people bring us real edge cases from real machines, providers, regions, and workflows.

If you can add a reproduction, logs, version output, screenshots, or the provider/model involved, that makes it much easier for us to verify and harvest the fix. Maintainers may comment /lgtmi to mark recurring issue reporters as approved so this intake note is skipped next time.

github-actions[bot] avatar Aug 14 '26 15:08 github-actions[bot]

Fixed in #5394.

Hmbown avatar Aug 15 '26 05:08 Hmbown