Windows: a guessed liveness must not report a deadline - #2
Merged
Merged
Conversation
…t a clock Windows-only red on main, from two real bugs that Linux hides. 1. elapsed preferred the stream's own clock unconditionally. A relative or synthetic timestamp makes now-first_ts astronomically large, so budget pinned at 100% on a run that had just started -- the worst direction to be wrong in, because 100% is what a run about to be killed looks like. An epoch in ms is past 1e12; below that it is not a wall clock and the marker mtime is the better answer. 2. Without ps, liveness falls back to 'the stream moved recently', which reports a leftover directory as running. Deriving a deadline percentage from that dresses a guess as a measurement. Track whether liveness was observed or guessed, and report no budget when guessed. Linux never saw either: ps resolves liveness, the directory reads dead, and budget is None before the arithmetic runs.
The workflow documents 'PR carrying the full-test label' as the way to run cross-platform checks before merging, but pull_request defaults to opened/synchronize/reopened -- labeling fired nothing and the matrix stayed skipped. The documented escape hatch was inert, which is how a Windows-only bug reached main in the first place.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Windows-only failure on
main(Full-scope (windows/amd64)→live run reader).Two real bugs that Linux hides, both in
live.py:1. A synthetic timestamp was treated as a wall clock.
elapsedpreferred the stream's own clock unconditionally. A relative or synthetictimestampmakesnow - first_tsastronomically large, sobudgetpinned at 100% on a run that had just started — the worst direction to be wrong in, because 100% is exactly what a run about to be killed looks like. An epoch in milliseconds is past 1e12; below that it is not a wall clock, and the marker's mtime is the better answer.2. A deadline was derived from a guess.
Without
ps, liveness falls back to "the stream moved recently", which reports a leftover directory as running. A percentage built on that wears the authority of a measurement. Liveness now records whether it was observed or guessed, and no budget is reported when guessed.Linux never saw either:
psresolves liveness, the directory readsdead, andbudgetisNonebefore the arithmetic ever runs.Verified by exercising the guessed-liveness branch directly —
state=running,budget=None. 25/25 selftest,ci-localgreen.