fix(test-proofs): make the Idris2 ABI check able to fail (P0-2) - #140
Merged
Merged
Conversation
The old `test-proofs` recipe could never fail: it used `$$f` (bash saw PID+"f", so every file was reported [SKIP]), a failing `idris2 --check` only printed [FAIL], and a missing idris2 exited 0. - Add src/idris-abi/januskey-abi.ipkg. Idris2 resolves A.B.C to <sourcedir>/A/B/C.idr, and the ABI sources sit flat in src/abi/, so no sourcedir can reach them. They are not moved (aspect tests, Mustfile and the Zig FFI name src/abi/<File>.idr); instead src/idris-abi/ holds relative symlinks laid out by declared module name. Foreign.idr's `Januskey.ABI.Foreign` casing is listed as declared and left for J1-3. - Rewrite `test-proofs` as a bash shebang recipe with `set -euo pipefail` running `idris2 --typecheck` on the package. Missing idris2 exits 1 unless ALLOW_NO_IDRIS=1, which exits 0 with a loud SKIP. - Add the non-required workflow job "idris-abi (expected red until J1-3)" running the same typecheck in the idris2-pack image already used by pages.yml. Expected: `just test-proofs` now exits 1 on the known Types.idr errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 (7)
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 |
hyperpolymath
added a commit
that referenced
this pull request
Oct 2, 2026
Unblocks the **required** `scan / gitleaks` check, which is red on `main` (0613e69) and therefore on every open januskey PR, including ULTRAPLAN P0-1 (#141) and P0-2 (#140). ## Cause The estate secret scanner mirrors `.adoc` files, which default gitleaks never scans. Its `generic-api-key` rule matched two **example** UUIDs in a JSON sample in `docs/security/KEY_LIFECYCLE.adoc`: - :487 `"key_id": "123e4567-e89b-12d3-a456-426614174000"` - :488 `"new_key_id": "789e0123-e89b-12d3-a456-426614174000"` These are documentation placeholders, not secrets. ## Change Both values are replaced with obvious low-entropy placeholders (`00000000-0000-4000-8000-000000000001` and `…0002`). One file, 2 lines changed. ## Evidence Run locally with gitleaks and the estate baseline `standards:config/gitleaks/estate-baseline.toml` (origin/main): | Input | Result | |---|---| | original file (positive control) | `leaks found: 2`, generic-api-key at lines 487 and 488, the same two lines CI reports | | edited file | `no leaks found` | | all `.adoc` files in the repo, mirrored | `no leaks found` | 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxcAoyMQe7CjQwCKL18Mm4 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
ULTRAPLAN P0-2 —
just test-proofscould never fail. Now it can.Defect (Justfile:92-105 on 0613e69)
$$fis not a just escape: bash received$$(PID) +f, so every file printed[SKIP] … not found— the check examined nothing.idris2 --checkprinted[FAIL]and continued; the recipe exited 0.idris2printed SKIP and exited 0.idris2 --check src/abi/Types.idr→Module name JanusKey.ABI.Types does not match file name.Change
test-proofs→ bash shebang recipe,set -euo pipefail, runsidris2 --typecheck src/idris-abi/januskey-abi.ipkg. Missing idris2 = exit 1 unlessALLOW_NO_IDRIS=1(explicit, loud SKIP).src/idris-abi/— the ipkg plus relative symlinks intosrc/abi/laid out by module path. The sources stay put becausetests/aspect/cross_cutting_test.sh, the Mustfile and the Zig FFI namesrc/abi/<File>.idr; physically moving them belongs with J1-3..github/workflows/idris-abi.yml— non-required jobidris-abi (expected red until J1-3)in the sameidris2-pack@sha256:f0758996…imagepages.ymluses.Evidence
just test-proofsTypes.idr(first:Undefined name isInfixOf, :63)Idris 2, version 0.8.0-6ca00e72e)FAIL: idris2 not installed…ALLOW_NO_IDRIS=1SKIP: … ABI proofs were NOT checked.This job is expected red. That is the honest state of the ABI proofs: they have not typechecked on main. J1-3 fixes them; the job then goes green and can be made required.
Known, deliberately not fixed here
Foreign.idrdeclaresJanuskey.ABI.Foreignand importsJanuskey.ABI.{Types,Layout}which no file declares;Proofs.idrimportsJanusKey.ABI.Foreign. Casing fix = J1-3. (TheJanuskey/+JanusKey/dirs collide on case-insensitive FS; noted in the ipkg.)test-alldepends ontest-proofsand is therefore red until J1-3 — correct..machine_readable/contractiles/Justfile:91keeps the old$$frecipe.actions.lock: not edited (no fix mode).--no-fixdrift is pre-existing (4/22 before, 4/23 after: codeql-action, haskell-actions/setup, action-send-mail). Checkout is pinned by full SHA so the new workflow stands alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01VxcAoyMQe7CjQwCKL18Mm4