Skip to content

Commit f682034

Browse files
committed
docs(affirmation): AFFIRMATION (owner-granted SPDX exception 2026-06-16)
1 parent 32cdbee commit f682034

1 file changed

Lines changed: 327 additions & 0 deletions

File tree

AFFIRMATION.adoc

Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= AFFIRMATION — typell, as of 2026-06-16
4+
:toc: macro
5+
:toclevels: 2
6+
7+
_the No-Bullshit file: what we affirm was true and checkable at this moment_
8+
9+
[NOTE]
10+
====
11+
*Genre.* An *affirmation* is a solemn declaration of the truth of a statement,
12+
made by someone who _declines to swear an oath_. That is exactly what this is:
13+
our truth-as-best-believed at a stamped instant — binding on our honesty, not a
14+
claim of infallibility. It is not the README and not the EXPLAINME:
15+
16+
[cols="1,3,2",options="header"]
17+
|===
18+
| File | Answers | Tense
19+
| `README.adoc` | _Where is this going, and why?_ — state of thinking, steering, intent | future / aspirational
20+
| `EXPLAINME.adoc` | _How is it built, and what's the evidence?_ — engineering underpinnings | descriptive / mechanism
21+
| *`AFFIRMATION.adoc`* (this file) | _What can we honestly affirm was *true and checkable* at a stamped moment?_ | a frozen instant, falsifiable
22+
|===
23+
24+
Each repo in the estate may carry one (`AFFIRMATION.adoc`). It is deliberately
25+
small, dated, and signed, so a reader can hold us to exactly what we affirmed,
26+
when we affirmed it.
27+
====
28+
29+
toc::[]
30+
31+
== What this is, and how it is designed to work
32+
33+
*What it is.* A short, dated, jointly-signed snapshot of what we can _honestly
34+
and verifiably_ claim about this repo at one exact commit. Nothing here is
35+
marketing and nothing is a promise about the future — both of those live in the
36+
README. This file is the receipt.
37+
38+
*How it is designed to work.* Three moving parts make it trustworthy:
39+
40+
. *Ground truth, not memory.* Every claim below was produced by _running the
41+
tool in the session that wrote this file_ (`cargo build`, `cargo test`,
42+
`idris2 --check`, `zig build`). Where a status doc, `STATE.a2ml`, or a prior
43+
session said otherwise, the live run wins and we flag the contradiction
44+
explicitly.
45+
. *A frozen anchor.* The file names the exact commit SHA, branch, UTC timestamp,
46+
and toolchain (see <<Verifiable anchor>>), so "true" always means "true _at
47+
this point_". Move the SHA and the file becomes a draft until re-run.
48+
. *A real signature.* It is landed by a *signed git commit*; that signature over
49+
this content at the anchored SHA is what makes the affirmation tamper-evident
50+
and attributable — not the prose alone.
51+
52+
*We are fallible.* We can be wrong, stale, or simply mistaken about our own
53+
work. This file is our best honest belief, not a proof of its own correctness.
54+
Treat it as a falsifiable claim, not gospel.
55+
56+
== The epistemic contract (read this before you trust _or_ attack)
57+
58+
This document records our *best joint belief* at the timestamp below. It is
59+
*not a guarantee of correctness.* We may be wrong. We may have missed something
60+
— a hole, a stale doc, a proof that does not in fact check, a rename left
61+
half-finished.
62+
63+
*No intentional overclaim.* That is the only guarantee here: we have not
64+
_knowingly_ inflated anything. Where something is tested-but-not-proved, we say
65+
so. Where a proof file exists but does *not* typecheck at this commit, we say
66+
so and we do _not_ call it "proved". Where something is a placeholder, broken,
67+
or refuted, we say so. If you find an honest claim here that turns out false,
68+
that is an error to be fixed — not a lie.
69+
70+
*Standing invitation to refute.* You are _invited_ to bulldoze any claim in this
71+
file. We want that. But the fair form of the attack is:
72+
73+
. Read this file at the stamped commit.
74+
. Reproduce (or fail to reproduce) the checks in <<reproduce,Reproduce it yourself>>.
75+
. _Then_ tell us where the discrepancy is, against the artefact as it stood at
76+
this moment — so we can either justify it or concede it on the record.
77+
78+
An attack that skips steps 1–2 is attacking a strawman of a different date.
79+
80+
*No fights before the facts are cleared up.* We are not interested in a dispute
81+
over a claim until the discrepancy has actually been checked against the
82+
artefact at this commit and we have had the chance to either justify it or
83+
concede it on the record. Good faith both ways: bring a reproducible
84+
discrepancy and we will fix the claim, the doc, or the code — promptly and
85+
without defensiveness. The goal is a corrected record, not a won argument.
86+
87+
== Verifiable anchor
88+
89+
[cols="1,3"]
90+
|===
91+
| *Repo* | `hyperpolymath/typell` (PanLL's verification kernel — a Rust workspace; *not* affinescript, *not* ephapax)
92+
| *Branch* | `claude/safedom-res-stale-sweep`
93+
| *Commit (HEAD)* | `552f7594a3826d4e059dc3d3dac53d473a2d22c9`
94+
| *Permalink* | https://github.com/hyperpolymath/typell/tree/552f7594a3826d4e059dc3d3dac53d473a2d22c9
95+
| *Verified (UTC)* | 2026-06-16T12:25:56Z
96+
| *Working-tree delta at verification* | Tracked tree *clean* at the start of the run. The only delta introduced was the untracked `ffi/zig/.zig-cache/` directory (a Zig build-cache artefact from the `zig build` attempt below); no source file was modified. This file (`AFFIRMATION.adoc`) is itself untracked until the owner signs it. None of this affects the results below.
97+
| *Toolchain* | cargo 1.95.0 · rustc 1.95.0 · just 1.50.0 · Idris2 0.8.0 · Zig 0.15.2
98+
|===
99+
100+
[IMPORTANT]
101+
If you are reading this at a _later_ commit, the claims may have drifted.
102+
Re-run <<reproduce>> and write a fresh affirmation; do not trust a stale one.
103+
104+
== Companion documents and repo metadata (cross-check)
105+
106+
This affirmation should be read against the repo's own public claims. Where they
107+
drift from what we verified, we say so here rather than quietly leave the reader
108+
to find out.
109+
110+
* *`README.adoc`* — present. link:README.adoc[_"Typell — PanLL's Verification
111+
Kernel"_]. Sells the vision (dependent / linear / session types, QTT, effect
112+
systems, proof-carrying code) and states *"Phase 0: Vision capture and repo
113+
scaffolding — complete."* That phase-framing is consistent with what we found;
114+
the *type-system claims* are aspirational at this commit (see honest state).
115+
* *`EXPLAINME.adoc`* — present. link:EXPLAINME.adoc[_"Show Me The Receipts"_].
116+
Honestly carries its own caveat: _"only the kernel architecture exists … the
117+
backends are in design/port stages."_ That is fair. It does *not*, however,
118+
mention that the Rust workspace does not currently build as a whole, nor that
119+
the Idris2 ABI does not typecheck — gaps this affirmation records.
120+
* *GitHub repo description* — _"PanLL's verification kernel — dependent types,
121+
linear types, session types, QTT, proof-carrying code, and effect systems for
122+
neurosymbolic query languages"_. *Drift:* this reads as delivered capability;
123+
at this commit these are crate scaffolds and bridge stubs with passing
124+
unit-tests, not a working verifier. Read it as scope, not status.
125+
* *GitHub topics* — `ai`, `development`, `formal-verification`, `neurosymbolic`,
126+
`open-source`, `rust`, `software`. *Drift:* `formal-verification` is *not yet
127+
earned* — the Idris2 soundness proofs (`src/abi/*.idr`) do *not* typecheck at
128+
this commit (errors + open holes; see below). `rust` is accurate.
129+
130+
(`gh` metadata fetched in-session via the WSL `gh` client; the Windows `gh.exe`
131+
returned HTTP 401 and was not used.)
132+
133+
== The honest state (one breath)
134+
135+
*Typell at this commit is an early-alpha 14-crate Rust scaffold for a database
136+
query verification kernel: 13 of its 14 crates compile and their 245 library
137+
unit-tests pass green right now — but the workspace as a whole does NOT build (a
138+
`typell_vql` → `typell-vcl` rename was left half-finished and breaks
139+
`typell-server` plus two integration-test targets), the documented `just test`
140+
entrypoint is a placeholder stub that runs nothing, the Idris2 ABI "soundness
141+
proofs" do NOT typecheck, and the Zig FFI does NOT build against the installed
142+
Zig 0.15.2. There is real, green, tested Rust here; there is no verified
143+
formal-verification here today.*
144+
145+
=== What is solid (and how we checked)
146+
147+
* *13 of 14 workspace crates compile clean.* HOW: `cargo build --workspace
148+
--exclude typell-server` → *exit 0* ("Finished `dev` profile" — `typell-core`,
149+
`-eclexia`, `-affinescript`, `-ephapax`, `-wokelang`, `-tangle`, `-betlang`,
150+
`-mylang`, `-oblibeny`, `-jtv`, `-phronesis`, `-errorlang`, `-vcl`).
151+
* *245 library/binary unit-tests pass; 0 failed, 0 ignored.* HOW: `cargo test
152+
--workspace --exclude typell-server --lib --bins` → *exit 0*, thirteen
153+
`test result: ok` lines summing to *245 passed* (per-crate: 13, 10, 106, 10,
154+
9, 12, 11, 8, 13, 9, 11, 24, 9). These are genuine, fast, green unit tests of
155+
the bridge/rules/resource modules.
156+
* *Toolchains are present and runnable* — cargo/rustc 1.95.0, just 1.50.0,
157+
Idris2 0.8.0, Zig 0.15.2 all responded to `--version`.
158+
* *No `believe_me` / `assert_total` / `postulate` appears in any `.idr` source.*
159+
HOW: `grep -rniE "believe_me|assert_total|postulate|trustMe"` over `src/abi/`
160+
matched only README prose and one explanatory comment. The "zero believe_me"
161+
invariant is *literally* satisfied — but see the honest nuance: it is
162+
*vacuously* satisfied because the proofs do not typecheck at all.
163+
164+
=== The honest nuance you must not lose
165+
166+
This is the proved-core vs tested-implementation gap, and for typell it is
167+
*wider than usual and points the other way*: there is a *tested implementation
168+
core* (245 green Rust unit-tests) and there is *no proved core at all at this
169+
commit*. The Idris2 files in `src/abi/` are *intended* to be the soundness
170+
proofs for the calculus underlying `check.rs`/`infer.rs`, but they *do not
171+
compile* (errors + open `?holes`; see loud-failures). So:
172+
173+
* Nothing in typell is "proved" today. Every formal-verification claim is, at
174+
best, "argued in Idris2 source that does not yet typecheck".
175+
* Even if those proofs did check, they would model an *idealised core calculus*,
176+
not establish that the Rust kernel _refines_ it — the same unproved bridge
177+
every such project has. We are two steps short of that bridge, not one.
178+
* The README/topics word *"formal-verification"* is therefore not earned at this
179+
commit. Anyone citing typell as "formally verified" is overclaiming.
180+
181+
*Hard proofs are explicitly delegated to Echidna* (README: _"NOT a theorem
182+
prover — it delegates complex proofs to Echidna"_). We did *not* run Echidna in
183+
this session; that boundary is out of scope here and is neither confirmed nor
184+
refuted by this affirmation.
185+
186+
=== Known-broken but fenced here (loud failures, recorded not hidden)
187+
188+
[NOTE]
189+
====
190+
*1. The full workspace does not build.* `cargo build --workspace` → *exit 101*.
191+
`crates/typell-server/src/handlers.rs` still imports `typell_vql::{bridge,levels,
192+
rules}`, but that crate was renamed to `typell-vcl` (the workspace member in
193+
`Cargo.toml` is `crates/typell-vcl`). The rename was left half-finished.
194+
195+
*2. Two integration-test targets do not compile* — same incomplete rename, in
196+
`tests/integration_test.rs` and `crates/typell-vcl/tests/vcl_bridge_tests.rs`
197+
(both `use typell_vql::…`). So the 245 figure above is *lib/bin unit-tests only*;
198+
those two integration suites could not run at all. *We did not run any integration
199+
suite this session.* There are also three further integration targets we did
200+
*not* exercise — `crates/typell-core/tests/{e2e_test,property_test,
201+
core_comprehensive_tests}.rs` (these do *not* import `typell_vql`, so the rename
202+
does not break them) — plus a `tests/fuzz/` that is only a `placeholder.txt` stub.
203+
We make *no* claim about whether those three core suites pass: their status is
204+
*unknown* at this commit because they were never run. Do not read "245 green" as
205+
covering end-to-end or property behaviour.
206+
207+
*3. `just test` runs nothing.* The `test` recipe in `Justfile` is a placeholder
208+
(`@echo "Running tests..."` + `# TODO: Replace with your test command`). The
209+
repo's own documented test entrypoint executes no tests.
210+
211+
*4. The Idris2 ABI proofs do not typecheck.* `idris2 --check` (in a corrected
212+
`TYPELL/ABI/` source layout) fails on five of six modules: `Types.idr` /
213+
`Layout.idr` — `%language ElabReflection not enabled`, `Undefined name DecEq`,
214+
missing `So`/`CInt` implementations (missing imports/pragmas); `Soundness.idr` /
215+
`InferenceSoundness.idr` — `Undefined name Step`, variable-accessibility errors,
216+
a `substitutionLemma` unification mismatch, plus open holes `?renameTyHole` /
217+
`?renameTy'Hole`; `LevelMonotonicity.idr` — undefined `lteRefl` /
218+
`lteTransitive` / `succInjective`. Only `Foreign.idr` (pure FFI declarations, no
219+
proofs) typechecks. There is also a module-casing inconsistency: `Foreign.idr`
220+
declares `Typell.ABI.Foreign` while the others use `TYPELL.ABI.*`.
221+
222+
*5. The Zig FFI does not build.* `zig build` in `ffi/zig/` → *exit 2*:
223+
`build.zig:12` calls `b.addSharedLibrary(.{…})`, which the installed Zig 0.15.2
224+
no longer provides (`no field or member function named 'addSharedLibrary'`). The
225+
FFI is pinned to an older Zig build API.
226+
====
227+
228+
=== Outstanding / weak / refuted (no spin)
229+
230+
* *`STATE.a2ml` is stale / refuted at this commit.* It records
231+
`last-result = "221 tests passing, 0 failures, 0 warnings"`, `total-tests =
232+
221`, and lists every bridge crate as `status = "complete"`. The live run
233+
shows *245* lib/bin unit-tests (not 221), the workspace *not building*, and a
234+
`typell-vql` crate name that no longer exists (it is `typell-vcl`). The
235+
`completion-percentage = 35` and the per-phase percentages
236+
(e.g. "Phase 1: Idris2 ABI — 100%") are *not* corroborated; the Idris2 ABI
237+
does not typecheck. Treat `STATE.a2ml` as aspirational, not as evidence.
238+
* *"Zero believe_me" is true but vacuous* — no soundness is established because
239+
the proofs do not compile (see nuance above).
240+
* *No claim of a working verification protocol, type checker, or backend was
241+
reproduced.* The JSON-RPC server crate (`typell-server`) is precisely the one
242+
that does not compile. The VCL/GQL/KQL backends are scaffolds, consistent with
243+
the README's own "design/port stages" caveat.
244+
245+
== Reproduce it yourself
246+
247+
From the repo root, at the commit above:
248+
249+
[source,sh]
250+
----
251+
# Toolchains used
252+
cargo --version # cargo 1.95.0
253+
rustc --version # rustc 1.95.0
254+
just --version # just 1.50.0
255+
idris2 --version # Idris 2, version 0.8.0
256+
zig version # 0.15.2
257+
258+
# Full workspace build — FAILS (exit 101): typell_vql -> typell-vcl rename half-done
259+
CARGO_INCREMENTAL=0 cargo build --workspace
260+
261+
# 13/14 crates build — exit 0
262+
CARGO_INCREMENTAL=0 cargo build --workspace --exclude typell-server
263+
264+
# Unit tests on the buildable crates — exit 0; 245 passed, 0 failed, 0 ignored
265+
CARGO_INCREMENTAL=0 cargo test --workspace --exclude typell-server --lib --bins
266+
267+
# Two integration-test targets — FAIL to compile (same rename), e.g.:
268+
CARGO_INCREMENTAL=0 cargo test -p typell-vcl --test vcl_bridge_tests # error[E0433] typell_vql
269+
# NOT run this session (status unknown): the typell-core integration suites
270+
# (they do NOT import typell_vql, so the rename does not break them):
271+
# CARGO_INCREMENTAL=0 cargo test -p typell-core --test e2e_test --test property_test --test core_comprehensive_tests
272+
273+
# 'just test' runs NOTHING (placeholder recipe) — observe it only echoes
274+
just test
275+
276+
# Idris2 ABI — does NOT typecheck (Foreign.idr is the only module that passes)
277+
# modules declare TYPELL.ABI.<M>, so check from a matching source dir:
278+
tmp=$(mktemp -d); mkdir -p "$tmp/TYPELL/ABI"; cp src/abi/*.idr "$tmp/TYPELL/ABI/"
279+
( cd "$tmp" && for m in Types Layout Foreign Soundness InferenceSoundness LevelMonotonicity; do \
280+
echo "-- $m"; idris2 --check "TYPELL/ABI/$m.idr"; done )
281+
282+
# Zig FFI — does NOT build against Zig 0.15.2 (addSharedLibrary removed)
283+
( cd ffi/zig && zig build ) # exit 2
284+
----
285+
286+
Expected: the two `--exclude typell-server` commands are green (build exit 0;
287+
*245 passed; 0 failed; 0 ignored*); the workspace build, the two `typell_vql`
288+
integration targets, `just test`, the Idris2 ABI check, and `zig build` all fail
289+
exactly as fenced above. The three `typell-core` integration suites were *not
290+
run* this session (status unknown, not asserted). Hard proofs (Echidna) are out
291+
of scope and were not run.
292+
293+
== One-line characterisation (quote this)
294+
295+
[quote]
296+
____
297+
"A real, early-alpha Rust verification-kernel scaffold: 13/14 crates build and
298+
*245 unit-tests pass green now* — but the full workspace does NOT build (an
299+
unfinished `typell_vql`→`typell-vcl` rename), `just test` runs nothing, the
300+
Idris2 'soundness proofs' do NOT typecheck (so 'formal-verification' is unearned
301+
and 'zero believe_me' is vacuous), and the Zig FFI does NOT build on Zig 0.15.2.
302+
Hard proofs are delegated to Echidna and were not run. Tested-in-parts, proved
303+
nowhere — promising scaffold, not a working verifier. No intentional overclaim."
304+
____
305+
306+
== Joint attestation
307+
308+
We, the undersigned, assert that *to the best of our joint belief at the
309+
timestamp above, every claim in this file is true and was checked as described*
310+
— with no intentional overclaim, and with the open gaps stated rather than
311+
hidden.
312+
313+
* *Engineering party (AI):* Claude Opus 4.8 (`claude-opus-4-8[1m]`) — ran the
314+
build, test, and proof checks recorded here on 2026-06-16T12:25:56Z and stands
315+
behind the wording above as a faithful report of those runs.
316+
* *Owner / maintainer:* Jonathan D.A. Jewell — _signs by committing this file
317+
with `-S` (`id_ed25519_signing`); the git commit signature over this content,
318+
at the commit SHA recorded above, is the cryptographic form of this
319+
affirmation._
320+
+
321+
Signed-off-date: ____________________ (fill on signing)
322+
323+
[TIP]
324+
The authoritative, tamper-evident signature is the *signed git commit* that
325+
lands this file. If the SHA in <<Verifiable anchor>> matches the parent of that
326+
commit and the commit verifies, this affirmation is anchored. If they don't
327+
match, treat the file as a draft.

0 commit comments

Comments
 (0)