verify the regression corpus under the green backend#594
Merged
Conversation
the dedicated green tests prove the coordination primitives; nothing proved the whole regression corpus behaves the same under the green backend as under os threads. that is the safety net making green the default needs, so this adds a target that runs every case with an expected file under PITH_GREEN=1 — at the default worker count and again pinned to one worker — and compares each to the same expected output the os-thread run is held to. comparing against the fixed expected file rather than a fresh os-thread run is deliberate: an os-thread run carries its own wall-clock timestamps and would diff against green over nothing. a green run that drifts from its recorded answer is a real green correctness bug. it found one: test_process_ctx under a single worker, where a deadline-limited read_exact on a subprocess pipe reports the read failed but mislabels the error as unexpected-eof instead of deadline-exceeded (its spawned read-worker returns empty on would-block before the cancel timer fires). correct at the default worker count and os-thread. it is excluded here with that reason and tracked separately rather than papered over with a loosened compare; everything else — 259 cases, both worker modes — matches byte for byte. wired into ci after the green primitive tests.
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.
summary
the dedicated green tests prove the coordination primitives; nothing proved the
full regression corpus behaves identically under the green backend. that is the
safety net making green the default needs. this adds
verify-green-corpus,which runs every case with an expected file under
PITH_GREEN=1at the defaultworker count and again pinned to one worker, and compares each to the same
expected file the os-thread run is held to.
comparing against the fixed expected file, not a fresh os-thread run, is the
point: an os-thread run carries its own timestamps and would diff against green
over nothing. drift from the recorded answer is a real green correctness bug.
what it found
259 of 260 cases match byte for byte under green, both worker modes. the
one exception is
test_process_ctxunder a single worker: a deadline-limitedread_exacton a subprocess pipe reports the read failed but mislabels theerror as unexpected-eof rather than deadline-exceeded — its spawned read-worker
returns empty on would-block before the cancel timer fires. correct at the
default worker count and under os threads.
that case is in
GREEN_CORPUS_EXCLUDEwith the reason written out, and the bugis tracked separately — not hidden behind a loosened compare, which the target's
own comment warns against. a green run that legitimately encodes nondeterministic
scheduling order in its expected output would go on that list too, with its
reason.
what was tested
the target itself is the test: 259 passed, 0 failed across the deterministic
corpus under green default workers and one worker. wired into CI after the green
primitive tests.
notes
the run takes a few minutes (every case twice under green, a handful of server
round-trips among them). if that proves too heavy inline it can move to its own
parallel CI job later; for now it runs in the existing job.