fix(t27b-lab): LAB-IMAGE-STALE, 600 s poll, reference cache keyed by use closure + t27c + zig (Closes #6443) - #6535
Merged
Merged
Conversation
Contributor
This was referenced Oct 5, 2026
Closed
This was referenced Oct 5, 2026
Closed
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.
Closes #6443
Refs #6063
What
imagein status.json, in the run JSON (image) and in the run log.imageholds the git blob sha of the running lab.py and Dockerfile, the image build time (written by the Dockerfile) and the Railway deployment id.tri t27b doctorgets a new code, LAB-IMAGE-STALE. It fires when the running lab does not report an image (an image from before this change), or when the reported sha differs from master'scontrib/railway/t27b-lab.image_codeinspecs/tri/t27b/steward.t27, with 4 tests. Its C is generated witht27c gen-c.git ls-remote, and a run starts only when the master sha has moved. The unchanged-sha path was already there, so a shorter interval adds no idle work.T27_POLL_SECONDSstill overrides the default.useclosure (t27c splices imported declarations in), the t27c binary's content and the zig version./srv/refcache.jsonon the volume. Until now every run re-ran all ~720 reference specs, which took 320 s on the last run. The cache also carries t27b: per-test reference differential -- mismatch 0 today compares the JIT with an interpreter over the same IR #6441's per-test verdicts. A pass or fail cached without them is a miss when they are wanted.cli/t27b/src/blockers.rsRefRunner: the same key (toolchain_stamp,use_closure). Timeouts are no longer cached, and old timeout rows are dropped on load.steps.reference.cache= {hits, misses, not_cached}.Owner exception
On 2026-10-05 at about 16:00Z the owner approved hand-written code in languages other than t27 for this fix ("fix it and do not stop, do what is best"). The lab and the doctor are still Python, and the reference runner is Rust. This adds to the debt that #6198 (port the t27b tooling to t27) has to repay. Only the decision moved into t27 (
image_code).specs/tri/t27b/steward.t27gen/c/tri/t27b/steward.ct27c gen-c, byte-reproducible)contrib/railway/t27b-lab/lab.pycontrib/railway/t27b-lab/Dockerfilescripts/tri_loop/t27b.py,scripts/tri_loop/t27b_rules.pycli/t27b/src/blockers.rs,cli/t27b/tests/refcache.rsscripts/ci/test_a_t27b_tick_reads_before_it_acts.py,scripts/ci/test_the_t27b_lab_heals_its_clone.pyVerified locally
Generated C:
cc -DT27_TEST_MAIN gen/c/tri/t27b/steward.creportsAll 124 tests passed. The steward test is count-agnostic since feat(t27b): per-test reference verdicts, reference_disagree apart from jit/interp mismatch #6530.test_a_t27b_tick_reads_before_it_acts.py: PASS. Its image fixtures are current, unreported, differs, redeployed and no-master. A mutation control on(same == false)is caught.test_the_t27b_lab_heals_its_clone.py: PASS. The refcache checks are:Mutation controls (dropping the closure, caching timeouts) each fail it.
cargo test --release -p t27b --test refcache --test blockers: 10 + 7 passed.Doctor against the live lab: before this change it reported
LAB-IMAGE-STALE the lab does not report its image (deployed before #6443).After the merge, the lab is redeployed from master with
railway up. It has no git source, so a merge does not redeploy it (S37).🤖 Generated with Claude Code