Fix benchmark provenance and hello-s reclaim race

XA
37m ago
+108-16

Intent: Two small follow-ups to the benchmark suite from #493.

Failure fixed: A --prune promote with an ERR metric recorded the new run's date and host in captured.<env>, although that metric kept its older value. Two make bench runs starting together over a leftover /tmp/hello-s could delete each other's staged files; CI cannot hit this, since the suite runs only under the exclusive host lock there.

This PR: One commit each. bench-promote.py keeps the old provenance when an unmeasured metric survives --prune, covered by its self-test. bench-suite.sh serializes the reclaim with a short mkdir lock.

Verified: make check passes; the self-test fails with the fix reverted; the reclaim, live-owner and held-lock cases were run by hand with make bench.

Refs #493


Summary by cubic

Fixes two benchmark suite follow-ups from #493: --prune promotes now keep the earlier provenance when a metric survives the prune, and concurrent suite starts can no longer delete each other's /tmp/hello-s files.

  • bench-promote.py keeps the earlier capture date and host when --prune leaves metrics this run did not measure (ERR/SKIP rows, or a tier the capture skipped), names each one in the partial-capture output, and drops groups the capture emptied; the self-test covers the rule end-to-end through main().
  • bench-suite.sh serializes the stale check and reclaim of /tmp/hello-s with a short mkdir lock, tracked like the other Tier-1 paths so EXIT cleanup removes it on interrupt; a lock left by a killed suite stops the next run with a message after ten seconds. An owner holding this suite's own pid is now reclaimed like a dead one, so a claim that times out after writing the owner file no longer stops the suite on its own pid.