Skip to content

P0: produce and test a verified libproven artifact for Elixir/Rustler consumers #235

Open

Description

@hyperpolymath

Consumer failure and cross-repository dependency

OPSM's required Elixir CI is blocked before the tests run: proven_nif fails with rust-lld: unable to find library -lproven (see OPSM #135, failed CI).

This is not merely an OPSM runner-path issue:

  1. bindings/elixir/native/proven_nif/build.rs searches PROVEN_LIB_DIR, a relative ffi/zig/zig-out/lib, and system paths, then unconditionally emits cargo:rustc-link-lib=dylib=proven. It does not build or ensure the file exists.
  2. ffi/zig/build.zig currently constructs a static libproven target (b.addLibrary) with the real Idris2 RefC requirements. The Rust NIF explicitly requests a dynamic proven library. Need an agreed shared/static ABI link strategy, not just a search path.
  3. ffi/zig/build.zig.zon has an in-workspace .path dependency on the private cross-owner nextgen-languages/language-bridges. The GitHub connector cannot resolve that repository, and FFI Full Integration gates the entire build behind LANGUAGE_BRIDGES_TOKEN and uses skip-on-missing-credential steps. A green/skipped workflow is not verification of the real ABI.
  4. zig-ffi.yml uses build_standalone.zig (a pure Zig ABI surface without the Idris2 RefC pipeline); do not use its green checks as evidence of the verified-core linkage.
  5. Existing #151 and PR [codex] ci: restore full Idris RefC Zig integration #154 documented the credential constraint; the issue was closed, but the PR explicitly says full pipeline validation was blocked. Independent consumer proof is still missing.

Required integration contract / acceptance

  • Decide and document the source of truth for the Idris2/RefC+Zig build and ABI dependency, with pinned audited source revisions and approved, minimally scoped bridge access.
  • Supply the actual libproven artifact (or an upstream reproducible build process) to the Elixir binding's link stage. Match Rustler's requested library kind and verify runtime loader search/RPATH; no opaque placeholder, mock, fallback-to-unverified implementation, missing-symbol stub or native-check bypass.
  • Check expected symbols against bindings/elixir/native/proven_nif/src/lib.rs; perform an end-to-end NIF smoke test invoking functions that reach the verified core.
  • Ensure the full build fails when the bridge cannot be reached. Separate explicit unavailable from passed verification in CI summaries.
  • Run on the pinned Idris2 0.8.0, Zig 0.15.2 and supported Rust/Elixir versions; record reproducible evidence and resulting artifact checksums.
  • Integrate the dependency into OPSM, rerun its strict compile, tests and Proven-Tests manifest, and require green CI / gate on the latest commit.

Scope

Cross-repo blocker for OPSM; avoid altering public APIs or claiming theorem coverage without evidence. Changes should be separate scoped PRs, with app reviews resolved and green CI prior to merging.

Activity

  1. added
    testingTests, benchmarks, fuzzing, property checks, coverage
    on Nov 15, 2026
  2. hyperpolymath commented on Nov 15, 2026

    @hyperpolymath
    OwnerAuthor

    2026-11-15 live diagnosis and scoped fix: draft PR #236 now adds an exported-symbol validator with six real positive/negative controls (locally and in GitHub Actions), and checks the real compiled libproven.a when the Idris/RefC/Zig job runs. Source census: Rustler NIF declares 66 C ABI functions, current ffi/zig/src/main.zig directly exports 17, only five names overlap, so 61 required names are absent from the direct Zig source; source-level proven_init return types also conflict. These figures do not establish what generated RefC output might export. Importantly, the FFI workflow previously reported a green 'Idris -> RefC -> Zig' while LANGUAGE_BRIDGES_TOKEN was missing and integration skipped. PR #236 changes that to explicit NOT RUN/failure. Current Actions correctly fail that integration job; the six negative controls pass. Still required before closing this issue: authorized access to the private language-bridges source, actual RefC code generation, complete typed ABI parity, link-kind consistency, authenticated build artifacts, Elixir/Rustler runtime smoke checks, and latest-commit green required CI. Do not replace with the narrower standalone Zig library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTests, benchmarks, fuzzing, property checks, coverage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions