bench: promote a leg's artifacts only from a completed attempt #433
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!433
Loading…
Reference in a new issue
No description provided.
Delete branch "bench/atomic-leg-results"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #426
A leg's processes wrote straight into the suite directory the report reads, so keeping stale or late artifacts out of the report depended on cleanup at every failure site. This replaces that with one structural mechanism in
tools/bench/field.py:.attempts/<name>.*directory. Starting an attempt deletes what earlier attempts of that leg left in the suite directory (all of felis's startup rows included), except the harness-appended<name>.latency-failed. At the end of the leg, before its processes are stopped, the attempt is copied into a sealed directory; later harness records go there. An attempt that returns is committed by renaming the sealed copy to.attempts/<name>.promotingand then moved into place, resume marker last; a crash mid-promotion is finished before the next suite and before the report reads. An attempt that raises or is interrupted is discarded; one that was refused, or that returned without its resume marker, lands only its env record and sets the rest aside inrefused/orunfinished/. This replacessweep_refused.Popen, a pidfd on Linux, or a start time on macOS; the tree is walked before the first signal and on every poll while waiting, and SIGKILL goes only through those handles. Used by the leg teardown, felis's client/daemon stop, and the startup suite's launch and daemon stops (which previously SIGKILLed every pid it had read, including exited ones). A process the walk misses costs aLINGERINGline, never a wrong bar.Docs:
docs/reference/benchmarks.md"Leg attempts" and the stop sequence;docs/explanation/benchmarks.mdrecords why promotion replaced per-failure-site cleanup.Verified:
python3 tools/bench/crossterm_test.py(283 tests), and real windows on Linux/niri (crossterm.py run startup kittenbench memory --terminals kitty), including a harness killed mid-leg (nothing of that leg in the suite directory) and its resume (the leg retaken,.attempts/cleared). No macOS run: the macOS branch (start-time identity) is covered by mocked tests only.