runner: never embed a fossil screenshot from a collided run dir (#45)
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit was merged in pull request #45.
This commit is contained in:
2026-10-05 17:46:25 +00:00
parent 5cec3e0e31
commit 35ba99768c
5 changed files with 169 additions and 5 deletions
+4
View File
@@ -1184,6 +1184,10 @@ def main() -> int:
# {tier,source,file,rc,junit} record; after the run we assemble results.json (per-stage/per-test +
# level) into the artifact dir. Best-effort — never changes the verdict (R7).
run_artifact_dir = os.path.join(results_mod.runs_dir(), results_mod.run_id())
# Collision guard (2026-10-05): drone build numbers restarted when its DB was re-created while
# old-era run dirs (same numbers, other recipes' artifacts — e.g. a fossil screenshot.png) are
# still on disk. Wipe the files THIS run owns so nothing stale survives into the card.
results_mod.fresh_artifact_dir(run_artifact_dir)
junit_dir = os.path.join(run_artifact_dir, "junit")
records: list[dict] = []