Repository navigation
fix(abi): correct the Cap'n Proto schema id mirror and gate it against the schema - #508
hyperpolymath wants to merge 6 commits into
Conversation
…t the schema EchidnaABI.CapnSchemas.echidnaSchemaId held 15242516543891767314 (0xd3884c09d1af0012). schemas/echidna.capnp declares 0xd3b45f8ae1c79012, which is 15254922887908790290. The non-zero proof passed because it only rules out 0. The constant is now the same hex literal the schema file declares. The idris2-abi-ci workflow gets a step that compares the two textually on every event and fails if they differ. A change to schemas/echidna.capnp now also triggers the workflow's full run. Reported by review on #472 after merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
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. |
…ss (#519) ## Summary The live `Branch-Floor` ruleset on `main` requires a status check named `CI/gate`. No workflow in echidna produced that check, and `main` had none. Since 2026-11-16 19:45Z, when the ruleset last changed, no pull request has merged: #508–#511, #514 and #517 all show `blocked`, and none of them has a failing check. On 2026-11-17 the owner ruled to keep the requirement and give it a producer. This PR does that. ## Changes - `.github/workflows/rust-ci.yml`: new job `gate`, named `CI/gate`. That name is the check context the ruleset requires. - It depends on `detect`, `check`, `test`, `audit` and `coverage`. - It passes only when `Cargo.toml` was detected and all five jobs succeeded. - A skipped, cancelled or missing job fails it, so the gate cannot pass on work that did not run. - Same pattern as hypatia's `ci.yml` `CI/gate`. - No action is used, so `actions.lock` does not change. ## RSR Quality Checklist ### Required - [x] Tests pass: the gate script was run against fixtures (see Testing). - [x] Code is formatted: not applicable, YAML only. - [ ] Linter is clean: actionlint was not available in this session. The repo's Workflow Security Linter will lint the file on this PR. - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` comments: not applicable. - [x] No banned functions: not applicable. - [x] SPDX license headers present: the file keeps its existing header. - [x] No secrets, credentials, or `.env` files included ## Testing I extracted the step script with `yq` and ran it against five `needs` fixtures: | Case | Exit code | |---|---| | All five jobs succeed | 0 | | `test` failed | 1 | | `coverage` cancelled | 1 | | `has_cargo=false`, `check` skipped | 1 | | `audit` missing | 1 | **Not tested:** that GitHub reports the check under the exact context `CI/gate`. This PR's own run will show it. **Other rules may still block these PRs once `CI/gate` passes.** The live ruleset also requires: - signed commits (agent commits here are unsigned) - linear history - resolved review threads - an 80% `code_coverage` rule Those are outside this change. --- _Generated by [Claude Code](https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3)_ Co-authored-by: Claude <noreply@anthropic.com>
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
…4e9w-capnp-id # Conflicts: # .github/workflows/idris2-abi-ci.yml
…4e9w-capnp-id # Conflicts: # .github/workflows/idris2-abi-ci.yml
|



Why
#472 added
EchidnaABI.CapnSchemastoechidnaabi.ipkg. ItsechidnaSchemaIdis wrong:schemas/echidna.capnp:120xd3b45f8ae1c79012= 15254922887908790290CapnSchemas.idr:370xd3884c09d1af0012schemaIdNonZerostill passes, because it only rules out 0. Review on #472 found this after the merge.What
echidnaSchemaIdis now the hex literal0xd3b45f8ae1c79012, the same text the schema file declares.idris2-abi-ci.ymlgets a new step, "Cap'n Proto schema id matches its Idris mirror". It compares the two hex literals and fails if either is missing or they differ. It runs on every event, because it is cheap.schemas/echidna.capnpis added to the workflow's push paths and to the PR detect pattern, so a schema-only change runs the full check.Checks run
mainit fails, because the constant there is a decimal literal that the check cannot read.idris2is not available in this session, so the type-check is left to theType-check Idris2 ABI definitionsjob. Idris 2 lexes0x…integer literals, andfromIntegergives the sameNatas the decimal form.Generated by Claude Code