Skip to content

Commit f3a70ae

Browse files
hyperpolymathclaude
andcommitted
docs: restore SOUNDNESS.adoc content reverted by the 2026-08-18 stale merge
152d959 merged origin/claude/capability-test-anchors, a branch whose copy of docs/SOUNDNESS.adoc predated three fixes that had already landed on the main line. The merge took the branch's whole file, reverting all three (27 insertions, 51 deletions, none of them new content): 1. The #555 row was re-pointed at `test_resume_nontail_known_shallow`, a name that was only ever planned and has never existed in the tree. The pin that does exist -- `test_resume_nontail_xfail`, test/xfail/test_xfail_pins.ml:56, over the same fixture and the same behaviour -- is what the seal hashes. 2. The "Pinned-residual discipline" section was deleted -- the section naming the XPASS hand-off as the one place the anti-drift machinery relies on a human. 3. Two claims regressed to being false. #624 was restated as "flagged but not yet fenced" although f020a6f fenced it, and the mechanisation paragraph was rolled back to "#620/#621", dropping P-2, P-3, F-3 and F-4. The row also reverted to `|*residual (pinned)*` markup, which the gate's row parser cannot see at all, so property 5 reported "no pinned/open rows found (fail closed)". This is a revert of that revert: docs/SOUNDNESS.adoc is restored to 808e859, the main-line parent of the merge. Nothing has touched the file since, so no later work is lost. The seal is unchanged and was never wrong -- the ledger was the side that drifted -- so tools/soundness-anchors.sha256 is NOT resealed. tools/check-soundness-ledger.sh now exits 0 on all five properties. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5c0366a commit f3a70ae

1 file changed

Lines changed: 51 additions & 27 deletions

File tree

‎docs/SOUNDNESS.adoc‎

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,17 @@ without reified continuations, and previously returned a silently-wrong value).
145145
| `test/e2e/fixtures/handle_resume_multishot.affine`; `lib/interp.ml` resume
146146
invocation counter
147147

