Repository navigation
fix(abi): package Coprocessor.Foreign at its module path (A5, 2/3) - #512
Merged
hyperpolymath merged 1 commit intoNov 16, 2026
Conversation
src/abi/CoprocessorForeign.idr declared `module Coprocessor.Foreign`, so its module name did not match its path and the package could not list it. Nothing type-checked it. Owner ruling on A5: salvage it into the package if it type-checks. - git mv to src/abi/Coprocessor/Foreign.idr (contents unchanged; the module declares %default total and uses no believe_me, assert_total or postulate). - echidnaabi.ipkg lists Coprocessor.Foreign, so idris2-abi-ci type-checks it. This PR's ABI job is the type-check. If it fails, the module comes out again rather than being forced through. - w0.sh check 07b now looks for Coprocessor/Foreign.idr. At the old path the check would skip the moved file and pass vacuously. The selftest is updated (68 cases, 0 failed). - The SPARK spec comments and PROOF-STATUS R2 name the new path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
|
hyperpolymath
marked this pull request as ready for review
November 16, 2026 19:40
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
hyperpolymath
merged commit Nov 16, 2026
b961411
into
claude/new-session-th4e9w-a5-shadows
30 checks passed
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
hyperpolymath
pushed a commit
that referenced
this pull request
Nov 16, 2026
Packaging Coprocessor.Foreign (#512) made it the checked coprocessor ABI, but its CoprocessorKind stopped at Fpga = 10. The Rust enum in src/rust/coprocessor/types.rs also declares the live Phase 2b subprocess backends PariGp, Maxima, Singular, Gap and Macaulay2 (constructed by CoprocessorFactory in coprocessor/mod.rs), with implicit discriminants 11 to 15. Add them in that order: constructors, the u8 encoding and decoding, the round-trip lemma kindEncodeDecodeId, and coprocessorHealthOf (Unhealthy, as for the other subprocess kind, Fpga). Found by Codex on #511. PROOF-STATUS R2 named "that job's first green run after the move" as the receipt, which identified no run (also Codex on #511). It now links the ABI job's green run on dc36ee9 for the eleven-kind module, and says the extended module has no receipt until that job is recorded for this commit. Idris 2 is not available in this session; the ABI job on this PR's head is the check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
hyperpolymath
pushed a commit
that referenced
this pull request
Nov 17, 2026
The schema-id step runs under `set -euo pipefail`. When either grep
matched nothing, the pipeline failed and the step exited before it
printed the ::error line, so the failure carried no message. Both greps
are now wrapped in `{ … || true; }`, so an empty result reaches the -z
check and the error is printed. Checked both ways: the real tree passes,
and a schema with no `@0x…;` line prints the error and exits 1.
PROOF-STATUS R2 cited only the 2026-11-09 receipts on a2a8643, whose
src/abi/ tree matched 2ab7574. #511, #512 and this PR have changed
src/abi/ since then. R2 now says so and cites this PR's own
Type-check Idris2 ABI definitions run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
8 of 9 tasks
hyperpolymath
added a commit
that referenced
this pull request
Nov 17, 2026
… in CI (#521) ## Summary This follows up on #512 (and the #511 batch). `Coprocessor.Foreign` maps each `CoprocessorKind` to a u8 tag from 0 to 15. The Rust enum in `src/rust/coprocessor/types.rs` had no discriminants. The tags therefore matched Rust only by declaration order, and reordering or inserting a Rust variant would have shifted the Rust side without any error. ## Changes - **Rust `CoprocessorKind`:** now `#[repr(u8)]` with explicit discriminants 0 to 15. Nothing in Rust casts the kind today, so behaviour does not change. - **New `scripts/ci/check-coprocessor-tags.sh`:** compares the Rust and Idris lists as `Name=tag` pairs. It fails on any difference, on a Rust variant with no explicit discriminant, or when either list is empty. - **`idris2-abi-ci.yml`:** runs that check on every event. On pushes to `main`, it also runs when `types.rs` or the script changes. - **`Coprocessor/Foreign.idr`:** - The header said "Phase 0 declares the Math kind only". It now says the module declares all sixteen kinds. - The tag doc comment no longer says Rust has no discriminants. ## RSR Quality Checklist ### Required - [x] Tests pass: the check passes on the tree and fails on both broken copies (see Testing). - [x] Code is formatted: `cargo fmt --all -- --check` passes. - [ ] Linter is clean: `cargo check --locked --lib` passes. Clippy and actionlint were not run in this session; CI runs both. - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` comments - [x] No banned functions - [x] SPDX license headers present on all new files - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] ABI/FFI changes validated: the Rust and Idris tags agree, and the check enforces it. ## Testing - `bash scripts/ci/check-coprocessor-tags.sh` on the tree prints `coprocessor tags agree: 16 kinds` and exits 0. - Copy with the Idris tag for `Gap` changed to 13: the script prints `::error … disagrees`, shows the diff `rust Gap=14` / `idris Gap=13`, and exits 1. - Copy with the Rust variant `Gap` left without a discriminant: the script prints `::error … variants without an explicit discriminant` and exits 1. --- _Generated by [Claude Code](https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3)_ --------- Co-authored-by: Claude <[email protected]>
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
src/abi/CoprocessorForeign.idrdeclaredmodule Coprocessor.Foreign. Its module name did not match its path, so the package could not list it, and nothing type-checked it. Owner ruling on A5: put it in the package if it type-checks.What
git mvtosrc/abi/Coprocessor/Foreign.idr. The contents are unchanged. The module declares%default totaland uses nobelieve_me,assert_totalorpostulate.echidnaabi.ipkglistsCoprocessor.Foreign. This PR's ABI type-check job is the test. If it fails, the module comes out again; it is not forced through.scripts/gates/w0.shcheck 07b now looks forCoprocessor/Foreign.idr. At the old path the check would skip the moved file and pass vacuously. The self-test is updated:bash scripts/gates/w0.selftest.shgives 68 cases, 0 failed.coprocessor_safety.ads) and PROOF-STATUS R2 name the new path.idris2is not available in this session, so the type-check is left to CI.Stacked on the A5 PR 1/3 branch (
claude/new-session-th4e9w-a5-shadows).Generated by Claude Code