Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e2843fd
Route exact-byte header checks through Idris RefC with replayable sta…
hyperpolymath Nov 16, 2026
f807d91
Select compatible GHC explicitly in the theory replay runner
hyperpolymath Nov 16, 2026
418fce9
Wire binding consumers to real RefC and enforce diagnostic failures
hyperpolymath Nov 16, 2026
377a4d5
Add the RefC consumer build action and diagnostic regression controls
hyperpolymath Nov 16, 2026
5c9a0aa
Exercise raw header spans in Chapel and D consumers
hyperpolymath Nov 16, 2026
24fd48e
Cache Agda runtime data and expose actual OCaml ABI blockers
hyperpolymath Nov 16, 2026
47dd78d
Own RefC marshaling locally and build fresh package output without pr…
hyperpolymath Nov 16, 2026
dfea883
Reject stale RefC evidence and document the qualified consumer boundary
hyperpolymath Nov 16, 2026
16598dd
Add an independently loadable five-symbol OCaml binding
hyperpolymath Nov 16, 2026
a8bb252
Check producer source closure and keep the full OCaml ABI gate explicit
hyperpolymath Nov 16, 2026
0eeb191
Invalidate failed header bundles and preserve complete boundary evidence
hyperpolymath Nov 16, 2026
b362bbf
Replace totality escapes with structural descent and explicit parser …
hyperpolymath Nov 16, 2026
3563d65
Run source totality regressions and expose every legacy property fail…
hyperpolymath Nov 16, 2026
4a6c8e9
Use the actual Idris 0.8 nonzero constructor in the arithmetic proof …
hyperpolymath Nov 16, 2026
72120c3
Keep GCD debt as propositions and audit the complete OCaml symbol sur…
hyperpolymath Nov 16, 2026
3424d6d
Make obligation schemas total and retain both checked Idris profiles
hyperpolymath Nov 16, 2026
e5a0078
Add replayed proof obligations for canonical RefC Bits8 words
hyperpolymath Nov 16, 2026
c285cf3
Frontload strict totality checks and report the remaining proof and A…
hyperpolymath Nov 16, 2026
e5eadce
Use transport-compatible constructor injectivity in the Bits8 proof
hyperpolymath Nov 16, 2026
8ebf5ad
Preserve totality without repeated input scans
hyperpolymath Nov 16, 2026
35dae0f
Isolate diagnostic refusal and close detached dependency guard gaps
hyperpolymath Nov 16, 2026
50e54dc
Construct the character-cache equality before computing its length
hyperpolymath Nov 16, 2026
bb98fbc
Move the ARM64 macOS check off the retired runner image
hyperpolymath Nov 16, 2026
7a0b11c
Make #237's build and OCaml full-API checks pass honestly: ABI status…
hyperpolymath Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 28 additions & 48 deletions .github/workflows/chapel-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,11 @@
#
# Chapel CI — proven binding-tier-1 pilot.
#
# This workflow is the DETACHABLE-HARNESS TEMPLATE for proven binding CI.
# It is intentionally narrow: it references ONLY paths under
# bindings/chapel/, ffi/zig/, and bindings/c/include/proven.h. No
# root-level test fixtures, no sibling-binding tooling, no surprise
# dependencies. See docs/adr/0001-binding-ci-template.md for the full
# detachability contract.
#
# Replication template (search/replace for the next binding):
# chapel -> <lang> (e.g. crystal, nim, ocaml)
# Chapel -> <Lang> (display name)
# bindings/chapel/ -> bindings/<lang>/
# chapel-ci.yml -> <lang>-ci.yml
# Chapel 2.3.0 -> <toolchain pin>
# ubuntu22.amd64.deb -> <toolchain installer>
# chpl --version -> <toolchain version probe>
#
# Quality posture: every job is strict (no continue-on-error). PRs that
# break Chapel are blocked from merge.

