Skip to content

shared-pool: formal verification of shared-pool-controls v1.1.0 - #32

Open
gabehamilton wants to merge 65 commits into
gabehamilton/shared-pool-controls-local-checkoutfrom
gabehamilton/shared-pool-controls-v1.1
Open

gabehamilton wants to merge 65 commits into
gabehamilton/shared-pool-controls-local-checkoutfrom
gabehamilton/shared-pool-controls-v1.1

Conversation

@gabehamilton

@gabehamilton gabehamilton commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Re-verification of shared-pool-controls v1.1.0: the fixes for the v1.0.0 findings, merged upstream in difflabai/shared-pool-controls#4 as 57b3f02 (tree identical to the PR head 6fcbd56). Stacked on #31 (the v1.0.0 verification); retarget to main once #31 merges. Merge #31 with a merge commit, not a squash, so this branch and the v1.0.0 record's commits stay reachable.

The v1.0.0 layers are re-pinned in place (projects/shared-pool/) and re-run on v1.1.0. v1.0.0's results stay in #31 and git history (a072a2d) and serve as the "fails on v1.0.0" half of each regression property.

What is verified

  • Target: shared-pool-controls v1.1.0 (root Cargo.toml 1.1.0): pool-core (crates/core/src/lib.rs, every decision), the NEAR contract and the synthetic executor, built by upstream scripts/build.sh.
  • Pin: 57b3f02, the merge commit of upstream PR ci: run on the self-hosted macOS runner via vars.CI_RUNNER #4 on main. check-pin.sh checks that the PR head 6fcbd56, where the fixes were reviewed, holds the same code byte for byte (status.toml [project] identity). 27 source hashes at the pin.
  • Layers: the seven v1.0.0 layers, reused and adapted to v1.1.0: the conformance traces, TLA+, Lean, Prolog, Kani on the real core, near-tests with the wasm surface, and the sandbox. TLA+ adds a model of the executor protocol (TLA-EXEC).
  • Catalogue: 103 properties (20 new) and 15 assumptions (1 new, ASM-GAS), in strategy §5. Properties: 102 in-progress, 1 unverified (TLA-IND). Assumptions: 9 in-progress, 6 unverified (ASM-DEPLOY, ASM-EXEC, ASM-OWNER, ASM-SPEC, ASM-TIME, ASM-TOOLS).
  • Not claimed: no row is verified. status.toml refuses it until a spec reviewer who did not write pool-core signs, and nobody has. TLA-IND (Apalache) is open, Verus is deferred, and deployment is out of scope.

Findings: every v1.0.0 finding is closed in v1.1.0

Each finding is closed by a property that fails on v1.0.0's code and passes on v1.1.0's. A fix-revert mutant (FR-n) puts one v1.0.0 behaviour back into v1.1.0, and the closing layers must kill it. Mutant names: tNN TLA+, lNN Lean, mNN/cNN Prolog, sNN near-tests, Nk Kani (their Kani results are in the Kani section). Full text: strategy §4.

ID (sev) v1.0.0 Fix (upstream) Closed by Regression: v1.0.0 fails, v1.1.0 passes
F-1 (high) After a disturbing observe, a dispatched hedge could be neither settled nor cancelled, forever (trace 0) 59e404f INV-RES, LIVE-ALL, LIVE-2 v1.0.0: both settles Bounds, MC_Liveness_F1 violated, MC-1 228 dead states. v1.1.0: trace 0's hedge refused, liveness-f1 holds, MC-1 0 dead, Lean f1_rejected, RT-WEDGE on chain. FR-1 (t33, l18, m22, N2), FR-2 (t32, l17, m21, N1)
F-2 (high) In the risk fixture the executor's honest settle(false) failed Bounds (trace 209) 59e404f INV-RES, LIVE-ALL, C-5 v1.0.0: C-5 20 counterexamples, MC-1 150 release-blocked states. v1.1.0: trace 209's hedge refused and the release Ok, C-5 and MC-1 0 blocked, liveness-f2 holds, Lean f2_rejected. FR-2, FR-1
F-2b (high) A release could leave ±10^6 and fail Arithmetic (trace 208) 59e404f NUM-2, INV-RES v1.0.0: trace 208's release Arithmetic. v1.1.0: refused at admission (trace 208, MC-1 f2b, TLC Witness_F2bRefused). FR-2's F-2b part (t34, m23)
F-3 (low) After 256 lifetime records every submit failed Full, forever (trace 207) 1f01d43; executor 4d69f19 WIN-1, WIN-2, WIN-ESC, WIN-LIVE, DEP-1; EX-6..EX-8, TLA-EXEC v1.0.0: trace 207 ends full, WinLive violated, the executor fails at job 257. v1.1.0: trace 207 prunes, liveness-win holds, RT-WINDOW (300 records), RT-D1. FR-3, FR-4 (TLA+, Lean, Prolog; N5, N9-N13), FR-13 (t53; s29, s30, s34, s36-s38, s00b), FR-14 (t51; s31-s33, s00b)
F-4 (low) validate accepted a recipe whose actor is its executor (trace 210) dc774f8 CFG-2 v1.0.0: trace 210 accepted. v1.1.0: trace 210 is init_error(invalid_config) in the core and every replayer; Lean self_executor_invalid. FR-5 (t39, l22, c10, N6)
F-5 (low) At version u32::MAX every call failed Arithmetic, settles included da43188 VER-CAP, INV-VERCAP v1.0.0: Prolog "F-5 witness", Lean mutant 04. v1.1.0: TLC MC_Cap, Lean cap_drain, MC-1 cap, RT-REVERT at a patched VERSION_CAP. FR-6 (t40-t44, l23, m27, m28, c12, N3, N4); FR-6b, preview at the cap (N14)
F-6 (low) observe was Pending with any record open, so one long-open record froze admission (trace 211) 3eaf1cb OBS-2, REFRESH-1 v1.0.0: trace 211 Pending, REFRESH-1 violated. v1.1.0: trace 211's refresh Ok with a record open, TLC WitStep_Refresh, Lean refresh_ok, MC-1 REFRESH-1 on every state. FR-7 (t45-t47, l24, l26, m29-m31, N7)
NT-F1 = SB-1 (medium) The documented build omitted --cfg near, so every panic message was lost effd174 SH-5, SH-11 v1.0.0: nt_f1_upstream_build_drops_every_panic_message. v1.1.0: nt_f1_documented_build_reports_every_panic_message, sandbox sb1_documented_build_reports_panic_messages; build.sh refuses the no-cfg wasm (FR-12)
NT-F2 (low) reconcile accepted and kept an attached deposit 1d441c5 SH-10 v1.0.0: the deposit kept. v1.1.0: nt_f2_reconcile_rejects_an_attached_deposit, refused on chain (RT-REVERT). FR-9 (s22, s00a)
NT-F3 (info) Both contracts imported 15 host functions that could deploy, transfer, stake or add keys 3598902 SH-12, SH-11 v1.0.0: SURF-2 found 15 forbidden imports. v1.1.0: SURF-2 passes; each wasm's imports equal build.sh's allowlist (contract 18, executor 16). FR-11 (s28, s35, s00a, s00b)
NT-F4 (low) A non-string promise result made the callback panic, and the record did not become Unknown 1d441c5 SH-3, RT-CALLBACK v1.0.0: the callback panics. v1.1.0: sh3_non_string_promise_results_become_unknown, on chain rt_callback_non_string_executor_results. FR-10 (s23-s25, s00a)
div-ack-noop-version (docs vs code) The docs said every successful transition bumps the version; a no-op ack returned Ok without a bump 138ef98: the docs follow the code C-3 v1.0.0: C-3 found this divergence. v1.1.0: C-3 reports none; TLA+ mutant 07 and Prolog m02 pin the no-op
div-cancel-terminal-name (docs vs code) Cancelling a Completed record failed with Pending, a name that suggests an open commitment 138ef98: the code returns InvalidState, as the docs say TERM-1, TX-CANCEL v1.0.0: 18 traces Pending. v1.1.0: the same 18 give InvalidState; C-2 and C-3 agree. FR-8 (t48, l25, m32, N8)

