Repository navigation
trusted-ts v0.18.0 (Slice 18 — Pre-1.0)
Pre-release
Pre-release
Highlights — Slice 18 (v0.18.0, Pre-1.0)
- Engine Contract v17 (
41VM opcodes —0new):do { … } while (cond);: Full support forbreak,continue,try/catch/finally,await caps.<op>(…)inexport async function handle(12.66 µs / wf—3.71xfaster than Node 24), and Z3tts prove.- Hex (
0x), binary (0b), octal (0o) &_-separated numeric literals across expressions, top-levelconst,start, and literal types (legacy octal010andBigInt1nremain refused). - 11 compile-time
Math.*&Number.*constants:Math.{PI,E,LN2,LN10,SQRT2}andNumber.{MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,EPSILON,POSITIVE_INFINITY,NEGATIVE_INFINITY,NaN}. - 4 pure stdlib builtins:
Object.is(a, b),s.codePointAt(index),String.fromCodePoint(cp), andMath.clz32(x)with byte-for-byte Node 24 parity, Lean 4 stack-safety mirror (0 sorryAx), and Z3tts provesupport (tts-prove-cache-v7).
- Box Contract v19 (
0new dependencies,0architecture cap bumps):- Outbound
http[].circuitBreaker: Completes thekeepAlive+retry+circuitBreakerresilience triad. Per-origin Closed → Open → Half-Open state machine evaluated at the logical call boundary after anyretry, fast-failing open calls with{"from":"http","tag":<tag>,"error":"circuit_open"}at0.189 msp50(3,826 req/s,547.3xfaster than a 100ms degraded upstream,0upstream hits). - Bounded per-IP
listen[].rateLimit: Optionalkey: "global" | "ip"andmaxKeys: 16..=65536isolating token buckets by kernel-verified peerIpAddrwith deterministic oldest-idle eviction (+4.4 µsp50overhead,0.076 msp50/9,303.6 req/s429shedding). - Host-edge
listen[].allowCidrs: IPv4/IPv6 CIDR allowlist (1..=64entries) across"http","mcp", and"admin"listeners rejecting disallowed peers BEFORE CORS/auth/rateLimit with403 Forbidden{"error":"ip_denied"}at0.246 msp50(3,454.1 req/s,0actor turns). - 21-metric
GET /metrics: Addstts_box_http_outbound_circuit_open_total(counter),tts_box_http_outbound_circuits_open(gauge), andtts_box_http_ip_denied_total(counter), plus"circuit_open","circuit_closed", and"ip_denied"JSON log events.
- Outbound
Verification
- External black-box conformance (
trusted-ts-checks4230ef2eslices/18/conformance.mjs):- Positive control (
v0.18.0@c387deed):31/31PASS (exit 0) - Negative control (
v0.17.0@57cf21d6):28/31(exit 1) — only2i,6j,6kfail
- Positive control (
- Tests & Coverage:
cargo test --workspace(270/270),cargo llvm-cov(87.86%line coverage),contract/smoke/run.mjs,contract/compare.mjs corpus(19/19),npm test(31/31),sim/run.mjs(100engine +30host seeds) - Formal Proofs & Architecture: Verus (
141 verified, 0 errors), Lean 4 (0 sorryAx), Kani (14/14),@tsmodel(6/6),cargo atlas(0violations,49,141 / 50,500core token-lines,1,359headroom) - Benchmarks:
docs/benchmarks-v0.18.0.md
Merged PRs
trusted-ts-checks#40(4230ef2) — PR 18.0: Engine Contract v17, Box Contract v19, and Slice 18 conformancetrusted-ts#63(a595eaf) — PR 18.1: Engine Contract v17 + Lean 4 mirror + Z3 domaintrusted-ts#64(4c9c51b) — PR 18.2: Box Contract v19 (http[].circuitBreaker, per-IPrateLimit,allowCidrs, 21/metrics)trusted-ts#65(c387dee) — PR 18.3: Releasev0.18.0, benchmarks, contract sync, CI & docs