Skip to content

Commit 5db22b2

Browse files
Claude/adoring volta l cd cj (#44)
<!-- SPDX-License-Identifier: MPL-2.0 --> ## Summary <!-- Briefly describe what this PR does and why. Link to related issues with "Closes #N". --> ## Changes <!-- List the key changes introduced by this PR. --> - ## RSR Quality Checklist <!-- Check all that apply. PRs that fail required checks will not be merged. --> ### Required - [ ] Tests pass (`just test` or equivalent) - [ ] Code is formatted (`just fmt` or equivalent) - [ ] Linter is clean (no new warnings or errors) - [ ] No banned language patterns (no TypeScript, no npm/bun, no Go/Python) - [ ] No `unsafe` blocks without `// SAFETY:` comments - [ ] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [ ] SPDX license headers present on all new/modified source files - [ ] No secrets, credentials, or `.env` files included ### As Applicable - [ ] `.machine_readable/STATE.a2ml` updated (if project state changed) - [ ] `.machine_readable/ECOSYSTEM.a2ml` updated (if integrations changed) - [ ] `.machine_readable/META.a2ml` updated (if architectural decisions changed) - [ ] Documentation updated for user-facing changes - [ ] `TOPOLOGY.md` updated (if architecture changed) - [ ] `CHANGELOG` or release notes updated - [ ] New dependencies reviewed for license compatibility (MPL-2.0 / MPL-2.0) - [ ] ABI/FFI changes validated (`src/interface/abi/` and `src/interface/ffi/` consistent) ## Testing <!-- Describe how you tested these changes. --> ## Screenshots <!-- If applicable, add screenshots or terminal output demonstrating the change. --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9eaf259 commit 5db22b2

15 files changed

Lines changed: 720 additions & 84 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,24 @@ jobs:
4646
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747

4848
- name: Set up Node.js
49-
uses: actions/setup-node@v6
49+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
5050
with:
51-
node-version: '22'
51+
node-version: '25'
52+
53+
- name: Install npm deps (rescript build prerequisite)
54+
run: npm install --no-audit --no-fund --silent
55+
56+
- name: Build ReScript parser
57+
run: node_modules/.bin/rescript build
5258

5359
- name: Run smoke test
54-
run: node tests/e2e/e2e-smoke.mjs
60+
run: node tests/smoke/e2e-smoke.mjs
61+
62+
- name: Run aspect test (claim envelope)
63+
run: node tests/aspect/claim-envelope.mjs
64+
65+
- name: Run parser benchmark (smoke; full run is local)
66+
run: BENCH_ITERS=20 node benchmarks/parser-bench.mjs
5567

5668
# --------------------------------------------------------------------------
5769
# Job 3: Full Idris2 + Zig build then E2E
@@ -65,12 +77,15 @@ jobs:
6577
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6678

6779
# ---- Idris2 ----
80+
# 0.8.0 is the version the src/abi/ proofs are written against
81+
# (Proofs.idr:629 "verified with Idris2 0.8.0"; Layout.idr / Types.idr
82+
# carry 0.8-specific workarounds for reduction + interface resolution).
83+
# Older versions will fail the standalone build.
6884
- name: Install Idris2
6985
run: |
7086
sudo apt-get update -qq
7187
sudo apt-get install -y libgmp-dev
72-
# Install Idris2 from binary release
73-
IDRIS2_VERSION="0.7.0"
88+
IDRIS2_VERSION="0.8.0"
7489
curl -fsSL \
7590
"https://github.com/idris-lang/Idris2/releases/download/v${IDRIS2_VERSION}/idris2-${IDRIS2_VERSION}-ubuntu-20.04.tar.gz" \
7691
-o /tmp/idris2.tar.gz || true
@@ -79,9 +94,13 @@ jobs:
7994
fi
8095
8196
# ---- Zig ----
97+
# 0.15.1 is the version ffi/zig/build.zig is written against (header
98+
# comment "Updated for Zig 0.15+ API (addLibrary / createModule
99+
# pattern)"). 0.12 lacks `b.addLibrary` and the `.root_module` field
100+
# and will not parse the build script.
82101
- name: Install Zig
83102
run: |
84-
ZIG_VERSION="0.12.0"
103+
ZIG_VERSION="0.15.1"
85104
curl -fsSL \
86105
"https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" \
87106
-o /tmp/zig.tar.xz
@@ -90,9 +109,9 @@ jobs:
90109
91110
# ---- Node (for smoke test within E2E script) ----
92111
- name: Set up Node.js
93-
uses: actions/setup-node@v6
112+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
94113
with:
95-
node-version: '22'
114+
node-version: '25'
96115

97116
# ---- Full E2E ----
98117
- name: Run full E2E (with build checks)

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ erl_crash.dump
5252
!tests/e2e/*.mjs
5353
!tests/contracts/*.mjs
5454
!tests/levels/*.mjs
55+
!tests/aspect/*.mjs
56+
!benchmarks/*.mjs
5557
*.cmi
5658
*.cmj
5759
*.cmt

Justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ test-contract:
146146
test-e2e:
147147
@echo "Running end-to-end tests..."
148148
rescript build
149-
node tests/e2e/e2e-smoke.mjs
149+
node tests/smoke/e2e-smoke.mjs
150+
node tests/e2e/e2e-driver.mjs
150151

151152
# Aspect tests for cross-surface claim coherence
152153
test-aspect:

LEVEL-STATUS.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ time; they are not needed at runtime.
7575

7676
## What "draft" means
7777

78-
Levels 11-12 currently have draft Idris2 files and example syntax, but they are
79-
not part of `typed-wasm.ipkg` and, as of 2026-03-30, both standalone checks
80-
fail. Zero dangerous patterns is not enough here: a file that does not
81-
type-check is not a claimable proof artefact. Wiring these levels into the
78+
Levels 11-12 are draft for surface semantics, not for ipkg membership.
79+
As of 2026-04-18 (commit A1) both `Tropical.idr` and `Epistemic.idr` are
80+
in `typed-wasm.ipkg` and build clean under Idris2 0.8.0 — see the
81+
2026-05-18 reconciliation in `PROOF-NEEDS.md`. The "draft" label
82+
applies to the level semantics themselves (Tropical cost-tracking and
83+
Epistemic freshness propagation under concurrent writes remain
84+
research-grade): theorems live, but the surface language and Zig FFI
85+
do not yet expose them. Wiring these levels through the rest of the
8286
toolchain remains future work.
8387

8488
## Proof inventory

README.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ WASM instructions with zero overhead.
7979
| 10 | Linearity | Linear resource usage
8080
|===
8181

82-
L11-L12 research files exist in the repository, but they are not part of the
83-
default checked Idris2 package and are not currently claimed as integrated or
84-
machine-checked proof surface.
82+
L11-L12 (Tropical, Epistemic) are in `typed-wasm.ipkg` and build clean under
83+
Idris2 0.8.0 as of 2026-04-18 (see `PROOF-NEEDS.md` reconciliation). Their
84+
surface semantics remain research-grade — the parser, Zig FFI and downstream
85+
tooling do not yet expose L11/L12 features.
8586

8687
== The Killer Feature: Multi-Module Type Safety
8788

ROADMAP.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ Key capabilities delivered:
2626

2727
Known audit constraints:
2828

29-
* L11-L12 draft files are not part of `typed-wasm.ipkg` and currently fail standalone type-checking
29+
* L11 (Tropical) and L12 (Epistemic) are in `typed-wasm.ipkg` since 2026-04-18
30+
(commit A1) and build clean under Idris2 0.8.0 (PROOF-NEEDS.md reconciliation
31+
2026-05-18). Treat them as research/draft for surface semantics, not for
32+
ipkg membership.
3033
* Release/build/container metadata still contains template residue
3134
* Benchmark and venue-facing paper claims require evidence cleanup before submission
3235

TEST-NEEDS.md

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,63 @@
66

77
| Category | Count | Details |
88
|----------|-------|---------|
9-
| **Source modules** | 21 | 11 Idris2 ABI (Region, TypedAccess, Levels, Pointer, Effects, Lifetime, Linear, MultiModule, Proofs, Tropical, Epistemic), 3 ReScript parser (Ast, Parser, Lexer), 3 Idris2 interface ABI, 2 Zig FFI + cache |
10-
| **Unit tests** | 1 file | ParserTests.res (~82 assertions) |
11-
| **Integration tests** | 0 | None |
12-
| **E2E tests** | 1 | e2e-smoke.mjs (~43 assertions) |
13-
| **Property-based tests** | 1 | property_test.mjs (10 properties, ~40+ assertions) |
14-
| **Benchmarks** | 0 | None |
15-
| **ECHIDNA harness** | 1 | echidna-harness.mjs (7 assertions) |
9+
| **Source modules** | 21 | 11 Idris2 ABI (Region, TypedAccess, Levels, Pointer, Effects, Lifetime, Linear, MultiModule, Proofs, Tropical, Epistemic), 4 ReScript parser (Ast, Parser, Lexer, Checker), 3 Idris2 interface ABI, 2 Zig FFI + cache, 1 Rust verifier crate (typed-wasm-verify, ~1.6k LOC + 53 tests) |
10+
| **Unit tests** | 2 files | ParserTests.res (88 assertions), crates/typed-wasm-verify (43 unit + 10 cross-compat) |
11+
| **Integration tests** | 1 | tests/contracts/airborne-step-state-contract.mjs (14 assertions) |
12+
| **E2E tests** | 2 | tests/smoke/e2e-smoke.mjs (40 assertions), tests/e2e/e2e-driver.mjs (corpus driver) |
13+
| **Per-level tests** | 10 | tests/levels/L1.mjs .. L10.mjs (56 assertions total) |
14+
| **Aspect tests** | 1 | tests/aspect/claim-envelope.mjs (49 assertions — added 2026-05 to catch cross-doc claim drift after deep audit found 5 such drifts) |
15+
| **Property-based tests** | 0 | tests/property/property_test.mjs claimed DONE 2026-04-04 but file is absent — stale entry being scrubbed |
16+
| **Benchmarks** | 1 | benchmarks/parser-bench.mjs (per-example wallclock; median/p95/min/throughput; JSON summary on stderr; added 2026-05) |
17+
| **ECHIDNA harness** | 1 | tests/echidna/echidna-harness.mjs (659 LOC, 124 local assertions, remote prover-wars submission) |
1618

1719
## What's Missing
1820

1921
### P2P Tests
20-
- [x] **DONE 2026-04-04**: Property-based tests added (`tests/property/property_test.mjs`, 10 properties, ~40+ assertions)
22+
- [ ] **REVOKED 2026-05**: prior "DONE 2026-04-04 property tests" entry was
23+
false — `tests/property/property_test.mjs` was never committed.
24+
Aspect test now catches this drift class automatically.
2125
- [ ] No tests for Idris2 ABI type checking with Zig FFI
2226
- [ ] No tests for ReScript parser feeding into Idris2 type checker
2327

2428
### E2E Tests
25-
- [ ] e2e-smoke exists but only 43 assertions for a type system with 10 safety levels
26-
- [ ] No WASM module compilation and execution test
27-
- [ ] No multi-module linking test (MultiModule.idr untested)
29+
- [x] **DONE 2026-05**: `tests/e2e/e2e-driver.mjs` exercises every
30+
example through parse + check with skip/expect-clean/expect-diagnostic
31+
pragmas. Smoke test still narrow (40 assertions) but now augmented
32+
by the per-level suite (56 more) and the aspect test (49 more).
33+
- [ ] No WASM module compilation and execution test (blocked on codegen)
34+
- [ ] No multi-module linking test (MultiModule.idr untested at runtime)
2835

2936
### Aspect Tests
30-
- [ ] **Security**: No memory safety violation detection tests (this IS the product's purpose)
31-
- [ ] **Performance**: No benchmarks for type checking overhead vs raw WASM
37+
- [x] **DONE 2026-05**: `tests/aspect/claim-envelope.mjs` — 49 checks that
38+
cross-document claims (README/ROADMAP/LEVEL-STATUS/EXPLAINME) stay
39+
consistent with actual artefacts (ipkg, Rust constants, CI pins,
40+
example corpus, RSR surface). Built in response to a deep audit
41+
finding five drifts the test now catches.
42+
- [ ] **Security**: No memory safety violation detection tests (this IS the
43+
product's purpose)
44+
- [ ] **Performance**: see Benchmarks below
3245
- [ ] **Concurrency**: No concurrent WASM module compilation tests
33-
- [ ] **Error handling**: No tests for invalid type annotations, malformed WASM
46+
- [ ] **Error handling**: 10/10 per-level test suites (`tests/levels/L*.mjs`)
47+
include negative cases — partial coverage
3448

3549
### Build & Execution
3650
- [ ] 11 Idris2 modules with 0 Idris2-level tests -- are proofs checked?
51+
(PROOF-NEEDS.md 2026-05-18 reconciliation: ipkg builds clean, but
52+
no Idris2 *test* layer beyond compile-time totality / type-checking)
3753
- [ ] Zig FFI integration_test.zig likely a template placeholder
3854

39-
### Benchmarks Needed (CRITICAL)
40-
- [ ] Type checking overhead per WASM instruction
41-
- [ ] Memory region tracking performance
42-
- [ ] Lifetime analysis scaling with module size
55+
### Benchmarks
56+
- [x] **DONE 2026-05**: `benchmarks/parser-bench.mjs` — per-example parse +
57+
check wallclock with median / p95 / min / throughput and JSON summary
58+
for trend tracking. Only the parser is end-to-end today, so that's
59+
where benchmark evidence has to start.
60+
- [ ] Type-checking overhead per WASM instruction (blocked on codegen +
61+
Zig FFI runtime path)
62+
- [ ] Memory region tracking performance (blocked on codegen)
63+
- [ ] Lifetime analysis scaling with module size (blocked on codegen)
4364
- [ ] Comparison: typed-wasm overhead vs raw WASM execution
65+
(blocked on codegen)
4466

4567
### Self-Tests
4668
- [ ] No type system self-consistency check

0 commit comments

Comments
 (0)