bench: keep the warm startup daemon alive and refuse legs the display cannot present #427
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!427
Loading…
Reference in a new issue
No description provided.
Delete branch "bench/warm-daemon-and-display-state"
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 #408.
Warm startup daemon
On macOS the autospawned daemon is a forked child of the client, so
stop_launchkilled it with each launch's process tree. As a result, every "felis (warm)" launch spawned a fresh daemon. The warm row now primes its daemon with one untimed launch, on a socket first verified to be free, andstop_launch(proc, spare=[daemon])skips that daemon when it stops later launches. Before every launch, each row checks the daemon: the cold row checks that none is bound, and the warm row checks that the primed pid still is. A failed check ends the row as a recorded failure. Each row recordsdaemon_checked. Both rows are always recorded, because the warm row no longer depends on the cold one.Display state
envinfo.leg_env()now carriesdisplay: {locked, asleep}:IOConsoleLockedviaioregandCGDisplayIsAsleepfor the main display viaosascript.LockedHint. Sleep isnullbecause there is no reading to take.A leg whose display cannot present at its start is not launched. A leg whose display cannot present at its end is marked refused. In both cases
<name>.env.jsonrecords the reason and the console prints it.field.sweep_refusedmoves a refused leg's artifacts, its.doneincluded, torefused/. It runs before a suite starts and before the report loads a directory, so a late write can neither be charted nor skip the retake. The report note names each refused leg.Other failure-path hardening that review raised (stale rows after an interrupted retry, process reaping, pid-reuse-safe SIGKILL) is out of scope here and tracked in #426.
Verification
python3 tools/bench/crossterm_test.py: 261 tests pass on Linux and on the M4 Max.crossterm.py run startup --terminals kittyproduced both felis rows withdaemon_checked6/6 and no failure.displaywas{"locked": false, "asleep": null}.envinfo.display_state()returns{'locked': True, 'asleep': True}.