You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b42ca64
Browse filesBrowse the repository at this point in the historyBrowse files
docs: Proven/Witnessed/Trusted ladder; correct believe_me and annotation claims (#344)
## Summary
Adds a Proven / Witnessed / Trusted ladder to the README and site, and
corrects safety claims that the code does not back: "zero believe_me"
(the enforced budget is 4 sanctioned axioms), "formally verified
coordination ABI", and four tool annotations. The ladder also says
plainly that the Idris core does not typecheck today, because of a
duplicate `allTake` and a CI job that never reaches Idris. That is
tracked in #343, which this PR does **not** fix.
## Type of change
- [x] Documentation
- [x] Small code change: four MCP tool annotation values in
`mcp-bridge/lib/tools.js`
## 📌 New pins
Head SHA: **e7474849e54da49f64b02131c42968e49416b2cd**. No action,
lockfile, container or `actions.lock` pins are added or changed.
## Changes
- **README.adoc + regenerated README.md:** new "What is proven" section
with the three-column ladder. The Features and Security bullets are
rescoped (it is a safety and dispatch ABI model, not a "coordination
ABI"). The PROOF-NEEDS link now points at the `.adoc`.
- **site/index.html:** the "Verified" card becomes a compact ladder that
links to the README section.
- **About 20 docs, Justfile comments, `.claude/CLAUDE.md`:** "zero
believe_me" and "5 axioms" become 4 sanctioned axioms in
`SafetyLemmas.idr`. Rules for cartridge authors ("your ABI must have
zero believe_me") are unchanged.
- **PROOF-NEEDS.adoc:** the count history now reads 5 → 4 (2026-06-24),
broken `docs/proof-debt.md` links are fixed, and a new "Model-to-code
obligations" section covers restoring the proof gate, the 13
unimplemented `libbozsafety` bindings, and effect-typed manifests.
- **verification/proofs/README.adoc:** 5 → 4 axioms, and `charEqSym` is
marked as discharged.
- **src/abi/Boj/SafeHTTP.idr:** a comment only. "Zero believe_me"
becomes "none in this module; relies on the 4 SafetyLemmas axioms".
- **mcp-bridge/lib/tools.js:**
- `boj_browser_read_page` and `boj_browser_screenshot` are now
`readOnlyHint:false`, a conservative label until effect-typed manifests
land;
- `boj_github_graphql` (accepts mutations) and `boj_cartridge_invoke`
(reaches any cartridge) are now `destructiveHint:true`.
## RSR Quality Checklist
### Required
- [x] Tests pass: `bun test mcp-bridge/tests/` reported 52 pass, 0 fail.
- [ ] Code is formatted: not applicable. The only code change is four
boolean literals plus two description strings, in the file's existing
style.
- [x] Linter is clean: no new code paths. The repo's pre-commit hooks
passed on commit.
- [x] No banned language patterns: no new files in any language.
- [x] No `unsafe` blocks without `// SAFETY:` comments: none touched.
- [x] No banned functions: none added. Text that mentions `believe_me`
documents the existing 4 axioms. `bash scripts/check-trusted-base.sh`
reported "OK … 4 sanctioned class-(J) axioms".
- [x] SPDX license headers present: no new files, and existing headers
are unchanged.
- [x] No secrets, credentials or `.env` files included.
### As Applicable
- [ ] `.machine_readable/*.a2ml`: deliberately not touched.
`0-AI-MANIFEST.a2ml` and `META.a2ml` also say "zero believe_me" and are
left for the owner's decision.
- [x] Documentation updated for user-facing changes.
- [ ] `TOPOLOGY.md`: not applicable, no architecture change.
- [ ] CHANGELOG: not updated; docs-only, no release.
- [ ] New dependencies: none.
- [ ] ABI/FFI changes validated: not applicable, no ABI or FFI change
(one `.idr` comment only).
## Testing
- `bun test mcp-bridge/tests/` reported 52 pass, 0 fail.
- README derivation was reproduced locally with the pinned toolchain
(pandoc 3.10, asciidoctor 2.0.26). As a control, it first reproduced the
committed `README.md` on `main` byte-for-byte after normalisation. Then
the regenerated file was committed. `readme-vocab-gate.sh`
(standards@84355587) reported 98.7% at a 98% floor; the base was 98.4%.
- `bash scripts/check-trusted-base.sh` reported OK with 4 axioms.
- `cd src/abi && idris2 --typecheck boj.ipkg` **fails**, and fails the
same way on `main`: `allTake is already defined`. The `.idr` change is a
comment. See #343.
### Red check deferral
- `Idris2 type-check (core + all cartridge ABIs)` is expected to be red:
this PR touches `src/abi/` and `verification/`, which triggers the job,
and the job fails on `main` too (empty asdf version, duplicate
`allTake`). It is not a required check. Deferred to #343.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Ge6k9wanwVdYJWBrnwjPxf
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ exceptions:
35
35
36
36
| Layer | Language | Role |
37
37
|---|---|---|
38
-
|**ABI**|**Idris2**| Formally verified contract — dependent-type proofs, state machine or exposure-gate invariants, `%default total`, zero `believe_me`/`postulate`/`assert_total`in the trusted core. |
38
+
|**ABI**|**Idris2**| Formally verified contract — dependent-type proofs, state machine or exposure-gate invariants, `%default total`, no `postulate`/`assert_total`, and `believe_me` only in the 4 documented `SafetyLemmas` axioms (core) — zero in cartridge ABIs. |
* *Inspectable offline* — `boj++_++health`, `boj++_++menu`, `boj++_++cartridges`, and `boj++_++cartridge++_++info` answer from an offline manifest so clients can introspect the server without any backend running.
* *Hardened* — per-call rate limiting, size caps, prompt-injection detection with Unicode-confusable normalisation, and error sanitisation (paths, stack traces, and env vars stripped from responses).
52
-
* *Formally verified core* — the coordination ABI is written in Idris2 with discharged proof obligations; remaining axioms are documented, not hidden.
53
+
* *Formally verified ABI model* — an Idris2 safety and dispatch ABI (HTTP, CORS, API keys, WebSocket lifecycle, prompt injection, catalogue, dispatch, credential isolation), `%default total`, with four documented axioms and nothing else unsound. Proofs are about the Idris model; see link:#what-is-proven[What is proven] for where they stop.
* *Error sanitisation* — responses strip filesystem paths, stack traces, and environment variables before they reach the client.
259
260
* *HTTP safety* — `BOJ++_++HTTP++_++AUTH=none` is refused on any non-loopback bind; bearer auth is required for remote exposure.
260
261
* *Credential isolation* — cartridge credentials are supplied per-cartridge (env vars or the `vault-mcp` broker), never embedded in tool definitions.
261
-
* *Formal verification* — the coordination ABI safety layer is written in Idris2 with discharged proof obligations; remaining `believe++_++me` sites are isolated, documented axioms over the compiler's opaque `Char`/`String` primitives, tracked in link:PROOF-NEEDS.md[`PROOF-NEEDS.md`].
262
+
* *Formal verification* — the Idris2 ABI safety layer has discharged proof obligations; the only `believe++_++me` sites are four documented axioms over the compiler's opaque `Char`/`String` primitives, tracked in link:PROOF-NEEDS.adoc[`PROOF-NEEDS.adoc`]. See link:#what-is-proven[What is proven] for the Proven / Witnessed / Trusted breakdown.
262
263
* *Supply chain* — SHA-pinned GitHub Actions; coherence tests assert the advertised tool list matches the cartridge manifest so nothing is advertised-but-undispatched.
263
264
264
265
Run the coherence tests:
@@ -272,6 +273,37 @@ Report vulnerabilities per link:SECURITY.md[`SECURITY.md`].
272
273
273
274
'''''
274
275
276
+
== What is proven
277
+
278
+
Every safety claim BoJ makes sits in one of three bins. "Proven" always means _proven about a model_, so the claim is only as good as the match between that model and the running code. That is why the Witnessed column matters.
279
+
280
+
[cols="1,1,1",options="header"]
281
+
|===
282
+
|Proven — the compiler checks it |Witnessed — an artefact backs it |Trusted — relied on from outside
283
+
284
+
a|
285
+
* *Status (2026-10-06): the core does not currently typecheck.* `SafetyLemmas.idr` defines `allTake` twice, and the CI typecheck job has not completed since at least 2026-09-21 (it fails while installing Idris2, and is path-skipped on most PRs). Tracked in link:https://github.com/hyperpolymath/boj-server/issues/343[#343]. Until that is fixed, read this column as "proven when last green", not "proven now".
286
+
* The Idris2 ABI in `src/abi/Boj/` (17 modules, all `%default total`) covers catalogue and dispatch, HTTP/CORS/API-key/WebSocket/prompt-injection safety predicates, and the credential-isolation model.
287
+
* `believe++_++me` appears only in *four* documented axioms over opaque `Char`/`String` primitives (`SafetyLemmas.idr`); CI (`scripts/check-trusted-base.sh`) pins that count and greps the rest of the Idris tree for `believe++_++me`, `assert++_++total`, `assert++_++smaller` and `idris++_++crash`. The grep has known gaps (a use followed by a `--` comment is skipped; `partial`, `covering` and holes are not scanned) and the job is path-filtered, so it does not run on every PR.
288
+
* *Limit:* these proofs are about the Idris model. The model is only ever typechecked, never compiled or linked into the running server, and 13 of the 17 C safety checks it binds (`libbozsafety`) are not yet implemented.
289
+
a|
290
+
* Property tests (Elixir StreamData, `elixir/test/backend_assurance/`) of the behaviour each of the four axioms assumes, run against Elixir analogues of the Chez primitives (not the compiled Idris code); last executed and green 2026-10-06.
291
+
* Zig FFI enum constants checked at compile time against a hand-kept mirror of the Idris values (the Idris side itself is not compared).
292
+
* TLA+ specs of the JS worker, worker pool and invoker (`specs/elixir-harness/`), model-checked with TLC by hand (results recorded in its README), not in CI.
293
+
* npm package published with provenance; SLSA level 3 provenance on release tarballs; container build attestation.
294
+
* Coherence tests: the advertised tool list matches the dispatch table.
295
+
a|
296
+
* The JavaScript bridge (`mcp-bridge/`) and the Zig FFI: the proofs cover the model, not this code.
297
+
* Tool annotations (`readOnlyHint`, `destructiveHint`, …): hand-written labels, not derived from types and not enforced at dispatch.
298
+
* Postgres, Docker, cloud and forge APIs behaving as documented; cartridge backends you run yourself.
299
+
* The Idris2 compiler, Zig, the Node/Deno/Bun runtime and the operating system.
300
+
* The AI choosing the right tool. Prompt injection is limited by input hardening, not proven away.
301
+
|===
302
+
303
+
Planned next steps that move items left (Trusted → Witnessed → Proven) are tracked in link:PROOF-NEEDS.adoc[`PROOF-NEEDS.adoc`]: link every bound C symbol and gate CI on it, and derive tool annotations from a typed effect declaration that the dispatcher enforces.
304
+
305
+
'''''
306
+
275
307
== License
276
308
277
309
* *Code* — link:LICENSE[MPL-2.0] (Mozilla Public License 2.0) — the license published to npm and detected by GitHub.
Copy file name to clipboardExpand all lines: README.md
+49-2Lines changed: 49 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@
31
31
32
32
-[Security](#security)
33
33
34
+
-[What is proven](#what-is-proven)
35
+
34
36
-[License](#license)
35
37
36
38
-[Contributing & links](#contributing--links)
@@ -53,7 +55,7 @@
53
55
54
56
-**Hardened** — per-call rate limiting, size caps, prompt-injection detection with Unicode-confusable normalisation, and error sanitisation (paths, stack traces, and env vars stripped from responses).
55
57
56
-
-**Formally verified core** — the coordination ABI is written in Idris2 with discharged proof obligations; remaining axioms are documented, not hidden.
58
+
-**Formally verified ABI model** — an Idris2 safety and dispatch ABI (HTTP, CORS, API keys, WebSocket lifecycle, prompt injection, catalogue, dispatch, credential isolation), `%default total`, with four documented axioms and nothing else unsound. Proofs are about the Idris model; see [What is proven](#what-is-proven) for where they stop.
-**Credential isolation** — cartridge credentials are supplied per-cartridge (env vars or the `vault-mcp` broker), never embedded in tool definitions.
244
246
245
-
-**Formal verification** — the coordination ABI safety layer is written in Idris2 with discharged proof obligations; remaining `believe_me` sites are isolated, documented axioms over the compiler’s opaque `Char`/`String` primitives, tracked in [`PROOF-NEEDS.md`](PROOF-NEEDS.md).
247
+
-**Formal verification** — the Idris2 ABI safety layer has discharged proof obligations; the only `believe_me` sites are four documented axioms over the compiler’s opaque `Char`/`String` primitives, tracked in [`PROOF-NEEDS.adoc`](PROOF-NEEDS.adoc). See [What is proven](#what-is-proven) for the Proven / Witnessed / Trusted breakdown.
246
248
247
249
-**Supply chain** — SHA-pinned GitHub Actions; coherence tests assert the advertised tool list matches the cartridge manifest so nothing is advertised-but-undispatched.
Report vulnerabilities per [`SECURITY.md`](SECURITY.md).
256
258
259
+
# What is proven
260
+
261
+
Every safety claim BoJ makes sits in one of three bins. "Proven" always means *proven about a model*, so the claim is only as good as the match between that model and the running code. That is why the Witnessed column matters.
262
+
263
+
<table>
264
+
<colgroup>
265
+
<colstyle="width: 33%" />
266
+
<colstyle="width: 33%" />
267
+
<colstyle="width: 33%" />
268
+
</colgroup>
269
+
<thead>
270
+
<tr>
271
+
<thstyle="text-align: left;">Proven — the compiler checks it</th>
272
+
<thstyle="text-align: left;">Witnessed — an artefact backs it</th>
273
+
<thstyle="text-align: left;">Trusted — relied on from outside</th>
274
+
</tr>
275
+
</thead>
276
+
<tbody>
277
+
<tr>
278
+
<tdstyle="text-align: left;"><ul>
279
+
<li><p><strong>Status (2026-10-06): the core does not currently typecheck.</strong> <code>SafetyLemmas.idr</code> defines <code>allTake</code> twice, and the CI typecheck job has not completed since at least 2026-09-21 (it fails while installing Idris2, and is path-skipped on most PRs). Tracked in <ahref="https://github.com/hyperpolymath/boj-server/issues/343">#343</a>. Until that is fixed, read this column as "proven when last green", not "proven now".</p></li>
280
+
<li><p>The Idris2 ABI in <code>src/abi/Boj/</code> (17 modules, all <code>%default total</code>) covers catalogue and dispatch, HTTP/CORS/API-key/WebSocket/prompt-injection safety predicates, and the credential-isolation model.</p></li>
281
+
<li><p><code>believe_me</code> appears only in <strong>four</strong> documented axioms over opaque <code>Char</code>/<code>String</code> primitives (<code>SafetyLemmas.idr</code>); CI (<code>scripts/check-trusted-base.sh</code>) pins that count and greps the rest of the Idris tree for <code>believe_me</code>, <code>assert_total</code>, <code>assert_smaller</code> and <code>idris_crash</code>. The grep has known gaps (a use followed by a <code>--</code> comment is skipped; <code>partial</code>, <code>covering</code> and holes are not scanned) and the job is path-filtered, so it does not run on every PR.</p></li>
282
+
<li><p><strong>Limit:</strong> these proofs are about the Idris model. The model is only ever typechecked, never compiled or linked into the running server, and 13 of the 17 C safety checks it binds (<code>libbozsafety</code>) are not yet implemented.</p></li>
283
+
</ul></td>
284
+
<tdstyle="text-align: left;"><ul>
285
+
<li><p>Property tests (Elixir StreamData, <code>elixir/test/backend_assurance/</code>) of the behaviour each of the four axioms assumes, run against Elixir analogues of the Chez primitives (not the compiled Idris code); last executed and green 2026-10-06.</p></li>
286
+
<li><p>Zig FFI enum constants checked at compile time against a hand-kept mirror of the Idris values (the Idris side itself is not compared).</p></li>
287
+
<li><p>TLA+ specs of the JS worker, worker pool and invoker (<code>specs/elixir-harness/</code>), model-checked with TLC by hand (results recorded in its README), not in CI.</p></li>
288
+
<li><p>npm package published with provenance; SLSA level 3 provenance on release tarballs; container build attestation.</p></li>
289
+
<li><p>Coherence tests: the advertised tool list matches the dispatch table.</p></li>
290
+
</ul></td>
291
+
<tdstyle="text-align: left;"><ul>
292
+
<li><p>The JavaScript bridge (<code>mcp-bridge/</code>) and the Zig FFI: the proofs cover the model, not this code.</p></li>
293
+
<li><p>Tool annotations (<code>readOnlyHint</code>, <code>destructiveHint</code>, …): hand-written labels, not derived from types and not enforced at dispatch.</p></li>
294
+
<li><p>Postgres, Docker, cloud and forge APIs behaving as documented; cartridge backends you run yourself.</p></li>
295
+
<li><p>The Idris2 compiler, Zig, the Node/Deno/Bun runtime and the operating system.</p></li>
296
+
<li><p>The AI choosing the right tool. Prompt injection is limited by input hardening, not proven away.</p></li>
297
+
</ul></td>
298
+
</tr>
299
+
</tbody>
300
+
</table>
301
+
302
+
Planned next steps that move items left (Trusted → Witnessed → Proven) are tracked in [`PROOF-NEEDS.adoc`](PROOF-NEEDS.adoc): link every bound C symbol and gate CI on it, and derive tool annotations from a typed effect declaration that the dispatcher enforces.
303
+
257
304
# License
258
305
259
306
-**Code** — [MPL-2.0](LICENSE) (Mozilla Public License 2.0) — the license published to npm and detected by GitHub.
Copy file name to clipboardExpand all lines: docs/developer/README.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
A cartridge is a swappable, formally verified capability module. It occupies one or more cells in the 2D matrix (protocol x domain) and follows the three-layer stack:
10
10
11
-
. *Idris2 ABI* — Type-safe interface with `%default total` and zero `believe_me`
11
+
. *Idris2 ABI* — Type-safe interface with `%default total`; `believe_me` only in 4 documented core axioms
0 commit comments