feat(abi-verify): structural ABI gate — Idris2 manifest ↔ Zig FFI dif…#31
Closed
hyperpolymath wants to merge 1 commit into
Closed
feat(abi-verify): structural ABI gate — Idris2 manifest ↔ Zig FFI dif…#31hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
…f (standards#92 Phase 1)
Adds `iseriser abi-verify`, a structural CI gate that diffs an
Idris2-derived ABI manifest against a cartridge's Zig FFI source.
Replaces today's test-only cross-check (`ssg-mcp` / `k9iser-mcp` cartridges
under boj-server) with a CI-grade gate that catches:
* enum encoding drift (variant integer value mismatches);
* `transition-allowed-but-rejected` (manifest allows what Zig rejects);
* `transition-forbidden-but-accepted` (manifest forbids what Zig accepts —
the safety-critical class, e.g. `ContentLoaded → Previewing` for SSG
or `Generated → Applied` for K9);
* `transition-accepted-but-undeclared` (Zig accept-by-omission);
* `transition-table-uses-else` (refuses to certify non-exhaustive switches).
Includes hand-authored reference manifests for `ssg-mcp` (SsgState×11,
SsgEngine) and `k9iser-mcp` (K9State×10, K9Format), both verified clean
against the live Zig FFI on boj-server `main`. Phase 1b will emit the
manifests from the Idris2 build; this commit deliberately stops at the
verification-harness boundary per the #92 design spec.
Exit code 0 = clean, 2 = drift. JSON output available via `--json` for
CI ingestion.
33 lib tests + 9 integration tests green. New code is clippy-clean (pre-
existing baseline warnings on `src/scan/mod.rs` left as-is).
Refs hyperpolymath/standards#92
Refs hyperpolymath/standards#89
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
Closing as superseded. Branch tip ( |
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.
…f (standards#92 Phase 1)
Adds
iseriser abi-verify, a structural CI gate that diffs an Idris2-derived ABI manifest against a cartridge's Zig FFI source. Replaces today's test-only cross-check (ssg-mcp/k9iser-mcpcartridges under boj-server) with a CI-grade gate that catches:transition-allowed-but-rejected(manifest allows what Zig rejects);transition-forbidden-but-accepted(manifest forbids what Zig accepts — the safety-critical class, e.g.ContentLoaded → Previewingfor SSG orGenerated → Appliedfor K9);transition-accepted-but-undeclared(Zig accept-by-omission);transition-table-uses-else(refuses to certify non-exhaustive switches).Includes hand-authored reference manifests for
ssg-mcp(SsgState×11, SsgEngine) andk9iser-mcp(K9State×10, K9Format), both verified clean against the live Zig FFI on boj-servermain. Phase 1b will emit the manifests from the Idris2 build; this commit deliberately stops at the verification-harness boundary per the #92 design spec.Exit code 0 = clean, 2 = drift. JSON output available via
--jsonfor CI ingestion.33 lib tests + 9 integration tests green. New code is clippy-clean (pre- existing baseline warnings on
src/scan/mod.rsleft as-is).Refs hyperpolymath/standards#92
Refs hyperpolymath/standards#89
Summary
Changes
RSR Quality Checklist
Required
just testor equivalent)just fmtor equivalent)unsafeblocks without// SAFETY:commentsbelieve_me,unsafeCoerce,Obj.magic,Admitted,sorry).envfiles includedAs Applicable
.machine_readable/STATE.a2mlupdated (if project state changed).machine_readable/ECOSYSTEM.a2mlupdated (if integrations changed).machine_readable/META.a2mlupdated (if architectural decisions changed)TOPOLOGY.mdupdated (if architecture changed)CHANGELOGor release notes updatedsrc/interface/abi/andsrc/interface/ffi/consistent)Testing
Screenshots