Skip to content

Make the suite run on Linux - #56

Merged
hyj28 merged 1 commit into
mainfrom
linux-portability
Sep 14, 2026
Merged

hyj28 merged 1 commit into
mainfrom
linux-portability

Conversation

@hyj28

@hyj28 hyj28 commented Sep 14, 2026

Copy link
Copy Markdown
Owner

CI ran for the first time and reported 22 failed, 1240 passed on ubuntu-latest against 1260 passed on macOS. This suite had never run on Linux, and the README badge said so.

Two of the three causes are production bugs, not test problems. They had never bitten a real run only because the native agent path has never run a real experiment — the archived 170-trial run used the Terminus-2 path.

The contract that disagreed with itself

_process_identity_snapshot_script() iterated /proc/[0-9]*/stat with no filter on PID 1, while _valid_process_identity() required pid > 1:

_valid_process_identity('1:12345')  ->  False
_valid_process_identity('2:12345')  ->  True

On Linux /proc/1/stat always exists — in a container PID 1 always does — so the baseline always failed validation and every test reaching prepare() died. Two halves of one contract, disagreeing.

Why three weeks of green runs never caught it

macOS has no /proc. The glob never expanded, the script printed nothing, and both checks passed vacuously on an empty tuple: any() over () is False, and len(()) != len(set(())) is False.

A platform that could not observe the process table reported exactly what a platform observing zero processes would. That is the sixth instance of the defect RESULTS.md §6 catalogues five of — and the shape local.py already gets right by typing lingering_processes as int | None.

An absent table is now its own status, and the distinction goes one step further than the task asked: a kernel where the table is structurally unavailable is separated from a reading that failed for some other reason. The first is recorded and the run continues; the second refuses.

That split is §6's own conclusion — whether the run continues and whether a checkpoint may be restored are different decisions — and the exposure reaches the validation summary as a count, so analysis can exclude affected trials instead of discovering the gap later.

The first attempt made an unobservable table fatal, which regressed macOS to 3 failures. The old code pretended it was fine; that one stopped the run; neither is what the precedent says.

Third cause

GNU tar and BSD tar disagree about backslashes in paths. The implementation is detected rather than assumed.

CI

Now runs the gates on ubuntu-latest and macos-latest, so the next platform gap is caught by CI rather than by someone noticing a red badge.

Gates

macOS: pytest 1277 passed, 3 skipped (baseline 1260), ruff check and ruff format --check clean. Linux is what this change exists for, and CI on this PR is the check that matters.

…rom lying

CI ran for the first time and reported 22 failed, 1240 passed on ubuntu-latest
against 1260 passed on macOS. This suite had never run on Linux.

Two of the three causes were production bugs rather than test problems, and they
had never bitten a real run only because the native agent path has never run a real
experiment - the archived 170-trial run used the Terminus-2 path.

The process-identity snapshot iterated /proc/[0-9]*/stat with no filter on PID 1,
while the validator required pid > 1. On Linux /proc/1/stat always exists, so the
baseline always failed validation and every test reaching prepare() died. The two
halves of one contract disagreed.

Nobody noticed because macOS has no /proc: the glob never expanded, the script
printed nothing, and both checks passed vacuously on an empty tuple. A platform
that could not observe the process table reported exactly what a platform observing
zero processes would. That is the sixth instance of the defect this repository
catalogues five of in RESULTS.md section 6, and the shape local.py already gets
right by typing lingering_processes as int | None.

An absent table is now its own status, and the distinction goes one step further
than asked: a kernel where the table is structurally unavailable is separated from
a reading that failed for some other reason. The first is recorded and the run
continues; the second refuses. That split is RESULTS.md section 6's own conclusion -
whether the run continues and whether a checkpoint may be restored are different
decisions - and the exposure reaches the validation summary as a count, so analysis
can exclude affected trials rather than discovering the gap later.

The first attempt at this made an unobservable table fatal, which regressed macOS
to 3 failures: the old code pretended it was fine, the new code stopped the run,
and neither is what the precedent says.

Third cause: GNU tar and BSD tar disagree about backslashes in paths, so the
implementation is detected rather than assumed.

CI now runs the gates on ubuntu-latest and macos-latest, so the next platform gap
is caught by CI rather than by someone noticing a red badge.

Gates on macOS: pytest 1277 passed / 3 skipped (baseline 1260), ruff check and ruff
format --check clean. Linux is what this change exists for and CI is the check.
@hyj28
hyj28 merged commit 2d3592c into main Sep 14, 2026
2 checks passed
@hyj28
hyj28 deleted the linux-portability branch September 14, 2026 17:18
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