Make the skill-scan counts independent of CPU speed
Why
The hosted static job counted the "Sudo/Root Execution" signature in gce/engine-selftest.sh as 8 on three merge request pipelines and 10 on the first main pipeline (merge 9dd2c02c, pipeline 3082855097 failed, then passed on retry). Workers also saw local counts differ from hosted ones and from run to run. scan-accept.yml holds exact counts, so the gate flaked.
Cause
Nothing floats: the scanner is pinned by commit, dependencies are frozen by date, and the scan is --no-llm. The variance is skillspector's own wall-clock cap. MAX_STATIC_ANALYSIS_SECONDS_PER_ARTIFACT is 30 s per file, and when it fires the scanner keeps only the pattern modules that finished. gce/engine-selftest.sh is 4,400 lines and sits at that edge, so which modules finished depended on CPU speed.
The report records it. Three scans of an identical tree on a laptop gave 1088, 1060 and 1086 findings (a different pattern group missing each time, for example all 28 "Tool Parameter Abuse" findings in that file in one run), each with a runtime_limit entry in analysis_completeness.ledger_exceptions for gce/engine-selftest.sh. The failing hosted trace shows 1120 findings with the signature at 10 against 8 accepted, which is the complete count.
Fix
scripts/skillspector-scan.pyraises the cap before the CLI starts (it is a module constant in the pinned scanner, so it cannot be pinned away).just skill-scanruns through it withuv run --with, and so do the two vendored scans.scripts/scan-gate.pyfails any report that records aruntime_limitexception, so a truncated scan cannot pass or flake silently.scan-accept.yml: the signature is 10, the complete count. The two findings the capped scans dropped (lines 3195 and 3198) aresudo podman pullassertions on the throwaway VM, the same case as the other eight. A header note explains the counts.- The recipe prints which scanner it ran and that the time cap is lifted.
Three uncapped scans on the laptop gave 1120 findings each, no runtime limit, identical sorted finding lists, and 1120 matches the hosted complete run.
Proof
Run on the final head: the hosted static job twice, and a throwaway commit that adds a finding. Results are in the comments below. The existing gate: self-tests already cover a new signature, one more finding of an accepted signature and a vanished one, and this MR adds a case for a report cut short by the time limit.
No diagram: the cause is one wall-clock check inside the scanner, not a path worth drawing.