the No-Bullshit file: what we affirm was true and checkable at this moment
|
Note
|
Genre. An affirmation is a solemn declaration of the truth of a statement, made by someone who declines to swear an oath. That is exactly what this is: our truth-as-best-believed at a stamped instant — binding on our honesty, not a claim of infallibility. It is not the README and not the EXPLAINME:
It is deliberately small, dated, and signed, so a reader can hold us to exactly what we affirmed, when we affirmed it. |
What it is. A short, dated, jointly-signed snapshot of what we can honestly and verifiably claim about this repo at one exact moment. Nothing here is marketing and nothing is a promise about the future — both of those live in the README. This file is the receipt.
How it is designed to work. Three moving parts make it trustworthy:
-
Ground truth, not memory. Every claim below was produced by running the tool in the session that wrote this file — the proof checkers, the ABI conformance gate, and the in-BEAM test suite — on 2026-06-16. If a status doc or a memory said otherwise, the live run wins and we flag the contradiction.
-
A frozen anchor. The file names the exact commit SHA, branch, UTC timestamp, working-tree delta, and toolchain (see Verifiable anchor), so "true" always means "true at this point". Move the SHA and the file becomes a draft until re-run.
-
A real signature. It is landed by a signed git commit; that signature over this content at the anchored SHA is what makes the affirmation tamper-evident and attributable — not the prose alone.
We are fallible. We can be wrong, stale, or simply mistaken about our own work. This file is our best honest belief, not a proof of its own correctness. Treat it as a falsifiable claim, not gospel.
This document records our best joint belief at the timestamp below. It is not a guarantee of correctness. We may be wrong. We may have missed something — a hole, a stale doc, or a proof that checks an idealised model we then fail to match in the running runtime.
No intentional overclaim. That is the only guarantee here: we have not knowingly inflated anything. Where something is tested-but-not-proved, we say so. Where a proof covers a model and trusts the real runtime, we say so. Where something is ledgered, weak, or merely-an-interface-check, we say so. An honest claim here that turns out false is an error to fix — not a lie.
Standing invitation to refute. You are invited to bulldoze any claim in this file. The fair form of the attack is:
-
Read this file at the stamped commit.
-
Reproduce (or fail to reproduce) the checks in Reproduce it yourself.
-
Then tell us where the discrepancy is, against the artefact as it stood at this moment — so we can either justify it or concede it on the record.
An attack that skips steps 1–2 is attacking a strawman of a different date.
No fights before the facts are cleared up. We are not interested in a dispute over a claim until the discrepancy has actually been checked against the artefact at this commit and we have had the chance to either justify it or concede it on the record. Good faith both ways: bring a reproducible discrepancy and we will fix the claim, the doc, or the code — promptly and without defensiveness. The goal is a corrected record, not a won argument.
Repo |
|
Branch |
|
Commit (HEAD / anchor) |
|
Permalink |
https://github.com/hyperpolymath/snifs/tree/70d9f65fd2a57f216f35636f09cadbb3c5ca87c1 |
Verified (UTC) |
2026-06-16T15:03:15Z |
Toolchain |
Idris2 0.8.0 · Lean 4.13.0 · Agda 2.8.0 · Zig 0.15.2 · wasm-tools 1.249.0 · Elixir 1.18.4 / Erlang OTP 25 · wasmex 0.14.0 · Python 3.12.3 · just 1.50.0 |
|
Note
|
State at this anchor (a REFRESH). This supersedes the first affirmation (anchored
to |
This affirmation should be read against the repo’s own public claims. Where they drift from what we verified, we say so here rather than leave the reader to find out.
-
README.adoc— present. "SNIFs: Safer Native Implemented Functions for the BEAM via WebAssembly Sandboxing". Sells the vision + the scope ceiling; this file is its receipt for one moment. -
EXPLAINME.adoc— present. Maps README claims to code paths and carries the corrected "SNIF realizes a cleave instance, not the cleave" framing. The estate trio (README / EXPLAINME / AFFIRMATION) is complete for this repo once this file lands. -
PROOF-STATUS.md/PROOF-NEEDS.md— the living ledgers this snapshot cites, reconciled to the verified state in the anchor commit:PROOF-STATUS.mdnow counts 10 gated artifacts, marks SEC-1 F1/F2 RESOLVED (keeping F3/F4/F5 as standing precision notes), and records ABI-7 at 15/20 + CI-1 done. -
GitHub repo description — corrected this session to "SNIFs: Safer Native Implemented Functions for the BEAM via WebAssembly Sandboxing" (it previously said "Safe"; the project renamed "Safe NIFs" → "Safer NIFs" — see
CHANGELOG— because the end-to-end guarantee is not unconditional, see The honest nuance you must not lose). -
GitHub topics —
beam,elixir,erlang,fault-tolerance,nif,research,wasmtime,webassembly,crash-isolation. Under-claim: there is noformal-verificationtopic, although the repo now carries 10 machine-checked proof artifacts + a machine-checked operational isolation theorem. The tags undersell the verification rather than oversell it.
SNIFs is a working, machine-verified "safer NIF" for the BEAM: native
compute/buffer functions compiled to WebAssembly and run in a wasmtime sandbox,
so a guest fault becomes a catchable {:error, _} and the BEAM survives. The
in-BEAM demo is green, the formal gate is green (including an operational
crash-isolation theorem with deniability and a 6-origin error taxonomy wired in),
and the interface + a slice of behaviour are gated against the real built wasm —
yet it remains "Safer", not "Safe": one explicit runtime-faithfulness assumption
is trusted, not yet machine-discharged, and several coverage items are honestly
ledgered.
-
The formal gate is green — verified this moment.
just proof-check-all→ exit 0: 7 Idris2 modules (Types,ABI/{Layout,Platform,Pointers,Foreign,Compliance,BufferAbi}), 1 Lean4 (ApiTypes), 2 Agda (SnifVerdict,SnifIsolation, bothagda --safe --without-K), plus the dangerous-pattern scan (nobelieve_me/postulate/sorry/Admitted). -
SEC-1 — the operational crash-isolation theorem — typechecks.
verification/proofs/agda/SnifIsolation.agdaproves, by induction over a fuelled host↔guest small-step model: verdict ∈ ok ⊕ trap, host survives every outcome, the trap carries no guest value, and — newly wired into the operational run — the fault residue is the redacted secret only, so two faults with equal redaction are host-indistinguishable (run-deniable). The verdict now models the real 6-origin taxonomy (guest-fault / host-budget / pre-exec) via acallfront-end, not a binary trap. It is proven modulo an explicitFaithfulRuntimerecord hypothesis (the TCB) — see The honest nuance you must not lose. -
Interface conformance is gated against the real binaries.
just abi-conformance→ exit 0: 15 ABI specs across 2 guests (safe_nif8,buffer_abi7) — the built wasm’s real export signatures match the verified Idris2 model exactly, including three void-returning buffer exports. -
In-BEAM behaviour runs.
mix test(indemo/) → 30 tests, 0 failures on Erlang/OTP 25, Elixir 1.18.4, with the precompiledwasmex0.14 NIF. This includes crash isolation across every failure mode (OOB / unreachable / @panic / overflow / div-zero →{:error,_}, BEAM alive after each) and a new dependency-free metamorphic behaviour gate over the numeric kernels.
-
"Safer", not "Safe" — the runtime TCB is trusted, not proven. SEC-1 is proven over a model whose first argument is a
FaithfulRuntimerecord bundling primitive single-step facts (wasmtime never gets stuck; a trapped step is caught and surfaced as{:error,}with the scheduler preserved). The prose claim that this record is _faithful to wasmtime/wasmex — "wasmtime ⊨ FaithfulRuntime" — is assumed, not discharged in a prover (it is the named open item SEC-1-TCB, a WasmCert-Coq effort). This residual assumption is exactly why the project is Safer NIFs. -
Model ↔ code faithfulness is only partly mechanised. The proofs verify a logical model. The ABI conformance gate closes the interface slice of model↔code (signatures match the real wasm); the metamorphic tests close a behaviour slice (the kernels behave as modelled). The general claim "the Agda model mirrors the Zig/Rust/wasmex code" is argued + tested, not itself machine-verified.
-
Honest proof labels (not over-claims). In SEC-1,
okOrTrapandnoForgeryare structural facts about theVerdictdatatype (true with no runtime in scope); the load-bearing, TCB-consuming content is host preservation (survives).noForgeryis the parametric non-existence of a total extractor, not an instance-level claim. We state these rather than dress them up.
-
The isolation thesis depends on building guests with
-OReleaseSafe. Under-OReleaseFastthe same faults become silent wrong answers — this is demonstrated, on purpose, as the negative control in the demo suite (e.g. an OOB read returns a plausible adjacent value). The shipped guests are ReleaseSafe; the ReleaseFast artifact exists only to keep that danger visible and tested.
-
SEC-1-TCB — open. Discharging "wasmtime ⊨ FaithfulRuntime" in-prover (WASM trap-soundness; trap →
{:error,_}; scheduler resumed) is the remaining half of an end-to-end isolation proof. Not started here. -
ABI-7 — partial. 15 of ~20 Zig export sites are modelled+gated (
safe_nif
buffer_abi).burble_fft(fft/ifft/…) is not built into any artifact and uses(ptr,len)slice marshalling = the deeper ABI-6 obligation; it and the two Rust guests are ledgered, not gated (PROOF-NEEDS.md). -
GAP-1b — partial. The metamorphic behaviour gate covers the scalar kernels (
fibonaccirecurrence/monotonicity/i64-width;checked_addoverflow-traps / exact-sum oracle); the buffer kernels (sum_f32permutation-invariance, scale-then-sum) are the next increment. -
Finding surfaced by the gate — now RESOLVED. The gate first showed
checked_addwas a misnomer — a two’s-complement wrappinga +% b, not a checked add. It was made genuinely checked in PR #40: overflow now traps (@addWithOverflow
unreachable→ WASM trap →{:error,_}, BEAM survives), exact sum otherwise, and the metamorphic oracle was flipped to match. Name and behaviour now agree. -
CI — now required. The ABI conformance gate runs as a CI job (
proofs.yml) and is now a required status check onmain(branch-protection), so interface drift blocks merge. -
Adversarial mutation re-audit — completed, verdict SOLID. Four independent skeptics mutation-tested the SEC-1 sharpening (
--safe --without-K): every targeted mutation was rejected as expected, so F1 (lossy redaction), F2 (the pre-exec coverage + theguestFaulttag) and F5 (the partialAlive) are genuinely load-bearing — not vacuous;--safeis enforced (an injectedpostulateis rejected) andrun/drivetotality is real (a non-decreasing-fuel mutation is rejected). The only weakness it found was stale prose, corrected in the anchor commit. -
Required-check + Zenodo. Making the conformance gate a required status check is owner-only branch-protection (pending). The paper’s Zenodo DOI still carries the old "Safe" title; the rename should land on the next deposit.
From the repo root, at the anchor commit above (you need the toolchain in Verifiable anchor):
just proof-check-all # expect exit 0:
# 7 Idris2 OK, 1 Lean4 OK, 2 Agda OK (SnifVerdict + SnifIsolation),
# dangerous-pattern scan PASS
just abi-conformance # expect exit 0: builds safe_nif + buffer_abi wasm, then
# "all 2 guest(s) conform (15 ABI specs verified ...)"
cd demo && mix test # expect "30 tests, 0 failures" (OTP 25 / Elixir 1.18.4)For the SEC-1 proof on its own (the exact gate invocation):
agda -i verification/proofs/agda --safe --without-K --no-libraries \
verification/proofs/agda/SnifIsolation.agda # expect exit 0"A working, machine-verified Safer NIF for the BEAM: native compute sandboxed in wasmtime so a guest fault becomes
{:error,_}and the VM survives — with an operational crash-isolation theorem (deniability + 6-origin taxonomy, Agda--safe), an interface gate matching 15 export signatures to the real wasm, and a behaviour gate over the scalar kernels — all green this moment; Safer not Safe because one runtime-faithfulness assumption is trusted, not yet proven, andburble_fft/Rust/buffer-behaviour coverage is honestly ledgered. No intentional overclaim."
We, the undersigned, assert that to the best of our joint belief at the timestamp above, every claim in this file is true and was checked as described — with no intentional overclaim, and with the open gaps stated rather than hidden.
-
Engineering party (AI): Claude Opus 4.8 (
claude-opus-4-8[1m]) — ran the proof gate, the ABI conformance gate, and the in-BEAM test suite recorded here on 2026-06-16T15:03:15Z (againstmainat the anchor state) and stands behind the wording above as a faithful report of those runs. -
Owner / maintainer: Jonathan D.A. Jewell — signs by committing this file with
-S(id_ed25519_signing); the git commit signature over this content, whose parent is the anchor SHA recorded above, is the cryptographic form of this affirmation.Signed-off-date: 2026-06-16
|
Tip
|
The authoritative, tamper-evident signature is the signed git commit that lands
this file; its parent is the anchor SHA 70d9f65. If that parent matches
Verifiable anchor and the commit verifies (id_ed25519_signing), this
affirmation is anchored. If HEAD later moves past it, re-run Reproduce it yourself and write
a fresh affirmation rather than trusting a stale one.
|