Skip to content

verify the regression corpus under the green backend#594

Merged
kacy merged 1 commit into
mainfrom
corpus-under-green
Jul 26, 2026
Merged

verify the regression corpus under the green backend#594
kacy merged 1 commit into
mainfrom
corpus-under-green

Conversation

@kacy

@kacy kacy commented Jul 26, 2026

Copy link
Copy Markdown
Owner

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=1 at the default
worker 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_ctx under a single worker: a deadline-limited
read_exact on a subprocess pipe reports the read failed but mislabels the
error 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_EXCLUDE with the reason written out, and the bug
is 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.

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.
@kacy
kacy merged commit c472712 into main Jul 26, 2026
2 checks passed
@kacy
kacy deleted the corpus-under-green branch July 26, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant