strix/tests
0xallam 87fe9af443 fix(core): recover the agent fleet and the UI from a provider credit outage
An exhausted provider balance fails every in-flight agent within seconds, and
a failed agent is gated behind a user message. The user can only realistically
message the root, so the rest of the fleet stayed dead for the life of the scan
even after credits were topped up, and the header kept reporting a failure that
had already resolved.

Treat a billing rejection as its own class of failure:

- Detect it from the response body across the whole exception chain. The status
  code is not a signal: the same rejection arrives as a 400 pre-stream and as a
  LiteLLM-rewrapped 500 mid-stream, and the 500 shape was being replayed through
  the full transient-retry budget on a failure no retry can fix.
- Tag the runtimes it stops, so the first call that succeeds again lifts their
  human-wake gate and hands each agent a note explaining the gap. Their sessions
  and tasks are intact throughout - only the gate kept them parked.
- Report it as one actionable sentence and one log line per agent rather than a
  LiteLLM traceback per agent.

Unlatch the TUI alongside it. `scan_state` had no path back from "failed" and
`controller.error` was never cleared, so a resolved error stayed on screen for
the rest of a working scan; an agent's `error_message` was likewise write-only,
pinning it to a healthy agent. An unchanged error is now announced once rather
than once per retry, since a revived agent reads as "running" the instant it is
woken and again the instant it dies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 20:58:45 +03:00
..
__init__.py Add configurable token / cost usage limits (#576) 2026-06-22 11:17:08 -04:00
conftest.py Reach MCP tools on demand instead of registering every one (#1175) 2026-08-26 16:31:08 -07:00
test_agent_factory_shell.py feat(context): spill oversized tool output into the sandbox workspace (#882) 2026-07-26 14:42:22 -07:00
test_agent_factory_tool_arguments.py Treat literal 'null'/'none' strings as absent for optional tool args (#1164) 2026-08-25 13:21:12 -04:00
test_agent_tool_registration.py Drop strict tool schemas on Claude routes 2026-08-20 23:12:23 +03:00
test_api_spec.py feat: support API specs and Postman collections as targets (#866) 2026-08-03 21:07:44 -07:00
test_api_spec_targets.py feat: support API specs and Postman collections as targets (#866) 2026-08-03 21:07:44 -07:00
test_auth_cli.py Sign in with a ChatGPT subscription for inference (#854) 2026-07-24 15:41:19 -07:00
test_caido_bootstrap.py perf: bootstrap Caido concurrently with the scan start (#1143) 2026-08-21 12:09:59 -07:00
test_caido_handle.py perf: bootstrap Caido concurrently with the scan start (#1143) 2026-08-21 12:09:59 -07:00
test_cli_mcp_config.py Add MCP server support (#1137) 2026-08-24 14:00:16 -04:00
test_cli_target_list.py fix(report): raise RuntimeError on non-object run.json (fixes #1109) (#1116) 2026-08-20 13:41:04 -07:00
test_codex_auth.py feat(tui): replace Textual with a Go/Bubble Tea interface (#941) 2026-08-03 19:23:07 -07:00
test_codex_streaming.py Sign in with a ChatGPT subscription for inference (#854) 2026-07-24 15:41:19 -07:00
test_compaction.py fix(llm): pass LLM_EXTRA_HEADERS through ModelSettings so they reach the agent loop (#937) 2026-07-29 19:38:06 -07:00
test_config_loader.py feat(runtime): mount local targets instead of copying them in (#958) 2026-08-02 07:45:10 -07:00
test_context_budget.py perf: take heavy imports off the startup path and pre-warm them in the background (#1141) 2026-08-20 20:24:08 -07:00
test_cost_tracking.py Fix LiteLLM cost model resolution 2026-08-12 17:26:00 +03:00
test_coverage_tool.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_dedupe_model.py fix(llm): bind dedupe credentials to a provider; send reasoning=max via extra_body (#1187) 2026-08-28 09:27:57 -07:00
test_disable_streaming.py fix(llm): cap the tool calls one assistant response may queue (#977) 2026-08-06 00:06:59 +03:00
test_docker_client_delete.py fix(runtime): swallow torn-down docker socket in sandbox delete() (#721) 2026-07-10 00:13:35 -04:00
test_e2e_budget_lifecycle.py refactor(tools): split wait_for_message into respond_to_user + wait_for_agents 2026-08-02 02:15:51 +03:00
test_execution.py fix(agents): let an agent wait on what it already said (#1020) 2026-08-09 00:57:16 +03:00
test_execution_provider_credit.py fix(core): recover the agent fleet and the UI from a provider credit outage 2026-08-28 20:58:45 +03:00
test_execution_transient_retry.py fix: pre-v1-style lifecycle resilience — mailbox delivery, uniform revival, unexitable runner, waiting timeout, broader retries, crash-safe identity (#923) 2026-08-01 11:17:08 -07:00
test_fenced_code.py refactor: move strix/viewer under strix/interface 2026-07-26 13:11:14 -07:00
test_finish_coverage_gate.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_go_tui_runtime.py fix(core): recover the agent fleet and the UI from a provider credit outage 2026-08-28 20:58:45 +03:00
test_hooks.py feat(runtime): graduated wrap-up warnings, budget reserve, and interactive budget pause/continue (#893) 2026-07-26 20:37:14 -07:00
test_inputs.py fix(llm): bind dedupe credentials to a provider; send reasoning=max via extra_body (#1187) 2026-08-28 09:27:57 -07:00
test_install_script.py Add Linux ARM64 standalone release support (#886) 2026-07-26 16:27:02 -07:00
test_list_reports.py Treat literal 'null'/'none' strings as absent for optional tool args (#1164) 2026-08-25 13:21:12 -04:00
test_llm_extra_headers.py fix(llm): apply LLM_EXTRA_HEADERS on native OpenAI route even without a custom base 2026-07-30 04:13:25 +03:00
test_local_sources.py feat(tui): replace Textual with a Go/Bubble Tea interface (#941) 2026-08-03 19:23:07 -07:00
test_mcp_client.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_model_retry.py Sign in with a ChatGPT subscription for inference (#854) 2026-07-24 15:41:19 -07:00
test_models.py fix(llm): only attach prompt-cache points on routes LiteLLM serves (#1186) 2026-08-28 09:26:57 -07:00
test_notes.py Treat literal 'null'/'none' strings as absent for optional tool args (#1164) 2026-08-25 13:21:12 -04:00
test_optional_deps.py fix(providers): declare bedrock + vertex extras and add provider import-error hints (#588) 2026-07-07 10:24:49 -04:00
test_output_store.py feat(context): spill oversized tool output into the sandbox workspace (#882) 2026-07-26 14:42:22 -07:00
test_packaging.py feat(tui): replace Textual with a Go/Bubble Tea interface (#941) 2026-08-03 19:23:07 -07:00
test_pricing.py Fix LiteLLM cost model resolution 2026-08-12 17:26:00 +03:00
test_provider_hints.py fix(providers): match google submodule imports and walk full exception chain 2026-07-10 07:21:47 -07:00
test_proxy_client.py perf: bootstrap Caido concurrently with the scan start (#1143) 2026-08-21 12:09:59 -07:00
test_report_coverage.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_report_pdf.py refactor: move strix/viewer under strix/interface 2026-07-26 13:11:14 -07:00
test_report_writer.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_reporting_fields.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_reporting_tool.py fix: calibrate vulnerability severity to demonstrated impact 2026-08-03 23:40:32 +03:00
test_respond_to_user.py fix(agents): let an agent wait on what it already said (#1020) 2026-08-09 00:57:16 +03:00
test_runner_interrupt.py fix(runner): resume after a user interrupt instead of failing (#1023) 2026-08-08 16:44:12 -07:00
test_runner_mcp.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_runner_rate_limit.py fix(core): recover from hallucinated tool names instead of ending the scan 2026-08-04 06:14:54 +03:00
test_runner_root_prompt.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_runner_teardown.py fix(runner): settle child agents before closing sessions at wind-down (#1025) 2026-08-08 18:17:58 -07:00
test_sarif.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_sarif_stride.py feat(report): tag SARIF rules with STRIDE legs derived from CWE (#708) 2026-07-06 21:19:53 -04:00
test_secret_files.py Create credential files with owner-only permissions (#945) 2026-08-03 19:36:59 -07:00
test_session_entries.py feat: place caller-provided files into the sandbox workspace (extra_files, --workspace-file) (#1085) 2026-08-14 16:43:08 -04:00
test_session_fd.py fix(sessions): open a sqlite connection per operation, not per thread (#1022) 2026-08-08 16:20:01 -07:00
test_skill_dir_extension.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_state_coverage_artifact.py feat(agents): evidence discipline, and coverage as a first-class artifact (#961) 2026-08-24 03:34:09 -07:00
test_state_repo_context.py fix(report): omit SARIF provenance for multiple repos (#726) 2026-07-10 09:41:18 -04:00
test_stream_idle_timeout.py fix(llm): abandon a model stream that stops producing events (#978) 2026-08-06 00:07:14 +03:00
test_telemetry_resume.py handle resume tokens gracefully (#1097) 2026-08-17 16:55:27 -04:00
test_threat_model_tool.py Mirror the run's threat models into its state dir so resume keeps them 2026-08-27 01:36:47 +03:00
test_todo.py fix(todo): stop a todo plan failing on priority or duplicates (#1021) 2026-08-08 15:18:48 -07:00
test_tool_call_ids.py fix(llm): cap the tool calls one assistant response may queue (#977) 2026-08-06 00:06:59 +03:00
test_tool_call_limits.py fix(llm): cap the tool calls one assistant response may queue (#977) 2026-08-06 00:06:59 +03:00
test_tui_backend_controller.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_tui_backend_server.py fix(tui): preserve cost when state is truncated (#1086) 2026-08-20 13:36:01 -07:00
test_tui_protocol_conformance.py feat(tui): replace Textual with a Go/Bubble Tea interface (#941) 2026-08-03 19:23:07 -07:00
test_tui_resume_history.py test(tui): correct the nudge the internal-turn test asserts (#1016) 2026-08-08 22:34:45 +03:00
test_unknown_tool_recovery.py fix(core): recover from hallucinated tool names instead of ending the scan 2026-08-04 06:14:54 +03:00
test_unraisable_filter.py feat(tui): replace Textual with a Go/Bubble Tea interface (#941) 2026-08-03 19:23:07 -07:00
test_update_check.py fix(update): re-exec runs the new binary after self-update (endless update-prompt loop) (#1168) 2026-08-25 15:13:35 -07:00
test_usage_subscription.py Sign in with a ChatGPT subscription for inference (#854) 2026-07-24 15:41:19 -07:00
test_viewer.py Isolate MCP connections per task and surface connection status in the UIs (#1181) 2026-08-27 14:10:44 -07:00
test_viewer_auth.py refactor: move strix/viewer under strix/interface 2026-07-26 13:11:14 -07:00
test_viewer_runs_gating.py refactor: move strix/viewer under strix/interface 2026-07-26 13:11:14 -07:00
test_wait_dedupe.py fix(agents): collapse repeated waits queued inside one model turn (#979) 2026-08-06 00:07:30 +03:00
test_workspace_files.py feat: place caller-provided files into the sandbox workspace (extra_files, --workspace-file) (#1085) 2026-08-14 16:43:08 -04:00