# Library producer: a sparse checkout of this binding, ffi/zig, the C header,
# scripts/build-header-refc.sh, src/Proven/SafeHeader/ByteKernel.idr and
# src/Proven/FFI/HeaderKernelMain.idr. The actual sparse build checks this closure.
# Consumer harnesses detach with their binding, C header and supplied .so artifact.
# See docs/adr/0001-binding-ci-template.adoc; the producer is not a binding-only build.
name: Chapel CI
permissions:
actions: read
Expand All @@ -32,13 +18,19 @@ on:
paths:
- 'bindings/chapel/**'
- 'ffi/zig/**'
- 'scripts/build-header-refc.sh'
- 'src/Proven/SafeHeader/ByteKernel.idr'
- 'src/Proven/FFI/HeaderKernelMain.idr'
- 'bindings/c/include/proven.h'
- '.github/workflows/chapel-ci.yml'
pull_request:
branches: [main]
paths:
- 'bindings/chapel/**'
- 'ffi/zig/**'
- 'scripts/build-header-refc.sh'
- 'src/Proven/SafeHeader/ByteKernel.idr'
- 'src/Proven/FFI/HeaderKernelMain.idr'
- 'bindings/c/include/proven.h'
- '.github/workflows/chapel-ci.yml'
workflow_dispatch:
Expand Down Expand Up @@ -97,18 +89,18 @@ jobs:
# from prose ("see bindings/c/include/proven.h.").
p="${raw%[.,;:)]}"
case "$p" in
bindings/chapel/*|ffi/zig/*|bindings/c/include|bindings/c/include/proven.h|.github/workflows/chapel-ci.yml)
bindings/chapel/*|ffi/zig/*|bindings/c/include|bindings/c/include/proven.h|.github/workflows/chapel-ci.yml|./scripts/symbol-audit.sh|scripts/build-header-refc.sh|src/Proven/SafeHeader/ByteKernel.idr|src/Proven/FFI/HeaderKernelMain.idr)
;;
bindings/*/*)
echo "::error file=.github/workflows/chapel-ci.yml::detachability violation: $p"
forbidden=1
;;
tests/*)
echo "::error file=.github/workflows/chapel-ci.yml::detachability violation (root-level tests/): $p"
tests/*|scripts/*|./scripts/*|src/*)
echo "::error file=.github/workflows/chapel-ci.yml::undeclared producer or root test dependency: $p"
forbidden=1
;;
esac
done < <(grep -oE '(bindings/[a-zA-Z0-9_-]+/[A-Za-z0-9_./-]*|tests/[A-Za-z0-9_./-]+)' \
done < <(grep -oE '(\./scripts/[A-Za-z0-9_./-]+|bindings/[a-zA-Z0-9_-]+/[A-Za-z0-9_./-]*|tests/[A-Za-z0-9_./-]+|scripts/[A-Za-z0-9_./-]+|src/[A-Za-z0-9_./-]+)' \
.github/workflows/chapel-ci.yml | sort -u)
[ "$forbidden" -eq 0 ]
echo "detachability-guard: OK"
Expand All @@ -119,43 +111,31 @@ jobs:
chapel-build:
runs-on: ubuntu-22.04
needs: detachability-guard
timeout-minutes: 20
timeout-minutes: 45
steps:
- name: Checkout proven
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
path: proven
sparse-checkout: |
bindings/chapel
bindings/c/include/proven.h
ffi/zig
scripts/build-header-refc.sh
src/Proven/SafeHeader/ByteKernel.idr
src/Proven/FFI/HeaderKernelMain.idr
sparse-checkout-cone-mode: false
- name: Setup Zig ${{ env.ZIG_VERSION }}
uses: mlugg/setup-zig@e7d1537c378b83b8049f65dda471d87a2f7b2df2 # v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Build libproven.so (WIRED-subset fixture)
- name: Build libproven.so with the actual Idris header backend
uses: ./proven/ffi/zig/actions/refc-library
- name: Audit the library symbols
working-directory: proven/ffi/zig
# NOTE: ffi/zig/build.zig depends on `idris2_zig_ffi` (relative
# path to a sibling estate repo). That dep is not resolvable
# from a fresh clone in CI (the same issue blocks zig-ffi.yml on
# main), and resolving it is out of scope for the Chapel pilot.
# All exports in src/main.zig are pure-Zig — none consume
# idris2_zig_ffi. We compile main.zig directly with
# `zig build-lib -dynamic -lc`, producing a libproven.so with
# the WIRED 5 symbols (proven_path_has_traversal,
# proven_header_has_crlf, proven_free_string, proven_version,
# proven_build_info). When proven#88 lands the real
# Idris-backed exports, this step swaps to
# `zig build -Dtarget=...`.
run: |
set -euo pipefail
mkdir -p zig-out/lib
zig build-lib -dynamic -O ReleaseSafe \
-fPIC \
--name proven \
-femit-bin=zig-out/lib/libproven.so \
src/main.zig -lc
ls -la zig-out/lib/
nm -D --defined-only zig-out/lib/libproven.so \
| awk '$2 ~ /^[TWV]$/ { print $3 }' \
| grep -E '^(proven_path_has_traversal|proven_header_has_crlf|proven_free_string|proven_version|proven_build_info)$' \
| sort -u | tee /tmp/wired-exports.txt
nm -D --defined-only zig-out/lib/libproven.so | awk '$2 ~ /^[TWV]$/ { print $3 }' | grep -E '^(proven_path_has_traversal|proven_header_has_crlf|proven_free_string|proven_version|proven_build_info)$' | sort -u | tee /tmp/wired-exports.txt
test "$(wc -l < /tmp/wired-exports.txt)" -eq 5
- name: Install Chapel ${{ env.CHAPEL_VERSION }} (SHA-pinned .deb)
run: |
Expand Down
49 changes: 30 additions & 19 deletions .github/workflows/d-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#
# D CI — proven binding-tier-1.
#
# This workflow follows the DETACHABLE-HARNESS contract for proven binding CI.
# It references ONLY: bindings/d/, ffi/zig/, and bindings/c/include/proven.h.

# Library producer: a sparse checkout of this binding, ffi/zig, the C header,
# scripts/build-header-refc.sh, src/Proven/SafeHeader/ByteKernel.idr and
# src/Proven/FFI/HeaderKernelMain.idr. The actual sparse build checks this closure.
# Consumer harnesses detach with their binding, C header and supplied .so artifact.
# See docs/adr/0001-binding-ci-template.adoc; the producer is not a binding-only build.
name: D CI
permissions:
actions: read
Expand All @@ -16,13 +18,19 @@ on:
paths:
- 'bindings/d/**'
- 'ffi/zig/**'
- 'scripts/build-header-refc.sh'
- 'src/Proven/SafeHeader/ByteKernel.idr'
- 'src/Proven/FFI/HeaderKernelMain.idr'
- 'bindings/c/include/proven.h'
- '.github/workflows/d-ci.yml'
pull_request:
branches: [main]
paths:
- 'bindings/d/**'
- 'ffi/zig/**'
- 'scripts/build-header-refc.sh'
- 'src/Proven/SafeHeader/ByteKernel.idr'
- 'src/Proven/FFI/HeaderKernelMain.idr'
- 'bindings/c/include/proven.h'
- '.github/workflows/d-ci.yml'
workflow_dispatch:
Expand Down Expand Up @@ -50,48 +58,50 @@ jobs:
while IFS= read -r raw; do
p="${raw%[.,;:)]}"
case "$p" in
bindings/d/*|ffi/zig/*|bindings/c/include|bindings/c/include/proven.h|.github/workflows/d-ci.yml)
bindings/d/*|ffi/zig/*|bindings/c/include|bindings/c/include/proven.h|.github/workflows/d-ci.yml|./scripts/symbol-audit.sh|scripts/build-header-refc.sh|src/Proven/SafeHeader/ByteKernel.idr|src/Proven/FFI/HeaderKernelMain.idr)
;;
bindings/*/*)
echo "::error file=.github/workflows/d-ci.yml::detachability violation: $p"
forbidden=1
;;
tests/*)
echo "::error file=.github/workflows/d-ci.yml::detachability violation (root-level tests/): $p"
tests/*|scripts/*|./scripts/*|src/*)
echo "::error file=.github/workflows/d-ci.yml::undeclared producer or root test dependency: $p"
forbidden=1
;;
esac
done < <(grep -oE '(bindings/[a-zA-Z0-9_-]+/[A-Za-z0-9_./-]*|tests/[A-Za-z0-9_./-]+)' \
done < <(grep -oE '(\./scripts/[A-Za-z0-9_./-]+|bindings/[a-zA-Z0-9_-]+/[A-Za-z0-9_./-]*|tests/[A-Za-z0-9_./-]+|scripts/[A-Za-z0-9_./-]+|src/[A-Za-z0-9_./-]+)' \
.github/workflows/d-ci.yml | sort -u)
[ "$forbidden" -eq 0 ]
echo "detachability-guard: OK"
d-build:
runs-on: ubuntu-22.04
needs: detachability-guard
timeout-minutes: 20
timeout-minutes: 45
steps:
- name: Checkout proven
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
path: proven
sparse-checkout: |
bindings/d
bindings/c/include/proven.h
ffi/zig
scripts/build-header-refc.sh
src/Proven/SafeHeader/ByteKernel.idr
src/Proven/FFI/HeaderKernelMain.idr
sparse-checkout-cone-mode: false
- name: Setup Zig ${{ env.ZIG_VERSION }}
uses: mlugg/setup-zig@e7d1537c378b83b8049f65dda471d87a2f7b2df2 # v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Build libproven.so (WIRED-subset fixture)
- name: Build libproven.so with the actual Idris header backend
uses: ./proven/ffi/zig/actions/refc-library
- name: Audit the library symbols
working-directory: proven/ffi/zig
run: |
set -euo pipefail
mkdir -p zig-out/lib
zig build-lib -dynamic -O ReleaseSafe \
-fPIC \
--name proven \
-femit-bin=zig-out/lib/libproven.so \
src/main.zig -lc
nm -D --defined-only zig-out/lib/libproven.so \
| awk '$2 ~ /^[TWV]$/ { print $3 }' \
| grep -E '^(proven_path_has_traversal|proven_header_has_crlf|proven_free_string|proven_version|proven_build_info)$' \
| sort -u | tee /tmp/wired-exports.txt
nm -D --defined-only zig-out/lib/libproven.so | awk '$2 ~ /^[TWV]$/ { print $3 }' | grep -E '^(proven_path_has_traversal|proven_header_has_crlf|proven_free_string|proven_version|proven_build_info)$' | sort -u | tee /tmp/wired-exports.txt
test "$(wc -l < /tmp/wired-exports.txt)" -eq 5
- name: Setup D compiler (LDC)
uses: dlang-community/setup-dlang@0a7469b93f791d83f30932c6fd105796c6966e20 # v2.0.0
with:
Expand Down Expand Up @@ -201,6 +211,7 @@ jobs:
PROVEN_LIB_PATH: ${{ github.workspace }}/lib
PROVEN_INCLUDE_PATH: ${{ github.workspace }}/bindings/c/include
LD_LIBRARY_PATH: ${{ github.workspace }}/lib
LIBRARY_PATH: ${{ github.workspace }}/lib
run: dub test
d-detachable-build:
runs-on: ubuntu-22.04
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#
# proven — E2E + Safety Aspect + Bench
#
# Tests the full proof chain: Idris2 → Zig FFI → integration.
# Tests the standalone surface, including explicit absent-backend refusal.
# header-refc.yml executes the real Idris -> RefC -> Zig header boundary.
# Safety aspects verify no dangerous patterns escape into production.

name: E2E + Safety + Bench
Expand Down Expand Up @@ -42,16 +43,14 @@ jobs:
uses: mlugg/setup-zig@e7d1537c378b83b8049f65dda471d87a2f7b2df2 # v1
with:
version: '0.15.2'
# Build the standalone pure-Zig FFI surface (src/main.zig only) -- no
# Idris2 RefC / idris2_zig_ffi dependency. The full Idris->RefC->Zig
# pipeline needs the private nextgen-languages/language-bridges repo,
# which CI cannot fetch as a path dependency; see PR #149.
# The standalone header function must return -99 without RefC.
# The public header-refc.yml gate supplies and exercises the real backend.
- name: Build FFI (standalone Zig surface)
run: cd ffi/zig && zig build --build-file build_standalone.zig
- name: Run FFI tests (standalone)
run: cd ffi/zig && zig build test --build-file build_standalone.zig
- name: Verify library output
run: ls -la ffi/zig/zig-out/lib/libproven_ffi.* || echo "Library output check"
run: test -s ffi/zig/zig-out/lib/libproven_ffi.a
safety-aspects:
name: Aspect — Safety Invariants
runs-on: ubuntu-latest
Expand Down
Loading
Loading