div-F1-inverse and div-F2-fixture-release close with F-1 and F-2. L-1b, rejected at v1.0.0, is moot at v1.1.0. New findings at v1.1.0: none (strategy §4.7).

Documented limits (not findings)

Upstream documents each, and the layers reach each.

  • Head-of-line Full. With 256 records retained and the oldest open, submit fails Full. A dispatched front closes only when its executor reports (api:28, handoff:38). WIN-ESC: one call by the front's resolver frees the window; WIN-LIVE holds under fairness; trace 207; RES-1. Assumption ASM-EXEC.
  • Executor job cap (upstream D-1). The synthetic executor holds at most 512 jobs. Only refused or unsettled confirmations fill it, and at the cap confirm_not_executed fails "full" (api:42, handoff:39). TLA-EXEC reaches the cap and an exit from it (safety only); RT-D1; RES-1 at 512 jobs. LIVE still holds at the lock. Upstream follow-up OQ-12.
  • The owner as executor. validate refuses actor = executor only, so the owner may be a recipe's executor (spec:11, api:65). Trace 213, Lean owner_executor_valid, assumption ASM-OWNER.

Per-layer status (v1.1.0, pin 57b3f02)

Layer Result Mutants Record
Conformance 216 traces (8,865 calls) from the pinned core; the reads at 1,300 states (39,627 requests). coverage.py: all 47 required call classes, no forbidden one. TLA+, Lean, Prolog and near-tests replay every trace with equal results and post-states n/a strategy §10.1, conformance/coverage.py
TLA+ TLA-SAFE: 435,342 distinct views, no error. TLA-CAP: 64,644 states from 4 below the cap. 20 of 20 witnesses reachable. LIVE-ALL, LIVE-2 (fails without fairness, as required) and WIN-LIVE hold. TLA-EXEC at windows 2 and 3 (3.88M and 7.32M views) 52 of 52 killed (46 core, 6 executor) tla/RESULTS.md
Lean Inv (with INV-RES, INV-VERCAP, WIN-1, WIN-2), the step properties, LIVE-ALL and LIVE-1, at every size, on the Lean transcription. 65 headline theorems use only the three standard axioms. REF-5L replays every trace 26 of 26 killed lean/RESULTS.md
Prolog C-1..C-6 pass (C-3: no divergence; C-5: no finding). MC-1: seven universes (454 to 5,032 states), no violation, no dead or release-blocked record. MC-2: 0 divergences. COV-2 equal on 39,627 requests 47 of 47 killed prolog/RESULTS.md
near-tests 38 tests on the host path and on the documented wasm build. SURF-1..SURF-3: the imports equal build.sh's allowlist 41 of 41 killed (the v1.0.0 contract and executor among them) near-tests/RESULTS.md
Sandbox RT-PRED, RT-PRIVATE, RT-CALLBACK, RT-REVERT, RT-RACE, RT-WEDGE, RT-WINDOW, RT-D1 and RES-1 pass on the real wasm (near-sandbox 2.13.4). Worst pool receipt 14.81 Tgas n/a sandbox/RESULTS.md
Kani 98 harnesses on the real pool-core (h_canary must fail, and does); verdict below 45, as expected in plain mode; under Kani below kani/RESULTS.md, kani/local/

Kani

Kani 0.68.0 with CBMC 6.11.0 on the real pool-core. Within 1 metric, 1 term and 2 recipes, values anchored at 0 and ±10^6 and deltas −3..3, every call from a 2-record INV state returns exactly the executable spec's result and post-state and refines the TLA+ model (REF-1..3). INV (with INV-RES, INV-VERCAP and WIN-1) holds in every reachable state of at most 3 records. Nothing is shown outside those bounds. The harnesses and mutants were measured with kani/local/run-local.py --all at 2d33d33 on a 10-core, 64 GB Apple M1 Max, up to three jobs at a time, in three runs: run 1 (from 14:30Z, stopped at 18:10Z after 35 of its 143 jobs), run 3 (from 18:13Z, stopped at 21:13Z) and run 4 (from 21:14Z: h_energy_max alone, the one large harness run 3's scheduler never started, because it needs the machine to itself and run 3 kept starting mutants beside each other). Run 2 was stopped after 2.5 minutes with no result. W7's probes and run.sh ref cover a few harnesses before them.

  • Verdict (kani/RESULTS.md): verified within the bounds, provided CI's kani and kani-record jobs pass on the commit: no failure, and every harness verified on this machine (74), by W7 on the same Kani harness code (4) or left to CI's hosted kani job (20).
  • Recorded locally: 48 harnesses (in 17 groups) and 1 of the 28 mutants that do not fit the hosted runner (the others are declared not run, below), from the runs at 2d33d33, committed in c8dd19f (kani/local). The largest peak was h_bmc_from_init_s_submit at 39.6 GB; 38 harnesses peaked above 16 GB. kani-record checks the record's fingerprint and results on every run.
  • Hosted: CI's kani job runs the other 50 harnesses (peak 13 GB or less, rounded up), in 7 groups, on GitHub's 16 GB runner, on every change that reaches the Kani layer.
  • Mutants: 45: 44 must be killed (14 of them the fix-revert mutants N1-N14), and mutant 20 is equivalent and must survive. In plain mode all 45 are as expected, and CI's mutants job reruns them on every change. Under Kani: the recorded large mutant 20 as expected (surviving, the equivalent mutant), mutant 31 killed by h_ref_cancel (W10, at 6b120fd), the other 16 hosted ones left to CI's manual kani-mutants job, and 27 large mutants declared not run at v1.1.0 (kani/local/not-run.tsv; plain mode kills them).
  • Fix-revert mutants under Kani: 4 left to CI's manual kani-mutants job (N3, N7, N8, N12); 10 not run at v1.1.0 (N1, N2, N4, N5, N6, N9, N10, N11, N13, N14). Each one is killed in plain mode.
  • Declared not run: Under Kani, the 27 large mutants of kani/local/not-run.tsv (01, 03, 05, 06, 10, 11, 12, 15, 16, 18, 19, 21, 23, 25, 28, 29, 30, 32, 33, 35, 36, 37, 40, 41, 42, 44, 45) were not run at v1.1.0: the Kani half of their verdict is a gap, and plain mode kills each of them on every CI run. The runs measured every harness first and the large mutants last, and did not reach these before the deadline. The author accepted this rather than holding the release. kani-record warns "NOT RUN locally" for each one on every run. A dispatch with mutants on a KANI_RUNNER of at least 50 GB, or a later local record, would close the gap.
  • Memory is measured as RSS, which understates the footprint on macOS. run-local.py samples resident memory (ps RSS of CBMC and of the job's process tree) every 3 s. Under memory pressure macOS compresses pages, and RSS leaves them out. A side sampler of top's MEM column during run 3 (not part of the record; from 18:28Z, so earlier jobs are missed; run 1 had none) saw 37 jobs. h_bmc_from_init_po's CBMC reached a footprint (top's MEM, compressed pages included) of 63 GB while run 3 recorded 37.3 GB, and h_full_256's reached 72 GB, more than the machine's 64 GB of RAM (recorded 39.2 GB). The hosted/local split uses the RSS peaks, so a hosted harness can need more than its recorded peak. Jobs of the hosted matrices whose sampled footprint passed 13 GB: h_step_observe_inv_3 at 15.0 GB (recorded 10.3 GB). CI's hosted kani job is the check that each hosted harness fits: one that does not fit fails, it is not skipped.
  • CI with the v1.1.0 record: green. Run 43642798201 on da343e2 passed: 18 jobs succeeded, including kani (all 7 groups), kani-record and covers. The 4 dispatch-only jobs (sandbox, kani-large, kani-mutants, kani-mutants-large) were skipped as expected.

