Repository navigation
v0.20.0 — Slice 20: Engine Contract v18 (Set<string>, Labelled Loops, Stdlib) & Box Contract v20 (Routes, Trusted Proxies, Latency Histograms)
Pre-release
Pre-release
Highlights (Pre-1.0 Release)
v0.20.0 delivers Engine Contract v18 and Box Contract v20 while preserving all standing guardrails (41 VM opcodes, 0 new Cargo dependencies, 0 .config/architecture.toml cap increases, >= 90% coverage, and 6/6 @tsmodel specs):
Engine Contract v18 (#69)
- Prototype-Free Insertion-Ordered
Set<string>(Tag::Set):new Set(iterable?)(includingexport const start),s.add(v),s.has(v),s.delete(v),s.clear(),s.size,for…of/[...s]/.values()/.keys()/.entries(), state persistence across turns,bad_replyon JSON replies, exact JSTypeErrorseparation vsMap, crossing__labeltaint, Z3SymVal::Set(cache v8), and Verus (143verified) + Lean 4 (NanBox.leanTag.set,0 sorryAx) + Kani (15/15) proofs. - Labelled
break <label>&continue <label>: Nestedwhile,do…while,for (;;), andfor…ofloops in both synchronous functions andexport async function handleacrossawaitand interveningfinallyblocks (refusing labels on non-loop statements). - ES2023/ES2024 Stdlib & Constants:
a.toSpliced(start, deleteCount?, item?),a.splice(start, deleteCount?, item?),s.isWellFormed(),s.toWellFormed(),Math.fround(x), andNumber.MAX_VALUE/Number.MIN_VALUEwith0divergences vs Nodev24.20.0.
Box Contract v20 (#70)
- Path-Prefix Routing (
listen[].routes): Longest path-segment prefix dispatch on"http"listeners (/apimatches/api,/api/,/api/v1,/api?q=1, never/apiv2), per-routeparse: "text" | "json", optional top-leveltofallback, and0.063 msp50 host-edge404 {"error":"not_found"}fast-reject without waking any actor. - Spoof-Proof Reverse-Proxy Client IP Resolution (
listen[].trustedProxies): Right-to-leftX-Forwarded-Forwalk stopping at the first untrusted hop (ignored completely when TCP peer is outsidetrustedProxies), evaluated at header completion beforemaxBodyBytes(413) to feedallowCidrs(403 ip_denied) and per-IPrateLimit. - 22-Family
GET /metricswith Latency Histogram: Added zero-allocation 11-buckettts_box_http_request_duration_seconds(0.005..5++Inf,_sum,_count) across"http","mcp", and"admin"listeners.
Verification Summary
cargo test --workspace&--doc: 294/294 PASS (0warnings underrustfmt,clippy -D warnings,RUSTDOCFLAGS=-D warnings)cargo llvm-cov --workspace --summary-only --fail-under-lines 90: 90.84% lines / 89.73% regions / 89.31% functionscargo atlas policy&stages: 0 violations (49,360 / 50,500core token-lines,1,140headroom)- Formal proofs: Verus
143, Lean 40 sorryAx, Kani15/15,@tsmodel6/6 - External black-box conformance (
trusted-ts-checks@95213fbaf6c36a0855416f5df35718e37a6207e8,slices/20/conformance.mjs):36/36PASS onv0.20.0(33/36exit1negative control onv0.19.0) - Reproducible benchmarks:
docs/benchmarks-v0.20.0.md