Skip to content

Releases

v0.25.0 — Box Contract v24: init Framework Templates, tts-box dev & HTTP SSE Streaming (Pre-1.0)

Choose a tag to compare

@robertguss robertguss released this 28 Nov 17:25
2b512ba

Pre-1.0 Release — Slice 25 (Engine Contract v20 preserved & Box Contract v24)

Highlights

  • 6-file verified web-framework scaffolding (tts-box init <dir> --template=hono|express, #89): Scaffolds policy.ts, policy.test.ts, manifest.json, box/adapter.mjs, box/app/{routes,server}.ts, and README.md directly from the verified examples/hono-api/ and examples/express-app/ reference apps while preserving byte-identical 4-file output for basic, webhook, and mcp.
  • Checked watch-reload development supervisor (tts-box dev, #89): Watches manifest, actor .ts graphs, and Linux box sources; runs tts check before initial start and every edit reload (keeping the previous live server running on errors), preserves --db SQLite WAL state across reloads, and performs Linux box adapter.mjs / app/** fast-sync via audit --offline + atomic staging + .stamp recomputation without re-running npm ci (683.1 ms p50 actor reload / 402.1 ms p50 box app/*.ts fast-sync).
  • WHATWG HTTP Server-Sent Events streaming (sse & streamBox, #88):
    • Declarative actor SSE replies ({ status, headers?, sse: [...] }) and live sandboxed box streaming relay ({ status, headers?, streamBox: { box, fn, args } }) supporting both async function* generators and Web Response(ReadableStream, { headers: { "content-type": "text/event-stream" } }) over bounded NDJSON pipes under Landlock + seccomp net: false.
    • Measured 0.849 ms first-byte p50 (54,167 events/s) for declarative actor SSE and 0.969 ms first-byte p50 (55,750 events/s) for live sandboxed box streamBox SSE (100 events/stream).
    • Expanded read-only GET /metrics from 26 to 28 typed Prometheus metric families (tts_box_sse_streams_active, tts_box_sse_events_total).

Verification & Guardrails

  • Commit: 2b512ba4abe38ded99ab1fd996d3d77a14d110fe
  • External Conformance: trusted-ts-checks@82386d3c3b2f35e5c8217c314ec7845a5db53097 slices/25/conformance.mjs — 48 / 48 PASS (negative control on v0.24.0: 45 / 48, failing only 4c, 6v, 6w)
  • Architecture & Coverage: 49,002 / 50,500 core token-lines (1,498 headroom, tts <= 15,000, 0 .config/architecture.toml cap edits, 0 cargo atlas violations), 91.83% workspace line coverage, deslop-please: ok (0 new allowlist entries)
  • Invariants & Formal Proofs: 41 VM opcodes (0 new opcodes/builtins, 0 new Cargo dependencies, 0 .rs edits in crates/), Verus 143 verified, Lean 4 0 sorryAx, Kani 18 / 18, @tsmodel 6 / 6 (0 stale anchors)
  • Full benchmark & verification report: docs/benchmarks-v0.25.0.md

v0.24.0 — Slice 24: Durable Caps.kv WAL Stores & Edge-Isolated Caps.crypto (Pre-1.0)

Choose a tag to compare

@robertguss robertguss released this 28 Nov 14:07
a49781b

Highlights (Pre-1.0)

Engine Contract v20 (contract/contract.md) & Box Contract v23 (contract/boxes.md) — 41 VM opcodes preserved, 0 new Builtin variants, 0 new Cargo dependencies, 0 .config/architecture.toml cap edits, and 0 crates/tts-engine/src/runtime/ edits.

  • Engine Contract v20 (#85): Added typed Caps.kv and Caps.crypto capability operations with from: "kv" / from: "crypto" answer envelopes, byte-for-byte contract/node-driver.mjs differential parity, compile-time exit-2 refusals on unknown/missing fields, __label crossing taint enforcement against kv[].allowLabels & crypto[].allowLabels, tts sim continuation driving, KV & Crypto columns in tts prove --cert, and tts-prove-cache-v10.
  • Box Contract v23 (#86):
    • Durable WAL-Backed KV (kv[], wal_kv): Top-level kv[] (0..=64 stores with maxKeys, maxValueBytes, maxTotalBytes, allowLabels) + per-process/pool kv: [...] grants, atomic SQLite wal_kv table (get/put/delete/list, UTF-8 byte accounting, lexicographic prefix scanning, SIGKILL persistence, wal backup/compact/verify/replay support) and matching in-memory BTreeMap fallback without --db.
    • Edge-Isolated Crypto (crypto[]): Top-level crypto[] (0..=64 hmac-sha256 grants with env + optional distinct prevEnv rotation, allowLabels) + per-process/pool crypto: [...] grants, pure sha256 & ctEqual, hmacSign & constant-time non-short-circuiting dual-secret hmacVerify (hex/base64) backed by tts_kernel::crypto, with all secret env vars scrubbed from tts run & box children and redacted from Debug, doctor, and JSON logs.
    • 26-Family Prometheus /metrics: Added tts_box_kv_ops_total (counter), tts_box_kv_bytes (gauge), and tts_box_crypto_ops_total (counter).

Verification & Benchmarks (a49781bd)

  • External Conformance (trusted-ts-checks@29ecdde9): slices/24/conformance.mjs 45/45 PASS (negative control on v0.23.0: 42/45, exit 1, failing only 2m, 6t, 6u).
  • Workspace Line Coverage: 91.91% lines (91.53% functions, 89.26% regions; --fail-under-lines 90 gate).
  • Architecture & Lint: cargo atlas 48,690 / 50,500 core token-lines (1,810 headroom, 0 violations), deslop-please --allow .deslop-please.allow: ok.
  • Formal Proofs: Verus 143 verified (0 errors), Lean 4 0 sorryAx, Kani 18/18 preserved, @tsmodel 6/6.
  • Measured Benchmarks: See docs/benchmarks-v0.24.0.md (0.294 ms p50 in-memory kv.put / 2,761 req/s, 0.275 ms p50 dual-secret prevEnv hmacVerify, 8.262 ms p50 synchronous=FULL SQLite wal_kv put).

v0.23.0 — Slice 23: Architecture Slimming, tts-kernel::crypto, Kani 18/18 & v0.22.0 Red-Team Hardening

Choose a tag to compare

@robertguss robertguss released this 28 Nov 12:44
c0c3491

Pre-1.0 Pre-Release — Slice 23: Architecture Slimming, tts-kernel::crypto, Kani 18/18 & v0.22.0 Differential/Red-Team Hardening

trusted-ts v0.23.0 is a pure hardening, formal-verification, and architecture-slimming release preserving Engine Contract v19 and Box Contract v22 unchanged (41 VM opcodes, 0 new Cargo dependencies, 0 .config/architecture.toml cap edits, 0 crates/tts-engine/src/runtime/ edits).

Highlights & Merged PRs

  • Workspace-wide Architecture Slimming (#82, #83):
    • Reclaimed -2,355 core token-lines (50,086 → 47,731 / 50,500, 2,769 headroom): tts-engine 18,584 / 19,500 (-902), tts-prove 8,839 / 9,500 (-466), tts-kernel + tts -987 net even after adding crypto.rs and 3 new Kani harnesses.
  • Shared Zero-Dependency tts_kernel::crypto (#83):
    • Lifted pure-Rust sha256_pair, sha256_hex, hmac_sha256, ct_eq, encode_base64, decode_base64_strict, decode_hex_32, and decode_base64_32 into crates/tts-kernel/src/crypto.rs (#[cfg(not(verus_keep_ghost))]), deduplicating src/bin/tts-box/{listen/auth.rs, listen/http_resp.rs, pkg/install.rs}.
  • Kani Formal Verification 15/15 → 18/18 (#83):
    • Added kani_regex_nfa_compile_bounded_and_valid, kani_crypto_sha256_hmac_ct_eq_properties, and kani_base64_strict_roundtrip, verifying 18/18 harnesses with zero failures.
  • v0.22.0 Differential Fuzzing, Red-Team Suite & Doc Sync (#84):
    • Added tests/slice23_v022_fuzz_and_redteam.rs (5/5 passing in 1.19s): 180 seeded differential RegExp & URI/Base64 turns vs contract/node-driver.mjs, 5 exponential ReDoS patterns up to N = 120, adversarial binary HTTP (parse: "base64", bodyBase64, non-canonical padding, conflicts, CRLF Set-Cookie injection, 413), 10 <source>/app/** traversal/symlink/dotfile/node_modules/limit refusals + post-install .stamp tamper checks, and NIST/RFC crypto vectors.
    • Published docs/benchmarks-v0.23.0.md and aligned CLAUDE.md, README.md, SECURITY.md, docs/security-model.md, and docs/hands-on-testing.md.

Verification Scorecard (c0c34919)

  • External Conformance (trusted-ts-checks@667a5622, slices/22/conformance.mjs): 42 / 42 PASS
  • Workspace Line Coverage (cargo llvm-cov): 91.98% lines (91.59% functions, 89.40% regions; gate >= 90%)
  • Architecture & Structural Lint: cargo atlas policy & stages 0 violations (47,731 / 50,500, 2,769 headroom); deslop-please --allow .deslop-please.allow ok
  • Formal Verification: Verus 143 verified (0 errors) · Lean 4 0 sorryAx · Kani 18 / 18 harnesses · @tsmodel 6 / 6 specs (0 stale anchors)

v0.22.0 — Slice 22: Engine Contract v19 & Box Contract v22 (Popular TS Web Frameworks in tts-box)

Choose a tag to compare

@robertguss robertguss released this 28 Nov 01:02
37ed1e3

Pre-1.0 Pre-Release — Slice 22: Engine Contract v19 & Box Contract v22 (Popular TS Web Frameworks in tts-box)

trusted-ts v0.22.0 adds zero-dependency web encoding built-ins and linear-time, ReDoS-proof RegExp to tts (Engine Contract v19) and multi-dependency boxes, local <source>/app/** TypeScript/ESM source trees, binary HTTP (parse: "base64" + bodyBase64), preserved repeated response headers (Set-Cookie), and two sandboxed web-framework reference services (examples/hono-api/ and examples/express-app/) to tts-box (Box Contract v22) — while keeping 41 VM opcodes, 0 new Cargo dependencies, 0 .config/architecture.toml cap increases, and 0 runtime/ edits.

Highlights & Merged PRs

  • Engine Contract v19 (#79):
    • Added 8 Builtin variants (argc <= 2, 41 VM opcodes preserved): encodeURIComponent, decodeURIComponent, btoa, atob, and pure-Rust Thompson NFA / PikeVM RegExp (.test, .match, .replace, .split).
    • Exact ECMA-262 UTF-16 URI encoding/decoding and WHATWG Latin-1 Base64 with byte-for-byte Node 24 parity and catchable End::Error on invalid inputs.
    • Linear-time O(|pattern| * |input|) Thompson NFA (<= 256 UTF-16 code units, <= 256 states) with /pattern/flags literals, top-level/imported & local const regex folding, i/g/m/s flags (g refused on .test() at compile time), up to 9 capture groups, compile-time refusal of backtracking/unsupported features (lookarounds, backreferences, named captures, octal escapes, \p{...}, new RegExp(...), escaping regex values), __label taint propagation, Z3 symbolic semantics, and proof cache tts-prove-cache-v9.
  • Box Contract v22 (#80):
    • Multi-dependency boxes (1..=64 lockfile-pinned deps when adapter.mjs is present; exact-1 preserved without adapter.mjs), multi-spec tts-box add <source> <spec1> [<spec2> ...], and <source>/app/** regular non-symlink .ts/.mts/.js/.mjs/.json trees (1..=64 files, max depth 8, max 4 MiB) validated by audit, copied by install, and bound into canonical .stamp digests.
    • Binary HTTP fidelity: listen[].parse: "base64" / listen[].routes[].parse: "base64", actor reply bodyBase64 (502 Bad Gateway on malformed or conflicting body + bodyBase64), and preserved repeated response headers (e.g., multiple Set-Cookie).
    • Two sandboxed reference services (examples/hono-api/ Fetch bridge & examples/express-app/ Node stream bridge) plus live Shai-Hulud compromised-middleware confinement tests (tests/slice22_frameworks_and_box_v22.rs), locally smoke-verified with real npm hono+zod (2 pkgs) and express (65 transitive pkgs) inside Landlock v6 + 64-bit seccomp (net: false, zero sockets).
  • Contract Sync, Architecture Budget, Benchmarks & CI (#81, trusted-ts-checks #44 & #45 @ 667a5622):
    • Verbatim sync of contract/contract.md (v19) and contract/boxes.md (v22).
    • Unified regex NFA compiler into crates/tts-kernel/src/regex_nfa.rs keeping every crate strictly under .config/architecture.toml caps (50,086 / 50,500 core token-lines, 414 headroom).
    • Full reproducible benchmarks in docs/benchmarks-v0.22.0.md.

Measured Benchmark Highlights (--release --locked)

Workload tts / tts-box v0.22.0 Reference / Notes
ReDoS /^(a+)+$/ (N = 26) 0.098 ms 2,955.27 ms Node V8 (30,194× faster)
ReDoS /^(a+)+$/ (N = 28) 0.157 ms 11,911.43 ms Node V8 (75,945× faster)
ReDoS /^(a+)+$/ (N = 100) 0.093 ms Linear O(N) PikeVM immunity
URI & Base64 (50× ops/turn) 0.078 ms p50 / 0.180 ms p99 3.5× tighter p99 than Node (0.627 ms), 100% parity
Linear RegExp (20× ops/turn) 0.399 ms p50 / 0.656 ms p99 10.2× tighter p99 than Node (6.713 ms), 100% parity
Sandboxed Hono Fetch Bridge (net: false) 0.395 ms p50 / 1,465.0 req/s 200 OK + 2× Set-Cookie, zero sockets in box
Sandboxed Express Stream Bridge (net: false) 0.302 ms p50 / 2,429.6 req/s 200 OK + 2× Set-Cookie, zero sockets in box
Binary 4 KiB HTTP (base64 + bodyBase64) 0.243 ms p50 / 3,067.2 req/s Exact 0x00..0xFF round-trip + 2× Set-Cookie

Verification Scorecard (37ed1e3d)

  • External Conformance (trusted-ts-checks@667a5622, slices/22/conformance.mjs): 42 / 42 PASS on v0.22.0 (negative control on v0.21.0: 39 / 42, exit 1, failing 2l, 6r, 6s).
  • Workspace Line Coverage (cargo llvm-cov): 91.53% lines (91.16% functions, 88.94% regions; gate >= 90%).
  • Architecture & Structural Lint: cargo atlas policy & stages 0 violations (50,086 / 50,500 core token-lines, 414 headroom); deslop-please --allow .deslop-please.allow ok.
  • Formal Verification: Verus 143 verified (0 errors) · Lean 4 0 sorryAx · Kani 15 / 15 harnesses · @tsmodel 6 / 6 specs (0 stale anchors).

v0.21.0 — Box Contract v21 (Per-Route Auth & Rate-Limit Overrides, Live SIGHUP CIDR Reload, Durable schedule[] Triggers & 23-Family /metrics)

Choose a tag to compare

@robertguss robertguss released this 27 Nov 15:24
ddd6bd8

Pre-1.0 release (0.21.0) — Slice 21: Box Contract v21 & Engine Contract v18 Preserved

What's New

  • Per-route auth & rateLimit overrides on listen[].routes[] (Box Contract v21 §5, §6.7, #72):
    • Optional "auth": null | <AuthObj> and "rateLimit": null | <RateLimitObj> overrides on "http" route entries (Inherit / Disabled / Override), enabling mixed-security single-port gateways (e.g., /webhooks hmac-sha256 + global rate limit, /api dual-secret bearer + per-IP rate limit, /public auth: null, rateLimit: null).
    • Anti-enumeration: enforces listener-level auth (401 Unauthorized) before 404 {"error":"not_found"} on unmatched paths without consuming rate-limit tokens or waking tts.
    • Scrubs route-level auth env/prevEnv secrets from tts run's environment with redacted Debug, doctor, and JSON logs.
  • Fail-closed SIGHUP live reload of listen[].allowCidrs & listen[].trustedProxies alongside TLS (Box Contract v21 §6.7, #72):
    • Re-reads <manifest> on SIGHUP across serve, host, and mcp (including plain HTTP/MCP/admin manifests without tls), staging active listeners' allowCidrs and trustedProxies together with any listen[].tls and http[].tls PEM files before mutating live state.
    • Atomically swaps TLS configs and per-listener CIDR policies (tts_box_reloads_total += 1, "reload" log, http_pool flush) on success; fails closed across all listeners and outbound origins on any invalid PEM/key, corrupt JSON, missing active listener, or invalid CIDR (tts_box_reload_failures_total += 1, "reload_error" log).
  • Manifest-declared durable recurring schedule[] triggers & headless tts-box serve (Box Contract v21 §5, §6.1, §6.2, §6.8, §6.9, #73):
    • Optional top-level schedule (0..=64 entries {"name":"<id>","to":"<process>","everyMs":50..=86400000,"startImmediately"?:bool}) delivering monotonic 1-based {"from":"schedule","name":"<name>","tick":<n>} envelopes single-flight to static processes targets.
    • Persists schedule:<name> -> max_tick in wal_meta atomically within SQLite WAL turn transactions so monotonic tick continuity survives SIGKILL, online limits.compactEvery, offline wal compact, wal backup, wal verify, and replay.
    • Enables headless tts-box serve worker daemons (listen: [] + non-empty schedule) with graceful SIGTERM/SIGINT drain.
  • 23-family Prometheus /metrics (tts_box_schedule_ticks_total) & "schedule_tick" JSON logs (Box Contract v21 §7.3, #73).
  • Reproducible --release --locked benchmarks, verbatim Box Contract v21 sync & CI gates (#74):
    • Synced contract/boxes.md (Box Contract v21) verbatim from trusted-ts-checks (dbc81df3dfc1b48e2cfffcce3b915c0753bed9e0, Engine Contract v18 preserved).
    • Measured benchmarks in docs/benchmarks-v0.21.0.md.

Verification Summary (ddd6bd82)

  • Guardrails: 41 VM opcodes preserved, 0 new Cargo dependencies, 0 .config/architecture.toml cap increases (49,854 / 50,500 core token-lines, 646 headroom, 0 policy/stage violations), 0 edits to crates/tts-engine/src/runtime/.
  • Quality & Coverage: cargo fmt, clippy -D warnings, cargo doc -D warnings, 302/302 workspace & doc tests, 91.07% workspace line coverage (--fail-under-lines 90).
  • Formal Proofs: Verus 143 (0 errors), Lean 4 0 sorryAx, Kani 15/15, @tsmodel 6/6 (167,600 states).
  • External Conformance (trusted-ts-checks @ dbc81df3, slices/21/conformance.mjs):
    • Positive (v0.21.0 --release --locked): 39 / 39 PASS (exit 0).
    • Negative control (v0.20.0 --release --locked): 36 / 39 (exit 1 — fails only 6o, 6p, 6q).

Pull Requests

  • robertguss/trusted-ts-checks#43 (dbc81df3) — Box Contract v21 & 39-check Slice 21 conformance
  • robertguss/trusted-ts#72 (06d2f579) — Per-route auth & rateLimit overrides + fail-closed SIGHUP CIDR reload
  • robertguss/trusted-ts#73 (77192fac) — Durable schedule[] triggers, headless serve, "schedule_tick" logs & 23-family /metrics
  • robertguss/trusted-ts#74 (ddd6bd82) — Verbatim Box Contract v21 sync, v0.21.0 bump, benchmarks, CI & docs

v0.20.0 — Slice 20: Engine Contract v18 (Set<string>, Labelled Loops, Stdlib) & Box Contract v20 (Routes, Trusted Proxies, Latency Histograms)

Choose a tag to compare

@robertguss robertguss released this 27 Nov 02:40
fc9c925

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?) (including export 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_reply on JSON replies, exact JS TypeError separation vs Map, crossing __label taint, Z3 SymVal::Set (cache v8), and Verus (143 verified) + Lean 4 (NanBox.lean Tag.set, 0 sorryAx) + Kani (15/15) proofs.
  • Labelled break <label> & continue <label>: Nested while, do…while, for (;;), and for…of loops in both synchronous functions and export async function handle across await and intervening finally blocks (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), and Number.MAX_VALUE / Number.MIN_VALUE with 0 divergences vs Node v24.20.0.

Box Contract v20 (#70)

  • Path-Prefix Routing (listen[].routes): Longest path-segment prefix dispatch on "http" listeners (/api matches /api, /api/, /api/v1, /api?q=1, never /apiv2), per-route parse: "text" | "json", optional top-level to fallback, and 0.063 ms p50 host-edge 404 {"error":"not_found"} fast-reject without waking any actor.
  • Spoof-Proof Reverse-Proxy Client IP Resolution (listen[].trustedProxies): Right-to-left X-Forwarded-For walk stopping at the first untrusted hop (ignored completely when TCP peer is outside trustedProxies), evaluated at header completion before maxBodyBytes (413) to feed allowCidrs (403 ip_denied) and per-IP rateLimit.
  • 22-Family GET /metrics with Latency Histogram: Added zero-allocation 11-bucket tts_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 (0 warnings under rustfmt, clippy -D warnings, RUSTDOCFLAGS=-D warnings)
  • cargo llvm-cov --workspace --summary-only --fail-under-lines 90: 90.84% lines / 89.73% regions / 89.31% functions
  • cargo atlas policy & stages: 0 violations (49,360 / 50,500 core token-lines, 1,140 headroom)
  • Formal proofs: Verus 143, Lean 4 0 sorryAx, Kani 15/15, @tsmodel 6/6
  • External black-box conformance (trusted-ts-checks @ 95213fbaf6c36a0855416f5df35718e37a6207e8, slices/20/conformance.mjs): 36/36 PASS on v0.20.0 (33/36 exit 1 negative control on v0.19.0)
  • Reproducible benchmarks: docs/benchmarks-v0.20.0.md

v0.19.0 — Slice 19: Pre-1.0 Hardening, 90.92% Coverage, Differential Fuzzing, SIGKILL WAL Soak & 3 Reference Services

Choose a tag to compare

@robertguss robertguss released this 26 Nov 23:16
b908429

Highlights (Pre-1.0 Hardening Release)

v0.19.0 battle-tests the entire v0.10.0–v0.18.0 stack end-to-end with zero breaking contract or schema changes (Engine Contract v17, Box Contract v19, 41 VM opcodes, 0 new Cargo dependencies, and 0 .config/architecture.toml budget increases):

  • Core Architecture Slimming (49,141 → 48,076 / 50,500, -1,065 core token-lines reclaimed, 2,424 headroom) (#66): Behavior-preserving deduplication across tts-engine (-331), tts-prove (-296), and tts (-438), pulling domain.rs (1,054), loop_inv.rs (1,081), and sim/manifest_spec.rs (943) comfortably below concentration caps with zero edits to crates/tts-engine/src/runtime/ (@tsmodel 6/6 lock hashes preserved).
  • Two Real Security & Concurrency Edge-Case Fixes (#66):
    1. Captured outbound tls_gen synchronously at dispatch time so http[].retry across a SIGHUP TLS reload never inserts a pre-reload TLS socket into the post-reload keepAlive pool.
    2. Evaluated listen[].allowCidrs immediately at header completion (skip_body), returning 403 {"error":"ip_denied"} before maxBodyBytes (413) and suppressing CORS headers on error responses to CIDR-denied peers while preserving TLS HSTS.
  • Differential VM Fuzzing, SIGKILL WAL Compaction Soak & Edge Chaos (#67):
    • Deterministic seeded sync + async CPS differential fuzzing vs Node v24.20.0 across --fuel=200/500/1000 (13,341.8–14,720.5 ops/s, 0 divergences) plus Z3 tts prove soundness checks.
    • Multi-cycle SIGKILL crash-recovery soak under --db + snapshotEvery: 5, compactEvery: 10 (1.790 ms p50 durable turn, 7.846 ms p50 post-SIGKILL recovery, 0 lost 200 OK writes, wal verify --json + replay exact parity).
    • Malformed HTTP/1.1 wire chaos and outbound mTLS keepAlive + retry + circuitBreaker + SIGHUP live cert-rotation soak.
  • Workspace Line Coverage Raised to 90.92% & CI Gate Raised 85% → 90% (#67, #68): cargo llvm-cov --workspace --summary-only --fail-under-lines 90 passes at 90.92% lines (33,918 / 37,305), 89.88% regions, 89.29% functions.
  • Three Cross-Platform (boxes: []) Production Reference Services (#68):
    • examples/payments-webhook/ — durable HMAC-SHA256 (prevEnv) Stripe-style webhook service with async try/catch/finally, Map dedupe, pci taint sanitization, outbound keepAlive+retry+circuitBreaker, and limits.compactEvery.
    • examples/tenant-mcp-hub/ — multi-tenant Streamable HTTP MCP 2025-03-26 hub routing to on-demand tenant:* pools with proven tenant_raw crossing taint sanitization, bearer+prevEnv, allowCidrs, and per-IP rateLimit.
    • examples/edge-tls-gateway/ — symmetric mTLS gateway (listen[].tls.clientCa + http[].tls + live SIGHUP rotation), HSTS, CORS, W3C traceparent + X-Request-Id, and /readyz graceful SIGTERM drain.

Verification Summary

  • cargo test --workspace & --doc: 285/285 PASS (0 warnings under rustfmt, clippy -D warnings, RUSTDOCFLAGS=-D warnings)
  • cargo llvm-cov --workspace --summary-only --fail-under-lines 90: 90.92% lines / 89.88% regions / 89.29% functions
  • cargo atlas policy & stages: 0 violations (48,076 / 50,500 core token-lines, 2,424 headroom)
  • Formal proofs: Verus 141 (0 errors), Lean 4 0 sorryAx, Kani 14/14, @tsmodel 6/6
  • External black-box conformance (trusted-ts-checks @ 44cecc46548fad9232d9ec30f51ba373770a4461, slices/19/conformance.mjs): 33/33 PASS
  • Reproducible hardening benchmarks: docs/benchmarks-v0.19.0.md

trusted-ts v0.18.0 (Slice 18 — Pre-1.0)

Choose a tag to compare

@robertguss robertguss released this 26 Nov 17:36
c387dee

Highlights — Slice 18 (v0.18.0, Pre-1.0)

  • Engine Contract v17 (41 VM opcodes — 0 new):
    • do { … } while (cond);: Full support for break, continue, try/catch/finally, await caps.<op>(…) in export async function handle (12.66 µs / wf — 3.71x faster than Node 24), and Z3 tts prove.
    • Hex (0x), binary (0b), octal (0o) & _-separated numeric literals across expressions, top-level const, start, and literal types (legacy octal 010 and BigInt 1n remain refused).
    • 11 compile-time Math.* & Number.* constants: Math.{PI,E,LN2,LN10,SQRT2} and Number.{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), and Math.clz32(x) with byte-for-byte Node 24 parity, Lean 4 stack-safety mirror (0 sorryAx), and Z3 tts prove support (tts-prove-cache-v7).
  • Box Contract v19 (0 new dependencies, 0 architecture cap bumps):
    • Outbound http[].circuitBreaker: Completes the keepAlive + retry + circuitBreaker resilience triad. Per-origin Closed → Open → Half-Open state machine evaluated at the logical call boundary after any retry, fast-failing open calls with {"from":"http","tag":<tag>,"error":"circuit_open"} at 0.189 ms p50 (3,826 req/s, 547.3x faster than a 100ms degraded upstream, 0 upstream hits).
    • Bounded per-IP listen[].rateLimit: Optional key: "global" | "ip" and maxKeys: 16..=65536 isolating token buckets by kernel-verified peer IpAddr with deterministic oldest-idle eviction (+4.4 µs p50 overhead, 0.076 ms p50 / 9,303.6 req/s 429 shedding).
    • Host-edge listen[].allowCidrs: IPv4/IPv6 CIDR allowlist (1..=64 entries) across "http", "mcp", and "admin" listeners rejecting disallowed peers BEFORE CORS/auth/rateLimit with 403 Forbidden {"error":"ip_denied"} at 0.246 ms p50 (3,454.1 req/s, 0 actor turns).
    • 21-metric GET /metrics: Adds tts_box_http_outbound_circuit_open_total (counter), tts_box_http_outbound_circuits_open (gauge), and tts_box_http_ip_denied_total (counter), plus "circuit_open", "circuit_closed", and "ip_denied" JSON log events.

Verification

  • External black-box conformance (trusted-ts-checks 4230ef2e slices/18/conformance.mjs):
    • Positive control (v0.18.0 @ c387deed): 31/31 PASS (exit 0)
    • Negative control (v0.17.0 @ 57cf21d6): 28/31 (exit 1) — only 2i, 6j, 6k fail
  • 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 (100 engine + 30 host seeds)
  • Formal Proofs & Architecture: Verus (141 verified, 0 errors), Lean 4 (0 sorryAx), Kani (14/14), @tsmodel (6/6), cargo atlas (0 violations, 49,141 / 50,500 core token-lines, 1,359 headroom)
  • 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 conformance
  • trusted-ts#63 (a595eaf) — PR 18.1: Engine Contract v17 + Lean 4 mirror + Z3 domain
  • trusted-ts#64 (4c9c51b) — PR 18.2: Box Contract v19 (http[].circuitBreaker, per-IP rateLimit, allowCidrs, 21 /metrics)
  • trusted-ts#65 (c387dee) — PR 18.3: Release v0.18.0, benchmarks, contract sync, CI & docs

trusted-ts v0.17.0 (Slice 17 — Pre-1.0)

Choose a tag to compare

@robertguss robertguss released this 26 Nov 14:53
57cf21d

Highlights — Slice 17 (v0.17.0, Pre-1.0)

  • Architecture Budget Slimming (0 cap increases): Reclaimed 1,033+ token-lines across tts-engine and tts-prove via behavior-preserving deduplication before adding Box v18, landing at 48,202 / 50,500 core token-lines (-305 net below v0.16.0, 2,298 headroom) with .config/architecture.toml untouched and 0 new Cargo dependencies.
  • Engine Contract v16 (41 VM opcodes — 0 new):
    • try/catch/finally across await in export async function handle: lifts the §2.2/§2.7 restriction so await caps.<op>(…) works inside try, catch, and finally blocks (preserving active exception handlers, catch bindings, and finally completion state across suspension/resumption while keeping memory, stack, unsupported, and fuel preemption non-catchable) — 70.18 µs / workflow (1.35x faster than Node 24).
    • Stdlib completions: a.fill(value, start?, end?), Object.assign(target, source), Math.pow(a, b), and Math.imul(a, b) with byte-for-byte Node 24 parity, Lean 4 stack-safety mirror (0 sorryAx), and Z3 tts prove support (tts-prove-cache-v6).
  • Box Contract v18 (0 new dependencies):
    • Idempotent outbound http[].retry: bounded exponential backoff (maxAttempts: 2..=5, initialBackoffMs, maxBackoffMs, retryStatuses) strictly for idempotent methods (GET/HEAD/PUT/DELETE; POST/PATCH never retried), bounded within effective call deadline (http[].timeoutMs / limits.deadline).
    • Online non-blocking WAL auto-compaction (limits.compactEvery): 10..=1_000_000 under --db=<file>, snapshotting idle JSON-snapshottable actors, pruning superseded wal_turns outside open pending workflows and older wal_snapshots, running PRAGMA wal_checkpoint(PASSIVE), and emitting "event":"wal_compact" JSON logs (4.12x smaller WAL at 200 turns, 5.34x smaller & 14.32x faster wal verify at 1,000 turns).
    • TLS-only edge HSTS (listen[].hsts): emits Strict-Transport-Security: max-age=<n>[; includeSubDomains] on every HTTPS response across "http", "mcp", and "admin" listeners (refused without listen[].tls).
    • 18-metric GET /metrics: adds tts_box_http_outbound_retries_total (counter) and tts_box_wal_compactions_total (counter).

Verification

  • External black-box conformance (trusted-ts-checks d96d5709 slices/17/conformance.mjs):
    • Positive control (v0.17.0 @ 57cf21d6): 28/28 PASS (exit 0)
    • Negative control (v0.16.0 @ 4234d6e3): 25/28 (exit 1) — only 2h, 6h, 6i fail
  • Tests & Coverage: cargo test --workspace (261/261), cargo llvm-cov (87.60% line coverage), contract/smoke/run.mjs, contract/compare.mjs corpus (19/19), npm test (31/31)
  • Formal Proofs & Architecture: Verus (141 verified, 0 errors), Lean 4 (0 sorryAx), Kani (14/14), @tsmodel (6/6), cargo atlas (0 violations, 48,202 / 50,500 core token-lines)
  • Benchmarks: docs/benchmarks-v0.17.0.md

Merged PRs

  • trusted-ts-checks#39 (d96d570) — PR 17.0: Engine Contract v16, Box Contract v18, and Slice 17 conformance
  • trusted-ts#60 (a6a25dd) — PR 17.1: Codebase slimming + Engine Contract v16 + Lean 4 + Z3
  • trusted-ts#61 (0e7603a) — PR 17.2: Box Contract v18 (http[].retry, limits.compactEvery, listen[].hsts, 18 /metrics)
  • trusted-ts#62 (57cf21d) — PR 17.3: Release v0.17.0, benchmarks, contract sync, CI & docs

v0.16.0 (Pre-1.0 — Slice 16: Interface Extends, Rest Destructuring, Map Iteration, Outbound Keep-Alive Pooling, Dual-Secret Auth & W3C Traceparent)

Choose a tag to compare

@robertguss robertguss released this 26 Nov 02:09
4234d6e

Highlights (Pre-1.0 — Engine Contract v15 & Box Contract v17)

  • Engine Contract v15 (41 VM opcodes preserved, 0 new opcodes, 0 new Cargo dependencies):
    • interface B extends A, C: Compile-time structural flattening across local and imported .ts modules (covering MessageType, Caps, tts-box mcp JSON Schema, and __label taint brands; refusing cycles, non-interface parents, generic parents, and duplicate keys).
    • Array & Object Rest Destructuring: Trailing [head, ...tail] = arr and { a, ...rest } = obj across const/let and for..of bindings with prototype-free ES2024 key order and __label taint propagation.
    • Map Ergonomics: m.clear() plus for..of and array spread ([...m.keys()], [...m.values()], [...m.entries()]) over live insertion order while keeping standalone iterator escapes refused.
    • ES2023 a.with(index, value) & Math.sqrt / Math.sign: Immutable indexed replacement with negative indices & catchable out-of-range RangeError, plus IEEE-754 -0/NaN preserving math.
    • Z3 & Formal Proofs: Compact linear SMT models (tts-prove-cache-v5), Lean 4 mirror (0 sorryAx), Verus 141, Kani 14/14, and tsmodel 6/6.
  • Box Contract v17 (0 new Cargo dependencies):
    • Outbound http[].keepAlive Connection Pooling: Per-origin persistent HTTP/1.1 TCP & rustls TLS/mTLS connection reuse (3.65x lower p50 mTLS latency: 1.775 ms cold → 0.487 ms warm; 3.42x custom-CA throughput at 2,057 req/s), one-shot stale-socket retry on idempotent methods, and atomic pool flush on SIGHUP TLS reload.
    • Dual-Secret listen[].auth.prevEnv Rotation: Constant-time non-short-circuiting verification (0.001 ms p50 delta between env and prevEnv) on bearer & HMAC-SHA256 listeners, child env scrubbing, and tts-box doctor validation.
    • W3C traceparent & Per-Listener listen[].maxBodyBytes: Strict v00 traceparent validation, --log-format=json logging, and automatic outbound { http: … } propagation (+12 µs overhead); per-listener 413 enforcement on Content-Length and chunked requests before JSON parsing or actor dispatch.
    • 16-Metric GET /metrics: Added tts_box_http_outbound_pool_reuses_total (counter) and tts_box_wal_bytes (gauge).

Verification Summary

  • PRs: trusted-ts-checks#37, trusted-ts-checks#38, #57, #58, #59
  • External Black-Box Conformance (slices/16/conformance.mjs): 25/25 PASS on v0.16.0 (4234d6e); negative control 22/25 (exit 1, failing only Slice 16 checks 2g, 6f, 6g) on v0.15.0 (f400ba4).
  • Tests & Coverage: 254 workspace + doc tests PASS, 87.40% line coverage (cargo llvm-cov), 19/19 corpus parity, 31/31 npm test, 100/100 engine & 30/30 host sim.
  • Formal Proofs & Architecture: Verus 141 verified, 0 errors, Lean 4 0 sorryAx, Kani 14/14, tsmodel 6/6, cargo atlas 0 violations (48,507 / 50,500 core token-lines, 0 cap increases).
  • Benchmarks: Full reproducible --release --locked numbers in docs/benchmarks-v0.16.0.md.