148-
|*#555* (interp, non-tail single-shot)
149-
|`let x = op(); x + 100` resuming to `5` returns `5`, not `105`: the shallow
150-
tree-walking continuation has already unwound the bind chain. This is the one
151-
genuinely-still-silent shape, on the *interpreter* path only. It needs a CPS
152-
rewrite of `eval` (blocked: OCaml 4.14 has no native effect handlers and the
153-
interpreter must stay `js_of_ocaml`-compatible — owner-steer item). Tracked: #623.
154-
|*residual (pinned)*
155-
|`test/e2e/fixtures/handle_resume_nontail.affine` +
156-
`test_resume_nontail_known_shallow` (asserts the wrong-but-known value; flips
157-
to failing the day delimited continuations land)
148+
| #555 (interp, non-tail single-shot) / #623
149+
| `let x = op(); x + 100` resuming to `5` returns `5`, not `105`: the shallow
150+
tree-walking continuation has already unwound the bind chain. This is the one
151+
genuinely-still-silent shape, on the interpreter path only. It needs a CPS
152+
rewrite of `eval` (blocked: OCaml 4.14 has no native effect handlers and the
153+
interpreter must stay `js_of_ocaml`-compatible — owner-steer item, #623).
154+
| `residual (pinned)`
155+
| `test/e2e/fixtures/handle_resume_nontail.affine` + `test_resume_nontail_xfail`
156+
(xfail: asserts the correct `105`; currently fails-as-expected; flips to an
157+
unexpected pass the day delimited continuations land). See _Pinned-residual
158+
discipline_.
158159

159160
| #556
160161
| Async CPS table-miss fails loud instead of silently lowering synchronously.
@@ -218,26 +219,49 @@ The implementation holes marked `fixed` / `loud-fail` / `removed` above are
218219
closed. Honesty requires naming what is *not* a guarantee. Each item here is a
219220
row in the table above, restated for the hurried reader — not a separate list:
220221

221-
* *Interpreter non-tail resume* (#555 residual, pinned; tracked as #623) — see
222-
the ledger row.
223-
* *Stub backends drop `return`.* The Lean and Why3 *experimental* code
224-
generators drop `return` statements wholesale — a broader codegen-honesty gap
225-
than #555, flagged but not yet fenced (tracked as #624). Treat all
226-
non-reference backends as experimental (see `docs/CAPABILITY-MATRIX.adoc`).
227-
* *Generic-subsumption coherence* (#559 follow-up) — see the ledger row.
222+
* *Interpreter non-tail resume* (#555 / #623, `residual (pinned)`) — the
223+
`5`-not-`105` shape. Silent on the interpreter path; pinned by
224+
`test_resume_nontail_xfail`.
225+
(Stub backends dropping `return` (#555-stub / #624) is now `loud-fail` — Lean and
226+
Why3 reject an early `return` instead of silently dropping it — so it is no longer
227+
a "still open" residual. Treat all non-reference backends as experimental anyway,
228+
see `docs/CAPABILITY-MATRIX.adoc`.)
229+
230+
If you are deciding whether AffineScript is "sound enough" for a use, the
231+
interpreter non-tail resume row above is the one remaining residual, and the
232+
metatheory caveat below applies to it.
233+
234+
=== Pinned-residual discipline
235+
236+
A `residual (pinned)` / `open (tracked)` row carries an *xfail* test that asserts
237+
the *desired* behaviour and currently fails because the hole is present. The
238+
xfail harness (`test/xfail/test_xfail_pins.ml`) tolerates that expected failure
239+
and reports `XFAIL-OK`; if the assertion ever *passes*, the harness reports
240+
`XPASS`, exits non-zero, and the gate surfaces a distinct "pin for #N is passing
241+
— is the hole fixed? update the row" message.
242+
243+
That second job is a *social* guarantee wearing a mechanical costume. The harness
244+
mechanically catches the flip; but it relies on the engineer reading `XPASS` as
245+
"good — now advance the ledger row to `fixed`" rather than "annoying — silence
246+
it". The gate cannot tell those apart. So: *when an `*_xfail` pin reports `XPASS`,
247+
the correct first move is to open this ledger, not to silence the test.* This is
248+
the one place the anti-drift machinery hands off to a human, and it is named here
249+
so the hand-off is deliberate.
228250

229251
== Closed holes are not proofs
230252

231-
Closing an *implementation* hole is not the same as having *metatheory*. The
232-
soundness *arguments* for the holes above (`docs/academic/proofs/*.adoc`, the
233-
comments in `lib/borrow.ml`) remain `prose`, and the `Solo` core fragment's
234-
`progress` / `preservation` are still `?todo`. Mechanisation has *started* — an
235-
axiom-free Coq/Rocq `formal/` track (codegen-preservation: K-1
236-
`K1_CodegenPreservation.v`, K-1-with-`let` `K1Let_CodegenPreservation.v`, and
237-
the F-1 transformer-preservation composition; #620/#621) — but it does not yet
238-
cover any hole in this ledger. The proof obligations, their rigour tiers, and
239-
their (mostly `prose` / `absent`) status are catalogued in
240-
`docs/PROOF-NEEDS.adoc` (umbrella issue #513). The one-line distinction:
253+
Closing an implementation hole is not the same as having metatheory. The
254+
soundness arguments for the holes above (`docs/academic/proofs/*.adoc`, the
255+
comments in `lib/borrow.ml`) remain *prose*, and the Solo core fragment's
256+
`Soundness.idr` progress / preservation are still `?todo`. Mechanisation has
257+
*grown substantially* — the axiom-free Coq/Rocq `formal/` track now covers the
258+
Wave-0 codegen-preservation seed (K-1 `K1_CodegenPreservation.v`, K-1-with-`let`
259+
`K1Let_CodegenPreservation.v`), the F-1 transformer-preservation composition, and
260+
the four Wave-0 siblings P-2 (progress), P-3 (borrow-graph, with loan edges +
261+
move-locality), F-3 and F-4 (#620–#627). These target core/fragment metatheory;
262+
*none yet covers a hole in this ledger* — they are not the full AffineScript
263+
borrow checker / interpreter / backends. The obligations, their rigour tiers, and
264+
their exact status are catalogued in `docs/PROOF-NEEDS.adoc` (umbrella #513).
241265

242266
The one distinction to carry away, stated so the polish of *this ledger* is not
243267
mistaken for the rigour of the *metatheory*:

0 commit comments

Comments
 (0)