test(nightly): a queued scan run is not finished yet (t84) #945

Merged
sharang merged 1 commits from fix/t84-nightly-queued into main 2026-11-09 12:53:03 +00:00
Owner

What

The nightly scan regression has been red since #940 (v0.4.11), for a reason in the test harness, not in the product.

Cause:

  • Since #940, a scan waiting for one of the agent's slots is recorded at once as queued.
  • The nightly seeds several targets together. With the agent's slot limit, some of their scans wait.
  • wait_for_runs took every run that was not running as finished. So those targets were collected and compared while still queued.

Effect: in run 9891 (dispatched today on main 29d3c91), 4 of 6 targets failed with:

  • scan status queued, blessed completed;
  • no SBOM components and no CVEs;
  • missing skipped stages (malware, plc_native_project).

The two targets whose scans got a slot first passed.

Fix: wait_for_runs now also waits while a run is queued. This is the only reader that took "not running" for "finished":

  • the dashboard was updated in #940;
  • the other "running" checks belong to pentest sessions and Werkbank jobs.

History: the last green nightly is 9840, 03:00 UTC today, on c8deabd, which is before #940. v0.4.11, v0.4.12 and v0.4.13 have not had a passing nightly yet.

Next: once this is merged, dispatch the nightly on main to get a real result for the current code.

Tests

  • cargo test -p compliance-agent --test nightly: unit tests pass. The regression test itself needs the running agent of the nightly job.
  • fmt and clippy -D warnings on the agent.

🤖 Generated with Claude Code

## What The nightly scan regression has been red since #940 (v0.4.11), for a reason in the test harness, not in the product. **Cause:** - Since #940, a scan waiting for one of the agent's slots is recorded at once as `queued`. - The nightly seeds several targets together. With the agent's slot limit, some of their scans wait. - `wait_for_runs` took every run that was not `running` as finished. So those targets were collected and compared while still queued. **Effect:** in run 9891 (dispatched today on main 29d3c91), 4 of 6 targets failed with: - `scan status queued, blessed completed`; - no SBOM components and no CVEs; - missing skipped stages (`malware`, `plc_native_project`). The two targets whose scans got a slot first passed. **Fix:** `wait_for_runs` now also waits while a run is `queued`. This is the only reader that took "not running" for "finished": - the dashboard was updated in #940; - the other `"running"` checks belong to pentest sessions and Werkbank jobs. **History:** the last green nightly is 9840, 03:00 UTC today, on c8deabd, which is before #940. v0.4.11, v0.4.12 and v0.4.13 have not had a passing nightly yet. **Next:** once this is merged, dispatch the nightly on main to get a real result for the current code. ## Tests - `cargo test -p compliance-agent --test nightly`: unit tests pass. The regression test itself needs the running agent of the nightly job. - fmt and clippy `-D warnings` on the agent. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-09 12:33:05 +00:00
test(nightly): a queued scan run is not finished yet (t84)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m41s
CI / Check (pull_request) Successful in 18m50s
b628bfb4e1
Since #940 a scan waiting for one of the agent's slots is recorded as
`queued`. The nightly harness took every run that was not `running` as
finished, so targets whose scans waited behind the others were compared
while still queued: status queued, no SBOM, no CVEs. It now waits for
queued runs as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit d274c68ecb into main 2026-11-09 12:53:03 +00:00
Sign in to join this conversation.