Repository navigation
fix(ci): complete the Idris2 support install so abi-codegen-drift can pass - #819
Merged
Merged
Conversation
PR #817 squash-merged at head c82e9aa, which carried only the first half of this fix. `abi-codegen-drift` on main (5060161) is still red. This carries the remainder. The gate needs two support artefacts that were absent under `$(idris2 --libdir)` on the runner: INTERNAL ERROR: Can't find data file chez/support.ss (compile time) (while loading libidris2_support.so) cannot open shared object file (run time) #817 cured the first by copying `support/` in as data. That is not sufficient: `libidris2_support.so` is a BUILT C library, not data, and the Chez backend copies it into the executable's `_app` directory at link time. Repairing an incomplete installation file by file reveals one layer per CI round trip, so this uses the tree's own targets instead, which are complete by construction: make -C <src> support make -C <src> install-support PREFIX="$(idris2 --prefix)" It builds `support/` only, never the compiler, and costs seconds. Corrects the cause recorded in #817. It is NOT that library builds do not need the support tree. Idris2's Makefile has install: install-idris2 install-support install-libs so verify-proofs.yml's `sudo make install PREFIX=/usr/local` does install it -- under /usr/local/idris2-0.7.0. The binary resolves `--libdir` to /home/runner/.idris2/idris2-0.7.0. It is a PREFIX MISMATCH, and that job's cache `path:` list names both prefixes. Library work never needs the difference, which is why only a job linking an executable noticed. Also: * Assert on the CONSUMER's artefact. #817 asserted the installer's output and the job still died at run time. This checks `build/abi-gen/exec/hypatia-abi-gen_app/libidris2_support.so` -- the thing that actually has to load it -- and smoke-tests the binary with `--help`. * `Gen.idr`: `--help` now exits 0. It exited 1, so under `set -e` the smoke test would have forced an `|| true`, which is indistinguishable from a masked failure. Missing arguments remain a usage error and still exit 1. Verified locally before pushing: `--help`/`-h` rc=0, no-args and one-arg rc=1, regeneration prints `connectors emitted: 16` / `files written: 3 of 3` with zero diff against all three tracked targets, and all four mutants behave -- clean tree green; hand-edited generated Zig 1 drifted; wire ids 3<->4 swapped in the live Types.idr without regenerating 3 drifted (the one proving the gate reads the normative source, not merely that the copies agree); empty output dir fails on the denominator at `compared 0 of 3`. Refs #120, #811, #817 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0113HQM9LVGkNCzU1WwkJZSV
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 22, 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.
Why this exists
PR #817 was squash-merged at head
c82e9aa, which carried only the firsthalf of the fix. The second commit landed on the branch after the merge and
is not in
main. Measured, not assumed:abi-codegen-drift— the gate #811 shipped — is still red onmain. ThisPR carries the remainder.
What was actually wrong
Running (not merely building) an Idris2 executable needs two support artefacts,
and neither was present under
$(idris2 --libdir)on the runner:<libdir>/support/chez/support.ssINTERNAL ERROR: Can't find data file chez/support.ss<libdir>/lib/libidris2_support.so(while loading libidris2_support.so) cannot open shared object file#817 cured the first by copying
support/in as data. That is not sufficient —libidris2_support.sois a built C library, not data, and the Chez backendcopies it into the executable's
_appdirectory at link time. Fixing anincomplete installation file-by-file reveals one layer per CI round trip, which
is exactly how the second failure happened. So this uses the tree's own
targets, which are complete by construction:
It builds
support/only, never the compiler — seconds, not a bootstrap.⚠ It corrects the cause #817 recorded
#817 says library builds do not need the support tree, so the shared cache
never had it. That is false, and the evidence was already in the repo.
Idris2's top-level Makefile:
so
verify-proofs.yml'ssudo make install PREFIX=/usr/localdoes installsupport — under
/usr/local/idris2-0.7.0/. The binary resolvesidris2 --libdirto/home/runner/.idris2/idris2-0.7.0, and that job's cachepath:list names both prefixes. It is a prefix mismatch. Library work(
--check,--buildon the two proof packages) never needs the difference,which is why only a job linking an executable ever noticed.
The fix is correct either way because it anchors on
$(idris2 --libdir)/$(idris2 --prefix)rather than on a hard-coded prefix — but the comment inthe workflow now says what was measured instead of the tidier story.
Two further changes
Assert on the consumer's artefact. #817 asserted the installer's output
and the job still died at run time. This asserts
build/abi-gen/exec/hypatia-abi-gen_app/libidris2_support.so— the thing thatactually has to load it — because a build missing that copy still exits 0, and
the failure then surfaces one step later inside the comparison, where it reads
as a drift failure rather than a toolchain fault. Plus a
--helpsmoke test:the cheapest proof the binary runs, and it writes nothing, so it cannot mask a
drift failure by leaving output behind.
Gen.idr:--helpexits 0. It exited 1, so underset -ethe smoke testwould have failed and tempted an
|| true— the exact pattern theHypatiascanner flags and which is indistinguishable from a masked failure. Missing
arguments are still a usage error and still exit 1.
Verification done locally before pushing
--help/-h→ rc=0; no-args and one-arg → rc=1.connectors emitted: 16/files written: 3 of 3withzero diff against all three tracked targets.
arrow_flight→arrowflight)Types.idr, no regenThe third is the decisive one: it proves the gate reads the normative
source, not merely that the generated copies agree with each other.
Note on caching
The repair is deliberately not persisted —
Post Cacheis skipped on acache hit, so this job never mutates the shared entry and redoes the clone+build
each run. That is the intended property and should not be "optimised" away;
two workflows writing one cache key is how the poisoned
-1cache happened.Not blockers (pre-existing on
main, per the standing ruling)governance / Actions lockfile verify(#818, from #810) ·Check/Test/Clippy/Cargo check + clippy + fmt(#814) ·governance / {Code quality + docs, Validate Hypatia Baseline, Workflow security linter}·CodeQL Security Analysisstartup failure. None are touched by this diff.Refs #120, #811, #817
🤖 Generated with Claude Code
https://claude.ai/code/session_0113HQM9LVGkNCzU1WwkJZSV