Since the OpenRouter balance work (#1440), TestAFreeCatalogPriceClearsTheWarningWhenTheListArrives and about nine sibling credit tests in internal/tui3 fail whenever a real OPENROUTER_API_KEY is in the environment, and pass without it.
Repro on santos/dev2 plus #1485's branch:
env -u OPENROUTER_API_KEY go test -count=1 -run TestAFreeCatalogPriceClearsTheWarningWhenTheListArrives ./internal/tui3 → ok
- the same test with a real key exported → FAIL
A test run from a shell or agent that has the key set (common on dev machines and in live-check rigs) goes red for reasons unrelated to the change under test. The tests should pin their own key/balance source instead of reading the process environment.
Since the OpenRouter balance work (#1440),
TestAFreeCatalogPriceClearsTheWarningWhenTheListArrivesand about nine sibling credit tests ininternal/tui3fail whenever a realOPENROUTER_API_KEYis in the environment, and pass without it.Repro on santos/dev2 plus #1485's branch:
env -u OPENROUTER_API_KEY go test -count=1 -run TestAFreeCatalogPriceClearsTheWarningWhenTheListArrives ./internal/tui3→ okA test run from a shell or agent that has the key set (common on dev machines and in live-check rigs) goes red for reasons unrelated to the change under test. The tests should pin their own key/balance source instead of reading the process environment.