Repository navigation
test(linux): self-host reld with reld, two generations (reld#6, P2-T2) - #163
Merged
Merged
Conversation
Windows and macOS already self-host in ci.yml. Linux, the platform Phase 2 is about, did not — the strongest single correctness signal was missing on the one target the phase exists to prove. Generation 0 is built by the host toolchain's linker, generation 1 is the same source linked by generation 0, generation 2 is the same source linked by generation 1. A linker that mis-resolves a symbol produces a binary that links cleanly and then behaves wrong; using its output as the linker is what catches that. The generations are compared byte for byte rather than merely both being run. The single exemption is `.comment`, where the linker writes its own version string, so a generation linked by a differently-built reld truthfully differs there and nowhere else. Measured locally: generations 1 and 2 differ in exactly 39 bytes, all inside `.comment`, and in nothing else. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
11 of 20 tasks
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.
Advances #6 (Wave 2 of #153) by closing P2-T2. Does not close #6: P2-T1, P2-T3 (corpus pass rate) and P2-T5 remain.
The gap
ci.ymlself-hosts on Windows MSVC and on macOS. Linux — the platform Phase 2 exists to prove — did not. The strongest single correctness signal was missing on the one target the phase is about.What it does
Three generations:
All three must run. Then gen1 and gen2 are compared byte for byte — not merely both executed. A linker that mis-resolves a symbol produces a binary that links cleanly and then behaves wrong; using its output as the linker is what catches that, and comparing the two generations is what catches output depending on anything but the input.
The single exemption is
.comment, where the linker writes its own version string: a generation linked by a differently-built reld truthfully differs there. Per DESIGN.md §3.1 that is one named field with every other byte still compared, and a failure reports the offset of the first divergence rather than just "differs".Finally the self-hosted reld links and runs a program, so "it exists" is not mistaken for "it works".
Measured on this host
The 39 bytes are the recorded linker identity (
Linker: Reld 0.1.0 <sha>), which differs because gen0 here was built at an earlier commit than gen1. Everything else is identical.Cost
Three release builds, so it is its own workflow (
selfhost-linux.yml, PR + push to main + dispatch) rather than buried in a job doing something else. The comparison logic is unit tested inci/tests/test_selfhost.pyagainst hand-built ELF files — exempt-range hit, exempt-range miss with the offset reported, no exemption, size mismatch, missing section, non-ELF input — so an exemption that silently widens fails on a PR.docs/plan/04-PHASE-2-LINUX.mdP2-T2 now names the real command instead of aci/selfhost.shthat never existed.Verification
uv run --no-sync python -m pytest ci/tests -q— 281 passed (7 new). The bootstrap itself was run locally end to end: both generations build, run, and agree.🤖 Generated with Claude Code