Repository navigation
Repair the actual Idris–RefC–Zig header bridge and replay its boundary proofs - #237
Merged
Merged
Conversation
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.
The header export previously checked only adjacent CRLF, disagreeing with the Idris predicate on lone CR and LF. It now calls the actual compiled Idris Bits8 transition through RefC. Zig walks the exact byte span, marshals tagged words and validates the returned state. NUL and non-UTF-8 remain data; absent backends and invalid results are explicit errors.
The qualified profile is native Linux x86_64 GNU, Zig 0.15.2 and Idris2 b6cbc25d5cd2ef2a250556266fd7b68dfc360f8b. The missing private language-bridges dependency has been replaced by a scoped repository-local ABI helper using the actual compiler SDK. Producer invalidation, complete input hashes, stale-bundle refusal and independent compiler-diagnostic/absent-output controls are included. This does not reconstruct the lost repository or implement all declared C APIs.
Soundness follow-up:
Remote evidence at final signed head bb98fbc:
All head checks have completed: 51 successful, three skipped, one neutral and three failing. Both macOS targets now pass after moving ARM64 off the retired runner (Zig FFI run). No known review threads remain unresolved.
Merge blockers remain visible. The full OCaml audit at the final head requires 146 distinct symbols: nine exist, 137 are absent, and lifecycle signatures also conflict with the public header. The qualified proven.wired five-symbol profile passes; the full-API probe deliberately remains failing. Diagnostics across all 29 property modules found 28 failing modules (241 compiler diagnostics, not vulnerability findings); repairing SafeMath does not repair them. Five source licence headers await the owner's decision. The repository also retains a native code_coverage protection rule; no protection change has been applied. No dummy exports, proof admissions, gate bypasses or licence changes are included.
Source-to-proof remains incomplete: Atoma's importer does not yet cover this codec/loop or UAA's real registry; source/model correspondence, the foreign-call contract, pointer-region validity and compiler refinement remain separate obligations. The proofs here are model proofs and hand re-proofs, not automatic witness transport. See docs/adr/2026-11-16-header-refc-boundary.adoc. UAA #20 provides the second real C ABI consumer, with production-library comparisons against its Idris registry model.