CI

  • On every change: pin, status-lint, conformance, tla, lean, prolog, near-unit, and Kani's plain, mutants and kani-record. When a change reaches the Kani layer, also kani and covers.
  • Manual dispatch only: sandbox, kani-mutants and kani-mutants-large. kani-large and kani-mutants-large need a KANI_RUNNER of at least 50 GB; without one, kani-record checks the local record instead.
  • Before the record, at 5cf571e (run 43600054037, with v1.0.0's Kani split): pin, status-lint, conformance, tla, lean, prolog, near-unit, plain, mutants and 6 of the 8 kani groups passed. kani-record and covers failed by design (the record was still v1.0.0's). Two kani groups of the v1.0.0 split also failed: in one, the runner shut down during h_full_256, with 15 GB of memory and 15 GB of swap in use; the other named three v1.0.0 harnesses (h_version_max_pause, _dispatch, _observe) that v1.1.0 replaced with h_version_cap_*. The v1.1.0 split moves h_full_256 to kani-large and drops those names.

Test plan

  • tools/scripts/check-pin.sh shared-pool, tools/scripts/test-check-pin.sh, tools/scripts/check-status.sh shared-pool (103 properties, 0 problems), C-6 (118 = 118)
  • Conformance: the trace and reads --check, coverage.py (216 traces, 47 classes)
  • tla/run.sh safety liveness trace executor mutants (52 mutants killed)
  • lean/run.sh (26 mutants killed)
  • prolog/run.sh (47 mutants killed)
  • near-tests/run.sh all (38 tests, the wasm surface, 41 mutants killed)
  • sandbox/run.sh, locally (CI's sandbox job is manual and has not run on this PR)
  • kani/run.sh plain and kani/run.sh mutants (45 as expected)
  • Kani: run-local.py --all runs 1, 3 and 4 at 2d33d33, record.py, check-kani-record.py, test-check-kani-record.sh, results-tables.py --final
  • CI with the v1.1.0 record: kani, kani-record and covers pass (run 43642798201 on da343e2)
  • One manual dispatch with sandbox: true and mutants: true
  • shared-pool: formal verification of shared-pool-controls v1.0.0 #31 merged with a merge commit and tagged shared-pool-v1.0.0; this PR retargeted to main

🤖 Generated with Claude Code

gabehamilton and others added 5 commits November 13, 2026 20:26
Moves the shared-pool-controls gitlink from a4bb5c3 (v1.0.0's contract
code) to 57b3f02, the merge commit of upstream PR #4 on main
(shared-pool-controls v1.1.0). Its tree equals the PR head 6fcbd56.

status.toml [project]: pinned_commit 57b3f02, verified_release v1.1.0,
previous_release v1.0.0 (a4bb5c3, 6f61616). [source_hashes] is
recomputed at the pin and grows from 16 to 27 entries (findings.rs,
res1.rs, build.sh, verification-findings.md, crates/demo/src/main.rs and
the six scenarios/*/trace.json).

check-pin.sh: verified_release_commit / identical_paths become
[project] identity = [{ label, commit, paths }]. Each entry's commit
must hold every path as the same git tree or blob, mode included, as the
pin; a commit the mirror lacks is fetched by SHA; an entry whose commit
is the pin only checks its paths exist; the old keys are refused so a
status.toml still using them cannot skip the check. The entries are the
v1.1.0 merge commit (the pin) and the PR #4 head 6fcbd56.

test-check-pin.sh: a self-test on scratch repositories (no network):
17 cases, among them a fetch by SHA, the pin without a fetch, a path
differing in content or mode, a missing path, an unfetchable commit, a
malformed entry and the refused old form. The shared-pool pin job runs
it before check-pin.sh.

The v1.0.0 Kani local record (kani/local) fingerprints the old gitlink,
so kani-record fails on this branch until the v1.1.0 record replaces it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The property catalogue for the v1.1.0 re-verification, frozen before the
layers fan out: 103 properties and 15 assumptions, 118 property/3 ids,
equal in strategy.md section 5, traceability.pl and status.toml.

- Every v1.0.0 property (83) and assumption (14) is `stale`: its
  evidence, status and status.toml keys record v1.0.0 at a4bb5c3 (PR #31,
  tag shared-pool-v1.0.0) until its layer re-checks it.
- 20 new properties, `unverified` / planned: VER-CAP, OBS-2, WIN-2,
  INV-RES, INV-VERCAP, WIN-1, LIVE-ALL, WIN-ESC, REFRESH-1, WIN-LIVE,
  SH-12, SCN-1, EX-6, EX-7, EX-8, RT-WINDOW, RT-D1, TLA-CAP, TLA-EXEC,
  LEAN-LIVE-ALL; and ASM-GAS (med, checked by RES-1) in threat_model.pl.
  CFG-2 now includes actor != executor (no CFG-3).
- Section 5: the v1.1.0 notation (ids and the window, the release-aware
  envelope, completed_units, VERSION_CAP and rem, the refresh, the ghost
  rule with k0 an id) and the v1.1.0 statement of every row v1.1.0
  changed.
- Section 4.5: the fix-revert mutants FR-1..FR-14 and FR-6b per layer,
  with the near-tests mutants renamed s01..s38, s00a/b.
- Target, sections 1-3 and 12: v1.1.0 in progress, pin 57b3f02, the
  identity check, the counts. Sections 6-18 carry a banner: they describe
  v1.0.0 until their unit rewrites them.
- status.toml: the assumptions' upstream doc cites move to v1.1.0 lines.

The nine new prolog-layer ids get a planned prolog_evidence clause; the
Prolog PROP-tag step and near-tests check-tags.py stay red on the new
ids until the model (W3), requirements (W6) and shell (W8) units tag
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: the shared-pool row and section say the v1.1.0 re-verification
is in progress on this branch (label In-Progress), pin 57b3f02 with the
PR #4 head identity, and that v1.0.0 was verified in PR #31 (tag
shared-pool-v1.0.0); the v1.0.0 results below stay as v1.0.0's.

conformance/src/main.rs: the v1.1.0 trace contract as a header comment
only (no code change): the s/7 state term with FirstId and DoneUnits,
the init_error form for a refused config, traces 0-211 kept and 212-215
appended, trace 207 `window` with the `gate` recipe, traces 214/215 from
findings.rs:175, the new coverage classes, no state at VERSION_CAP in
core.txt, and the ghost rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Executor.tla models the executor (crates/executor at 57b3f02):
- execute, finish, confirm_not_executed, notify, on_settled and advance;
- the lock's record window as first_id plus the retained records'
  statuses;
- execute, settle and on_settled receipts delivered in any order.

TLC holds every invariant at WINDOW 2 (3,880,089 views, depth 33) and
WINDOW 3 (7,323,777 views, depth 30):
- |jobs| <= MAX_JOBS, and every job has id + WINDOW > newest;
- newest < first_id + WINDOW;
- a settle is accepted only for a retained id;
- a retained record's job is never forgotten;
- Lemma J.

12 witnesses are reachable, including the job-cap refusal (T-JOBCAP,
a documented limit) and its documented exit.

run.sh gains an `executor` check; the default list is unchanged.
Mutants 49-54 run in the WINDOW 2 universe without the VIEW, and all
six are killed: retain with >=, on_settled advancing on a refused
settle, the FR-13 and FR-14 reverts, confirm without the stale check,
and Ok for a pruned settle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s-check)

Executor.tla's header now says how the model covers a settle that the
real lock refuses for an in-flight record: Unauthorized, or Bounds or
Arithmetic, which LIVE-ALL and INV-VERCAP exclude. Such a refusal
writes nothing, so it is covered by timing: the receipt is never
delivered, or a confirmation is delivered while the record is Reserved.
A one-off run with the refusal added as an action held every
invariant at WINDOW 2 (3,910,128 views).

run.sh gains an opt-in check, executor-w2-fullview. It is the
cross-check of the dead-receipt quotient: every invariant and StepExec
at WINDOW 2 with ids 0..4 under ViewFull (13,996,226 distinct, about
200 s). It is not part of `executor` or the default list.

Patches 49-54 move by the 9 header lines. The model's behaviour is
unchanged. run.sh executor passes with the same view counts, and all
six executor mutants are still killed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gabehamilton

Copy link
Copy Markdown
Contributor Author

Summary of Changes

Hello @gabehamilton, I'm the pr-review agent. I've reviewed this pull request — here's a summary to help you and other reviewers get up to speed, with the full code review to follow.

This draft re-pins shared-pool verification to shared-pool-controls v1.1.0, records v1.0.0 evidence as stale, and introduces identity validation for the new pin. It also adds the first executor-window TLA+ model, TLC configurations, regression mutants, and supporting catalogue/strategy documentation.

The pin-check self-test and status lint pass locally. The checked-out source-mirror is not populated at the new gitlink in this review workspace, so the full pin check and upstream-dependent TLC run could not be completed here.

Highlights

  • Pin identity: The new checker compares configured trees/blobs at the pin and PR head and has a scratch-repository self-test.
  • Executor model: A scaled TLA+ executor/lock model and six targeted mutants were added, but its positive TLC baseline is not wired into CI.
Changelog
  • .github/workflows/shared-pool.yml
    • Adds the pin-check self-test and updates v1.1.0 pin/status documentation.
  • README.md
    • Marks shared-pool v1.1.0 re-verification as in progress and preserves v1.0.0 context.
  • projects/shared-pool/conformance/src/main.rs
    • Documents the frozen, planned v1.1.0 trace contract.
  • projects/shared-pool/prolog/requirements/threat_model.pl
    • Adds the gas assumption and its planned evidence link.
  • projects/shared-pool/prolog/requirements/traceability.pl
    • Expands the v1.1.0 catalogue, including executor and window properties.
  • projects/shared-pool/source-mirror
    • Re-pins the upstream submodule to v1.1.0 commit 57b3f02.
  • projects/shared-pool/status.toml
    • Updates the pin, hashes, identity metadata, and marks prior v1.0.0 evidence stale.
  • projects/shared-pool/strategy.md
    • Updates verification strategy, catalogue, stale-evidence policy, and v1.1.0 planning.
  • projects/shared-pool/tla/Executor.tla
    • Adds a bounded TLA+ model of executor jobs, lock records, receipt ordering, invariants, and witnesses.
  • projects/shared-pool/tla/MC_Executor_W2.cfg, projects/shared-pool/tla/MC_Executor_W3.cfg
    • Add TLC configurations for scaled executor-window state spaces.
  • projects/shared-pool/tla/mutants/49-exec-retain-ge.patch
    • Adds a retention-bound regression mutant.
  • projects/shared-pool/tla/mutants/50-exec-on-settled-advances-refused.patch
    • Adds a refused-settlement advancement regression mutant.
  • projects/shared-pool/tla/mutants/51-exec-no-stale-cancelled.patch
    • Adds a forgotten-execute regression mutant.
  • projects/shared-pool/tla/mutants/52-exec-confirm-stale-dropped.patch
    • Adds a stale-confirmation regression mutant.
  • projects/shared-pool/tla/mutants/53-exec-on-settled-never-advances.patch
    • Adds an on-settled advancement regression mutant.
  • projects/shared-pool/tla/mutants/54-exec-lock-settle-pruned-ok.patch
    • Adds a pruned-settlement acceptance regression mutant.
  • projects/shared-pool/tla/run.sh
    • Adds executor TLC runners, witnesses, and an optional full-view cross-check.
  • tools/scripts/check-pin.sh
    • Replaces legacy release identity checking with a multi-entry identity table check.
  • tools/scripts/test-check-pin.sh
    • Adds isolated scratch-repository tests for the pin identity checker.

Automated review by the pr-review agent (Codex CLI + GPT-5.6 Terra). Reply on any review thread to discuss a finding.

@gabehamilton gabehamilton left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The change is correctly scoped as an in-progress v1.1.0 re-verification and has useful pin and catalogue groundwork. However, the new executor proof path has a false-pass hole: CI executes only negative mutant runs for it, so a failure of the unmutated model is interpreted as every mutant being killed. Make the base executor TLC configurations required before relying on these artifacts.

@@ -0,0 +1,460 @@
------------------------------ MODULE Executor ------------------------------

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The workflow never invokes tla/run.sh executor; its TLA job still runs only safety liveness trace and then mutants. The six new patches are therefore the only CI execution of this module. check_mutants treats any failure of executor-w2-noview as proof that a mutant was killed. If the unmutated model has an invariant violation, semantic error, or broken configuration, each patched copy fails for that pre-existing reason and is reported as killed, leaving the CI job green without ever proving the baseline. Run projects/shared-pool/tla/run.sh executor as a required TLC step before the mutant job (and keep the mutant step as the negative check).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 10912fb. The tla job now has an "Executor model (TLA-EXEC)" step that runs tla/run.sh executor (executor-w2, executor-w3 and the 12 witnesses) before the spec mutants. A broken base model now fails the job, so it can no longer be counted as six kills. This adds about 6 minutes on a 10-core Mac (w9b timings), which fits within the job's 120-minute timeout.

gabehamilton and others added 23 commits November 13, 2026 22:01
Review finding on #32: the tla job ran only the executor mutants, so a
broken base model would have counted as six kills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…races 212-215)

Implements the v1.1.0 trace contract frozen in W1 (header of
conformance/src/main.rs) on pool-core 1.1.0 at the pin 57b3f02:

- State s/7 (FirstId, DoneUnits); a refused configuration is written as
  init_error(invalid_config) (trace 210, F-4).
- Fixtures chosen by name, so traces 0-211 keep their numbers; appended
  212 station, 213 owner_exec (the owner as executor, ends with an observe
  that re-bases the ghosts), 214/215 the findings.rs:175 recovery hedge
  settled true/false. 216 traces.
- Trace 207 `window` (was `full`): prune of a Completed front, a `gate`
  prerequisite met only through completed_units, Full on an open front,
  NotFound for a pruned id on dispatch/ack/cancel/settle, refresh. 523
  calls, each result asserted while the trace is built.
- random_op ids are first_id + k, with a pruned-id draw only once
  first_id > 0, so traces without a prune keep v1.0.0's calls.
- Classes from pre/post states (prune, full_open_front,
  prereq_after_prune, recovery_admitted, <op>:not_found_pruned, refresh,
  init:invalid_config); REQUIRED (47) and FORBIDDEN (cancel/settle
  bounds/arithmetic) are checked on every run.
- reads.txt: 29 required read classes; every pre-state with 256 records
  is read; the final states of traces 1-5 and 207 at VERSION_CAP - 1,
  VERSION_CAP and u32::MAX (reads(N, 0)); the preview/submit agreement
  check uses id == first_id + len.
- Cargo.lock: pool-core 0.1.0 -> 1.1.0.

traces/core.txt and traces/reads.txt stay v1.0.0 until the integration
commit (W10), so the conformance CI job's --check steps fail until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second, stdlib-only implementation of the generator's call
classification: it parses any core.txt (v1.0.0's s/5 or v1.1.0's s/7 and
init_error), recomputes Op:Result and the derived v1.1.0 classes from the
state terms, and applies REQUIRED and FORBIDDEN (checked equal to the
lists in src/main.rs). It also fails on a state at or above VERSION_CAP.

On the v1.0.0 corpus (a072a2d) it exits 1: 10 required classes missing
(cancel:invalid_state, submit:prune, submit:full_open_front,
submit:prereq_after_prune, four <op>:not_found_pruned, observe:refresh,
init:invalid_config) and 4 forbidden ones present (cancel:bounds 3,
cancel:arithmetic 2, settle:bounds 3, settle:arithmetic 1). On the v1.1.0
candidate it exits 0, with every class count equal to the generator's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…comments)

coverage.py's docstring cited the tag shared-pool-v1.0.0, which does not
exist yet; it now cites traces/core.txt at a072a2d, the v1.0.0
verification's head. The per-call comments of release_arith (trace 208)
described v1.0.0's results; they now give v1.1.0's, with v1.0.0's in
brackets. Comments only: core.txt and reads.txt are byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec, generators, checks and harness wrappers follow pool-core 1.1.0
(57b3f02): the release-aware envelope, the min(PV) bounds check, the
window (first_id, prune of a terminal front), completed_units, the
version cap and the refresh. The invariant is INV-WF/WIN-1, INV-LEDGER
(with the ghost's pruned contributions), INV-RES, INV-PV, INV-VERCAP,
INV-CU, INV-DEP and INV-VER; INV-HARD and INV-HEALTHY are corollaries
asserted in plain mode. LIVE-ALL is an assertion on every step and in
h_live_all.

New harnesses: h_version_cap_* (7, INV at the cap), h_version_max_* (3,
WF states), h_wf_* (5), h_full_256_prune; h_live1 is h_live_all; the
wedge harnesses assert the fixed behaviour. Plain mode adds window_walk,
cap_walk, the flipped F-1/F-2/F-3 tests and F-5/F-6 from upstream's
findings.rs. run.sh lists the new harnesses and families and skips
h_ref_traces (the v1.0.0 corpus) until the corpus and conform.rs move to
v1.1 (W10). tla.rs is still v1.0.0: REF is out of plain mode until the
TLA+ model is frozen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xtractor)

Requirements, guard table, lifecycle, constants, fixtures, claims and
threats re-cited to the v1.1.0 docs at 57b3f02 (doc line map; hand
verdicts for spec@v1.0.0:46 -> spec:48 and handoff@v1.0.0:31 ->
handoff:34). guard/5 adds version_cap (submit, dispatch, pause, observe),
cancel not_completed (InvalidState) and observe all_terminal_or_restate.
Findings F-1..F-6 are fixed('v1.1.0', Props); the four v1.0.0
divergences are closed_divergence/5 facts; no known finding remains.

extract.py: evaluates const expressions (VERSION_CAP = u32::MAX - 768),
index/bump_new as fallible helpers, Vec fields, checked_add sites, the
derived station fixture. consistency.pl: C-1 read-call rule, five new
C-2 unreachable rules, C-3 reject(E) outcomes and no divergence
exception, C-4 version reserve and window fields, C-5 fixture accounting
and s/7 states, C-6 fixed/open findings and closed divergences.

Code mutants re-anchored to M; c09 (now the code) replaced by c10
(validate accepts actor = executor); m16 re-anchored to the new guard
table. At the branch head C-2's TLA leg (W4), C-3's trace leg (W10
corpus) and C-5 (W6 model) still fail; all pass in a scratch with those
pieces shimmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p unwinding bound

Re-base mutants 05, 07, 08, 09, 14, 21, 28 and 30 on the v1.1.0 core and
re-target 11 (release also counts completed_units). New killers for 07
and 27 (h_wf_cancel) and 22 (h_version_max_ack): equivalent on INV
states, killed in the WF domain. The applying patches are regenerated
without offsets or fuzz.

New fix-revert mutants 32-45 (N1-N14), one per upstream fix hunk, each
with its FR id: envelope release term, check_bounds min(old, new), the
version cap in set_paused and candidate, Full on an open front only,
validate actor != executor, the observe refresh, cancel of a Completed
record, completed_units (update, saturation, scan), first_id on a prune,
index's range filter, and the cap in candidate (preview).

Plain mode kills all 43 core mutants it should; 20 survives (equivalent);
31 (tla.rs) waits for the v1.1 transcription.

run.sh: every harness gets memcmp.0:25. CBMC's library memcmp, which
observe's `values != self.values` now calls on 8 bytes per value, is
linked after codegen, so its loop is not in --show-loops and got the
harness bound (probe P5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retarget the shell layer at v1.1.0 (source-mirror 57b3f02):

- One documented build (scripts/build.sh, --cfg near) on the wasm path;
  Plain is only the NT-F1 negative control.
- The NT-F1/F2/F4 witnesses become regression tests.
- shell.rs gains F-3 paging and pruned-id tests; store_diff gains a window
  sequence.
- executor.rs covers EX-6..EX-8: the window, on_settled, a model
  differential and the D-1 port. It also checks WINDOW == MAX_RECORDS.
- wedge.rs shows F-1 refused and F-2 resolvable.
- New scenarios.rs (SCN-1).

wasm-surface.sh:
- SURF-2 must pass.
- New SURF-3: (a) runs build.sh, checks build.json and the hashes, and
  checks imports == ALLOWED (18/16); (b) build.sh's checker refuses the
  no-cfg wasm and two synthetic modules.
- wasm-surface.expected is regenerated.

Mutants:
- m01-m21 rebased as s01-s21.
- New s22-s38, with s32 split into s32a/s32b.
- Historical s00a/s00b: the v1.0.0 contract and executor, with harness
  cfg shims.
- run-mutants.sh: Near build only; NT_SKIP_TRACES until the v1.1.0
  corpus lands.

traces.rs still replays the v1.0.0 corpus and fails until W10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(review fixes)

C-2 matched guards by outcome name only, so a Full test without the
open-front conjunct, or observe calling bump() in place of bump_new(),
still lined up. extract.py now emits code_error_cond/4 (the && conjuncts
of each Full and Arithmetic `if`), pool_req.pl documents
guard_condition/4 (record_bound: spec:21, api:28; version_cap: spec:50),
and the specification leg of C-2 matches each such guard only to a site
with the same condition (problem condition_vs_code). The cap-dependent
unreachable rules now require an extracted cap check. New code mutants
c11 (Full ignores the front) and c12 (observe plain bump) are killed by
C-2; at 3bfaa4b both survived.

C-5's trace releases address a record by id = first_id + j of the trace
state (trace_open_record/4), not by its list index; a test covers a
pruned window. A-GAS cites api:46; api:57.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Machine.lean transcribes lib.rs at 57b3f02: the release-aware hull and
the min(PV old, PV new) comparator, VERSION_CAP with bump_new on submit,
dispatch, set_paused and observe, the 256-record window over the full
history (firstId, Full only with the front open, prune on submit),
lifetime completed_units, actor != executor in validate, the observe
refresh, and cancel of Completed as InvalidState.

Inv gains INV-RES, PV <= B and INV-VERCAP (INV-HARD is now a corollary);
res_sub proves the post-call envelope is a sub-box, which gives
LIVE-ALL with no premise beyond Valid and Inv (live_all, no_wedge) and
LIVE-1 as a corollary. Window.lean proves WIN-1, WIN-2, WIN-ESC and
valid_iff; Calls.lean adds dep1_iff, obs2, refresh_ok, cap_stops and
snapshot_fresh. Witness.lean is rewritten for the fixed findings (F-1,
F-2, F-4, F-5 at the real cap, F-6) and shows INV-RES is necessary.

Audit 65 theorems; canary Live1NoPremise moves to regression/ (it must
compile now), new canary LiveAllNoRes; 26 mutants (16 re-anchored,
17-26 fix reverts with FR ids) plus property probes for 17-26.
run.sh replay fails on the committed v1.0.0 corpus until W10 lands the
v1.1.0 corpus with the parser change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records the v1.1.0 Lean layer at pin 57b3f02. It covers the theorem
table (LEAN-IND, LEAN-LIVE-ALL, WIN-1/WIN-2/WIN-ESC, CFG-2, VER-CAP,
REFRESH-1), the witnesses, the canaries (False, NotInv, LiveAllNoRes),
the Live1NoPremise regression for F-5, and the 26-mutant table with
property probes. It also gives the run times. run.sh replay fails on
the committed v1.0.0 corpus until the v1.1.0 corpus and parser land
together (W10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fted submit (W8)

s13 (submit keeps only an Ok id) is equivalent in every reachable state:
preview is submit's candidate, and first_id + len cannot overflow below the
version cap. sh5_core_errors_are_panics_with_the_error_string now crafts
first_id = u32::MAX, where the preview allows a submit the core refuses
with Arithmetic, and checks the shell panics with it.

Mutant run (NT_SKIP_TRACES=1, 18 min): control survives, 41 of 41 killed.
RESULTS.md lists every mutant's failing tests and the surface result of
the historical mutants s00a + s00b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SharedPool.tla transcribes pool-core at 57b3f02: the release-aware
envelope (completion and release terms) with the min(before, after)
comparator, the 256-record window (first_id, Full only on an open
front, prune with the ghost fold), completed_units saturating at
DoneCap, VERSION_CAP and bump_new, actor != executor in validate,
cancel of a Completed record InvalidState, and the observe refresh.

Props.tla adds INV-RES, INV-VERCAP, LIVE-ALL, NoWedge, WIN-1, WIN-2,
WIN-ESC, OBS-2, REFRESH-1, VER-CAP and new witnesses; the invariants
split into view-safe (MC_Safety's VIEW) and absolute ones (MC_Cap,
liveness, TraceCheck). New harnesses: MC_Safety at MaxRecords 2 with a
relative-id VIEW, MC_Safety_1 (smoke), MC_Cap (Pool::new at
VersionCap - 4), MC_Recovery, MC_F2b, MC_Liveness_Win; the F1/F2
liveness configs now must hold and the F1Shape/F2Shape configs are
gone. Mutants 01-28 and 30 re-anchored, 09 repurposed, 29 and 31
retired, 32-48 new. run.sh: the new checks, a baseline run of every
mutant check on the unmutated model, and the trace state count.

prolog/extracted/tla_facts.pl regenerated (cancel's InvalidState).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons (review fixes)

The guard order is checked against lib.rs at the pin and the extracted
code_events, and compared with W3's coarser guard/5 table by script once
the c2-unreachable sites are dropped. The drop list now includes the add
in submit's recovery check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, m21-m32)

pool_machine.pl: pool/8 with the retained window (record j has id
first_id + j) and completed_units. The envelope is the hull of each open
record's completion and release terms, every endpoint within +-1e6 or
Arithmetic; Bounds compares its violation with min(PV(values),
PV(candidate)). Full only while the front is open; a pruning submit advances
first_id; prerequisites count completed_units. VERSION_CAP gates submit (as
candidate's last check, so preview too), dispatch, set_paused and observe.
observe is Ok as a refresh when it restates the current values; cancel of a
Completed record is InvalidState; valid_config rejects actor = executor.
window_size/1 and version_cap/1 scale down only inside with_window_size/2.

props.pl: INV-RES, INV-VERCAP, WIN-1, WIN-2, OBS-2, TERM-1 on
cancel(Completed), VER-CAP; probes LIVE-ALL, REFRESH-1, WIN-ESC; the
INV-LEDGER ghost folds pruned records and keeps its base on a refresh.

MC-1 (model_check.pl, test_mc1): seven universes, all complete with no
violation. wedge 4,672 states, 0 dead (v1.0.0: 228); reliance 454, 0
release-blocked (v1.0.0: 150); healthy 5,032; window and window1 (windows
of 2 and 1) prune, fail Full only on an open front and admit a pruned
prerequisite; cap stops the gated calls at a scaled VERSION_CAP; f2b keeps
every release term within +-1e6. The window is 256 again after each run.

test_model: 34 tests, the F-1..F-6 "fixed" tests keep the v1.0.0 outcome in
a comment. test_requirements: C-5's trace releases reach the model at
id = first_id + index.

Mutants: m01-m20 re-anchored; m21-m32 each revert one v1.1.0 fix (FR-1..
FR-8). In a scratch with the candidate corpus, the W10 trace-reader patch
and the TLA layer's v1.1.0 GuardOrder, run.sh passes and all 47 mutants
are killed. m17 and m23 change no property's verdict on a reachable state
and are killed by exact outcomes (RESULTS.md).

At this commit test_mc2, test_reads and C-3's and C-5's trace legs fail
until the corpus swap (W10), and C-2's TLA leg until the TLA layer's
SharedPool.tla is committed and extracted/tla_facts.pl regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rder

The TLA layer committed SharedPool.tla and the regenerated tla_facts.pl
(538c97a) before the Prolog model commit, so C-2 passes at the branch
head. Only test_mc2, test_reads and C-3's and C-5's trace legs wait for
the corpus swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view fixes)

The last full run.sh is now a single run (exit 0, 1,735 s, 47 of 47
mutants killed) in a scratch of the committed prolog/, tla/ and
conformance/ at 51d4ca2 with the candidate corpus and the trace-reader
patch, replacing the two-part run. "State at this commit" says that the
RD-PREVIEW and RD-BEST evidence text names the committed reads.txt's
numbers (1,246 states, 36,797 requests) until the corpus swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ding W10 (review fixes)

The SH-8 row cited conformance_traces_through_the_shell as passing, but on
the committed tree it replays the v1.0.0 corpus and fails until W10. The
row and LIVE-2's trace-0 evidence now say so. wasm-surface.sh explains why
SURF-3(a) removes artifacts/build.json before build.sh and what a failed
build leaves behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ant 31 re-based (review fixes)

tla.rs now transcribes the frozen v1.1.0 SharedPool.tla (538c97a): firstId
and the 256-record window with prune, doneU, VERSION_CAP with CapErr/VerErr,
the release-aware envelope, check_bounds against min(PV(values), PV(cand)),
cancel of a Completed record, and observe Pending only when the values
differ and a record is open. The ghost follows plan 2.2: tla::ghost_after
computes it from the concrete pools, and checks::tla_ghost maps the Kani
ghost (base + pruned, max(k0, first_id)) onto it.

PART_REF is back in plain mode's BASE. checked_step (window_walk, cap_walk,
the f-tests) now asserts REF and that spec::ghost_step's ghost equals the
TLA+ ghost. h_ref covers that v1.1 makes unreachable on INV states are
removed (ack/cancel/settle Arithmetic, cancel/settle Bounds). Added: cancel
InvalidState on a Completed record. Observe Ok is split into re-base and
refresh. h_ref_traces stays filtered until W10 commits the corpus and
conform.rs.

Mutant 31 is re-based on the v1.1.0 release_err (CheckBounds(.., -1) for
CheckBounds(.., id)), and run.sh mutants exits 0 again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wasm-surface.sh (the check, after the comment added in 158579e) exits 0
with SURF-1, SURF-2, SURF-3(a) and SURF-3(b) ok and the mirror clean at
57b3f02. RESULTS.md's surface date now matches the 2026-11-14 test and
mutant runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ive at 2

Props.tla restates INV-RES, INV-HARD and CheckEnvOk over the hull of the
open records (HullLo/HullHi: each open record's min/max(d, x, 0)) instead
of reading the model's Low/High, so a mutant of the admission envelope
is checked against an independent statement. SharedPool.tla is unchanged
(frozen at 538c97a).

MCCommon.tla adds two F2bConfig witnesses: Witness_EdgeValue (a value at
exactly +-MAX_VALUE; kills 23) and Witness_F2bRefused (with A open and
values = A's reservation, B x 2 is refused with Arithmetic; kills 24 and
34, whose reachable states equal the unmutated model's).

Every MC cfg lists its invariants one per line, so TLC names the one that
fails. New MC_Liveness_Win2.cfg (WinLive at MaxRecords 2, run.sh
liveness-win2). run.sh: the two witnesses; the mutant baseline skips the
executor checks (run.sh executor is their baseline). Mutant headers name
the checks that kill them (04 by f2b, 25 by cap, 17/23/24/34/37 by
witnesses). RESULTS.md is rewritten for v1.1.0. tla_facts.pl regenerated
(the Props.tla hash).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, mutants 7 min 2 s)

The default run.sh and run.sh mutants were re-run on da244cd's files in
the scratch tree (W10 parser, candidate corpus): every check as
expected, all 52 mutants killed (04 by f2b, 34 by Witness_F2bRefused).
Also: the F2b witness and TraceCheck rows say what they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…axRecords 2) (review fixes)

The WIN-LIVE paragraph and the scaling line now say WIN-LIVE runs at
MaxRecords 1 (MC_Liveness_Win.cfg) and 2 (MC_Liveness_Win2.cfg); the
TLA-LIVE-F2 paragraph is reflowed to the comment box width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gabehamilton and others added 17 commits November 14, 2026 08:48
…on 5 (plan-meta 4.5)

With `[project] catalogue = "strategy.md"` (shared-pool only), check-status.sh
reads section 5's tables as C-6 does and fails unless status.toml agrees:
the properties are exactly the non-assumption rows and [assumptions] the
assumption rows, no ID twice; `layer` is the first Layer(s) entry
(near-tests: unit, difftest or wasm-check) and the others are in `cross`;
one module per 5.N subsection; each `status` is what the Status cell records
for the primary layer (stale for "stale; v1.0.0:" or a Kani row's
"Kani: pending (v1.0.0: ...)", unverified or stale for a bare
"Kani: pending", in-progress for a result outside the v1.0.0 brackets, a
Kani row needing "bounded proof", unverified for none); an assumption's
`level` is its cell's. All 118 rows agree today; near-approval's output is
byte-identical (no catalogue key).

test-check-status.sh: every failing case now must print exactly one problem
matching its pattern (GitHub's ::error:: form included). 29 new cases edit
scratch copies of shared-pool's status.toml and strategy.md: mismatched
cells both ways, missing, extra, repeated and malformed rows, assumptions,
layer, cross, modules, levels, and the Kani-row forms W13b will write.

strategy.md 5, 12 ("Catalogue" row; "Closed findings" no longer says
status-lint ignores [findings]), 14 (status-lint row) and 15 (the drift
risk); status.toml header; workflow comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…logue key guard, near-approval self-test scope)

- check-status.sh: read a section 5 Status cell without its markup (*, `,
  _ outside a word) and treat a result word right after "not", "no" or
  "never" as no result. The assumption level is read from the same plain
  cell. The real cells are read the same as before (output unchanged).
- test-check-status.sh: 4 cases for the above. The real-file case must
  print the catalogue summary line (with rows), so losing `catalogue =`
  fails with its own message. The no-key case must print the plain one.
  An optional [near-approval|shared-pool] argument picks one project's
  cases.
- near-approval.yml runs only the near-approval cases, so a shared-pool
  edit cannot fail near-approval's status-lint. shared-pool.yml still
  runs every case.
- strategy.md section 12: the closes/closed_by back-check is for
  properties only (an assumption in closed_by needs no closes). The
  Catalogue row adds markup, negation and the key guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… --all run's results.tsv

Lets a second measurement run at the same commit schedule its jobs with
the first run's measured peaks and times instead of v1.0.0's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to 3x its measured time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th its harnesses'

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/local/results-tables.py

RESULTS.md is rewritten for v1.1.0 (pin 57b3f02): status rule, what changed
from v1.0.0, the CI split and local record (13 GB line, fixed placements,
limit_s, not-run.tsv), layout, plain mode, mutants, findings and the seven
v1.1.0 deviations; v1.0.0 sections not yet redone carry a note. Every count,
time and peak of the v1.1.0 runs is in a generated block (summary,
harnesses, mutants, covers; results-tables.py from the run directories,
run 1 = all-2d33d33, run 3 = run3-2d33d33 so far) or in record.py's
local-record block (placeholder until the record is written).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uns, with not-run.tsv

record.py RUN_DIR... takes the kani-large and kani-mutants-large jobs from
one or more run-local.py runs at one commit and fingerprint (measurements,
also stopped early, or a record's run): each job from the run that finished
it, the latest when several did (its result must pass), with limit_s the
KANI_TIMEOUT it ran under there. A large mutant that no run finished must be
declared in kani/local/not-run.tsv; a declared mutant that a run finished,
a declared harness, and an undeclared unfinished large job are refused.
provenance.txt lists every run, the jobs each gave and superseded results.

check-kani-record.py reads not-run.tsv (in the digest), accepts a declared
kani-mutants-large mutant in place of a recorded one with a warning each
time, and keeps the large timeout >= recorded limit_s rule.

The self-test covers the multi-run merge, not-run.tsv (accepted, a harness
refused, declared-but-finished refused, edited by hand) and a limit above
the matrix timeout; its workflow cases take their entries from the
workflow (KANI_RECORD_WORKFLOW), so any v1.1 split works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y at v1.1.0

The kani-mutants-large mutants that no local measurement at 2d33d33 runs
before the v1.1.0 deadline (18 25 30 01 03 06 12 15 19 23 28 05 10 16 11 29;
run 3 runs the others). Their plain-mode kill is checked in CI. Extended at
assembly time with any run-3 mutant still unfinished when it is stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v1.1.0 measurement

tools/scripts/kani-matrices.py regenerates the kani, kani-large,
kani-mutants and kani-mutants-large matrices from REV's run.sh list and
mutants/*.patch and the results.tsv of run-local.py --all runs at REV's
fingerprint (another fingerprint is refused). The 13 GB line on each
harness's peak (the latest run that passed it, else W7's, else v1.0.0's
times 1.25); h_wedge alone in kani-large; h_full_256 always kani-large
(gb at least 30: it filled ubuntu-latest's memory and swap in CI) and
mutant 21 with it. A large timeout is at least the limit its job ran
under (or, not passed yet, the largest limit a run planned for it); each
entry's harnesses times its timeout fit the job's timeout-minutes less
30. It checks the result, warns on not-run.tsv entries that disagree, and
is idempotent (--write on unchanged inputs changes nothing).

The workflow's matrices are regenerated from all-2d33d33 (35 rows) and
run3-2d33d33 (6 rows so far): 49 harnesses in 7 kani groups, 49 in 18
kani-large groups, 17 kani-mutants, 28 kani-mutants-large; v1.1.0's
names throughout. The Kani comments, plain-job counts and the runner-size
notices follow the new split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine, estimates) and RESULTS.md wording

results-tables.py: a matrix check-kani-record.py cannot read stops the
tool with its error instead of being skipped (it gave a vacuous Split
check and "not run" for hosted harnesses); the Split check also names a
job in no matrix, a matrix name that is not a job and a name listed
twice. A generated Verdict line applies RESULTS.md's Status rule ("open"
without --final). Estimates read every run's jobs.json, so a harness
still at v1.0.0's x1.25 takes a run's better schedule (h_full_256 30 GB,
not 0.8 GB, also with --final) and mutants follow their harnesses. A
cover family read partly by W7 without its covers.tsv says so (was an
empty pending list). W7 rows carry both peaks (h_init: CBMC 32.9, tree
33.0).

RESULTS.md: the headline names the subject and points at the Verdict
line; Findings no longer states by hand that no property failed or that
mutants 32-45 are killed under Kani (plain mode at 6b120fd; Kani: the
Mutants table); run 3's selection described as it was; the columns and
estimate prose follow the code; blocks regenerated (run 3 still going).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kani-matrices.py --write on all-2d33d33 (35 rows) and run3-2d33d33 (9
rows). Run 3 measured h_bmc_from_init_po (2027 s, 37.3 GB, limit 4800 s),
so it is no longer estimate-sized. Its entry is now gb 38, timeout 6120,
and the kani-large groups re-pack around it. Counts are unchanged: kani
49 harnesses in 7 groups, kani-large 49 in 18, kani-mutants 17,
kani-mutants-large 28. The largest gb is still 40.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it (record review fixes)

A failed result no longer replaces a passed one: record.py takes a large
job from the latest run whose results.tsv row passed it (exit 0, ok or as
the patch expects), names every result not taken in provenance.txt
(superseded.<job>), and refuses only a job that no run passed, listing
each run's result, as results-tables.py's tables do. Without a start line
in progress.log, a job's limit is jobs.json's timeout (the KANI_TIMEOUT
run-local.py ran it under) instead of a refusal. check-kani-record.py's
re-run message drops v1.0.0's "about 4 hours". The self-test covers a
later failure after an earlier pass, two failures, and a job without a
start line; README and run-local.py's docstring say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rule and resident memory vs footprint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rness does not fit

A hosted harness that fails CI's kani job for memory goes into CI_LARGE in
kani-matrices.py; h_step_observe_inv_3 came nearest (15 GB footprint, 10.3 GB RSS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate the footprint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gabehamilton
gabehamilton added this pull request to stack #33 November 14, 2026 21:11
gabehamilton and others added 6 commits November 14, 2026 14:14
…esses (interim; run 3 stopped at 21:13Z)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_max alone)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2d33d33 and run4-2d33d33 measurements

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tegy.md

w13b.patch filled from the final record (fill_placeholders.py --no-ci, fill_kani_run.py): CI's
kani, kani-record and covers with the v1.1.0 record are pending on PR #32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gabehamilton
gabehamilton marked this pull request as ready for review November 14, 2026 23:01
@gabehamilton gabehamilton changed the title shared-pool: formal verification of shared-pool-controls v1.1.0 (in progress) shared-pool: formal verification of shared-pool-controls v1.1.0 Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant