From 758e6cbd67dbda1afb79a768651a1ede60bc1e3b Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:54:37 +0000 Subject: [PATCH] Replay Proven header diagnostics through the actual RefC backend --- ...-11-16-consumer-boundary-proof-design.adoc | 13 +++++++ tests/consumer-boundary/README.adoc | 35 +++++++++++++++++++ .../consumer-boundary/proven-header-probe.sh | 9 +++-- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 tests/consumer-boundary/README.adoc diff --git a/docs/decisions/2026-11-16-consumer-boundary-proof-design.adoc b/docs/decisions/2026-11-16-consumer-boundary-proof-design.adoc index a6356dd..ccf5862 100644 --- a/docs/decisions/2026-11-16-consumer-boundary-proof-design.adoc +++ b/docs/decisions/2026-11-16-consumer-boundary-proof-design.adoc @@ -168,6 +168,19 @@ headers; no successful checker leg is claimed for it. == Next implementation packets and acceptance criteria +Follow-up implementation evidence: Proven now has a reachable Idris byte-state +kernel and a native RefC bundle path. The consumer diagnostic links that actual +library; the five original cases agree. Its stronger ABI corpus covers all byte +pairs and rejects an always-clean compiled mutant. This closes the observed +behavioral disagreement, not the unproved source/compiler refinement relation. + +The adapter's finite decoder now has both decoding laws and its partial +registration model has a no-fabricated-handler theorem. Its executable RefC +matrix covers all 256 tags and four registration states. The actual Zig +registration table and network transports are still pending. See +link:../../tests/consumer-boundary/README.adoc[the consumer diagnostic] for +reproduction and the explicit receipt boundary. + [cols="1,3,4",options="header"] |=== |Order |Packet |Evidence needed to finish diff --git a/tests/consumer-boundary/README.adoc b/tests/consumer-boundary/README.adoc new file mode 100644 index 0000000..ead8b57 --- /dev/null +++ b/tests/consumer-boundary/README.adoc @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: CC-BY-SA-4.0 +// Copyright (c) 2026 Jonathan D.A. Jewell += Proven header consumer diagnostic + +Run `bash tests/consumer-boundary/proven-header-probe.sh /path/to/proven` with +Idris2 `b6cbc25d5cd2ef2a250556266fd7b68dfc360f8b` and Zig 0.15.2 on native +Linux x86_64 GNU. `IDRIS2`, `ZIG` and `EVIDENCE_DIR` may select explicit paths. + +The diagnostic compiles the existing Idris String predicate independently, +builds Proven's actual RefC byte kernel and SDK bundle, then links the exported +C ABI into a Zig caller. The standalone unavailable-backend wrapper is not a +successful substitute. Missing build scripts, SDKs, symbols or nonzero statuses +are failures. + +The five expected rows (Idris and Zig columns) are: + +[source,text] +---- +cr true true +lf true true +crlf true true +clean false false +embedded-cr true true +---- + +The earlier adjacent-pair implementation disagreed on three rows. The repaired +bridge agrees on all five. Logs bind source hashes, compiler versions and the +actual generated SDK. Proven's separate `scripts/test-header-bridge.sh` covers +all single bytes and byte pairs, NUL, non-UTF-8 and length boundaries, including +a broken-backend rejecting control. + +This script is a differential executable diagnostic. It does not issue an +Atoma source-proof receipt. The current source frontend cannot represent the +loop, pointer span, foreign-call state transition or all compilation steps. +The corresponding source/refinement result therefore remains INCOMPLETE. diff --git a/tests/consumer-boundary/proven-header-probe.sh b/tests/consumer-boundary/proven-header-probe.sh index 0eec987..126d6f1 100644 --- a/tests/consumer-boundary/proven-header-probe.sh +++ b/tests/consumer-boundary/proven-header-probe.sh @@ -21,7 +21,8 @@ cp -R "$proven/src/Proven" "$work/src/Proven" git -C "$proven" rev-parse HEAD "$idris" --version "$zig" version - sha256sum "$proven/src/Proven/SafeHeader/Types.idr" "$proven/src/Proven/Core.idr" "$proven/ffi/zig/src/main.zig" + git -C "$proven" diff --stat + sha256sum "$proven/src/Proven/SafeHeader/Types.idr" "$proven/src/Proven/Core.idr" "$proven/src/Proven/SafeHeader/ByteKernel.idr" "$proven/ffi/zig/src/core.zig" "$proven/ffi/zig/src/header_refc.zig" "$proven/ffi/zig/src/main_refc.zig" } > "$evidence/inputs.log" cat > "$work/src/AtomaHeaderProbe.idr" <<'IDRIS' module AtomaHeaderProbe @@ -47,8 +48,10 @@ pub fn main() !void { } } ZIG -"$zig" build-obj "$proven/ffi/zig/src/main.zig" -lc -femit-bin="$work/proven.o" > "$evidence/zig-build.log" 2>&1 -"$zig" build-exe "$work/probe.zig" "$work/proven.o" -lc -femit-bin="$work/probe" >> "$evidence/zig-build.log" 2>&1 +IDRIS2="$idris" bash "$proven/scripts/build-header-refc.sh" "$work/bundle" > "$evidence/header-build.log" 2>&1 +cp "$work/bundle/identity.log" "$evidence/header-identity.log" +(cd "$proven/ffi/zig"; "$zig" build --build-file build_standalone.zig -Dheader-refc="$work/bundle" --prefix "$work/install") > "$evidence/zig-build.log" 2>&1 +"$zig" build-exe "$work/probe.zig" "$work/install/lib/libproven_ffi.a" "$work/bundle/libidris2_refc.a" "$work/bundle/libidris2_support.a" -lc -lgmp -lm -lpthread -femit-bin="$work/probe" >> "$evidence/zig-build.log" 2>&1 "$work/probe" > "$evidence/zig-results.txt" 2>&1 for result in idris-results.txt zig-results.txt; do if [[ $(wc -l < "$evidence/$result") -ne 5 ]] || grep -Evq '^(true|false)$' "$evidence/$result"; then