Version: main at 51c8356. scripts/benchmark/run.py.
With EXPECT_CONNECTION set, a run served by another connection is reported as a foreign finding, but its session and trace have already been deleted — so the evidence for the finding is gone, although the runner keeps traces for findings.
The cleanup in run_task decides on rec.get("foreign"):
if rec.get("network") or rec.get("lookup") or rec.get("foreign") or rec.get("substituted"):
... # a finding: keep the session and its trace
elif os.environ.get("KEEP") != "1":
... # delete
but rec["foreign"] is only assigned later, in one(), after run_task has returned:
rec["foreign"] = rec["connection"]
so the flag is always absent at cleanup time and the run is deleted, then printed as FINDING foreign.
Fix shape: pass the expected connection into run_task so it can set foreign before cleanup, or defer cleanup until after one() has assigned it.
Version:
mainat 51c8356.scripts/benchmark/run.py.With
EXPECT_CONNECTIONset, a run served by another connection is reported as aforeignfinding, but its session and trace have already been deleted — so the evidence for the finding is gone, although the runner keeps traces for findings.The cleanup in
run_taskdecides onrec.get("foreign"):but
rec["foreign"]is only assigned later, inone(), afterrun_taskhas returned:so the flag is always absent at cleanup time and the run is deleted, then printed as
FINDING foreign.Fix shape: pass the expected connection into
run_taskso it can setforeignbefore cleanup, or defer cleanup until afterone()has assigned it.