Skip to content

ci: add ABI↔FFI conformance gate#41

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/new-session-1fphit
Jun 26, 2026
Merged

ci: add ABI↔FFI conformance gate#41
hyperpolymath merged 1 commit into
mainfrom
claude/new-session-1fphit

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

ABI↔FFI conformance gate

Adds a CI gate enforcing that the Zig FFI (src/interface/ffi) conforms to the Idris2 ABI (src/interface/abi — the source of truth):

  • scripts/abi-ffi-gate.py — fails (exit 1) if a declared %foreign "C:<name>" symbol (across all ABI .idr files) has no export fn in the Zig, if the Zig Result = enum(c_int) and Idris resultToInt disagree on names or values, or if an unrendered {{...}} template token remains. No toolchain required.
  • .github/workflows/abi-ffi-gate.yml — runs the gate, plus builds + tests the FFI under the pinned Zig 0.14.0.

Verified non-vacuous and green on this repo (whose FFI was implemented earlier this session). Part of the family-wide rollout.

CI note

rust-ci / Hypatia / governance reds are pre-existing estate-infra unrelated to this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH


Generated by Claude Code

Adds scripts/abi-ffi-gate.py (fails on a declared ABI C function with no Zig
export, a mismatched result-code map, or an unrendered template token) and a
.github/workflows/abi-ffi-gate.yml that runs it plus a Zig 0.14.0 build/test
of the FFI. The Idris2 ABI is the source of truth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH
@hyperpolymath hyperpolymath marked this pull request as ready for review June 26, 2026 23:06
@hyperpolymath hyperpolymath merged commit fa43c23 into main Jun 26, 2026
21 of 24 checks passed
@hyperpolymath hyperpolymath deleted the claude/new-session-1fphit branch June 26, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants