Repository navigation
v0.21.0 — Box Contract v21 (Per-Route Auth & Rate-Limit Overrides, Live SIGHUP CIDR Reload, Durable schedule[] Triggers & 23-Family /metrics)
Pre-release
Pre-release
Pre-1.0 release (0.21.0) — Slice 21: Box Contract v21 & Engine Contract v18 Preserved
What's New
- Per-route
auth&rateLimitoverrides onlisten[].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.,/webhookshmac-sha256+ global rate limit,/apidual-secretbearer+ per-IP rate limit,/publicauth: null, rateLimit: null). - Anti-enumeration: enforces listener-level
auth(401 Unauthorized) before404 {"error":"not_found"}on unmatched paths without consuming rate-limit tokens or wakingtts. - Scrubs route-level
authenv/prevEnvsecrets fromtts run's environment with redactedDebug,doctor, and JSON logs.
- Optional
- Fail-closed
SIGHUPlive reload oflisten[].allowCidrs&listen[].trustedProxiesalongside TLS (Box Contract v21 §6.7, #72):- Re-reads
<manifest>onSIGHUPacrossserve,host, andmcp(including plain HTTP/MCP/admin manifests withouttls), staging active listeners'allowCidrsandtrustedProxiestogether with anylisten[].tlsandhttp[].tlsPEM files before mutating live state. - Atomically swaps TLS configs and per-listener CIDR policies (
tts_box_reloads_total += 1,"reload"log,http_poolflush) 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).
- Re-reads
- Manifest-declared durable recurring
schedule[]triggers & headlesstts-box serve(Box Contract v21 §5, §6.1, §6.2, §6.8, §6.9, #73):- Optional top-level
schedule(0..=64entries{"name":"<id>","to":"<process>","everyMs":50..=86400000,"startImmediately"?:bool}) delivering monotonic 1-based{"from":"schedule","name":"<name>","tick":<n>}envelopes single-flight to staticprocessestargets. - Persists
schedule:<name> -> max_tickinwal_metaatomically within SQLite WAL turn transactions so monotonictickcontinuity survivesSIGKILL, onlinelimits.compactEvery, offlinewal compact,wal backup,wal verify, andreplay. - Enables headless
tts-box serveworker daemons (listen: []+ non-emptyschedule) with gracefulSIGTERM/SIGINTdrain.
- Optional top-level
- 23-family Prometheus
/metrics(tts_box_schedule_ticks_total) &"schedule_tick"JSON logs (Box Contract v21 §7.3, #73). - Reproducible
--release --lockedbenchmarks, verbatim Box Contract v21 sync & CI gates (#74):- Synced
contract/boxes.md(Box Contract v21) verbatim fromtrusted-ts-checks(dbc81df3dfc1b48e2cfffcce3b915c0753bed9e0, Engine Contract v18 preserved). - Measured benchmarks in
docs/benchmarks-v0.21.0.md.
- Synced
Verification Summary (ddd6bd82)
- Guardrails:
41VM opcodes preserved,0new Cargo dependencies,0.config/architecture.tomlcap increases (49,854 / 50,500core token-lines,646headroom,0policy/stage violations),0edits tocrates/tts-engine/src/runtime/. - Quality & Coverage:
cargo fmt,clippy -D warnings,cargo doc -D warnings,302/302workspace & doc tests,91.07%workspace line coverage (--fail-under-lines 90). - Formal Proofs: Verus
143(0errors), Lean 40 sorryAx, Kani15/15,@tsmodel6/6(167,600states). - External Conformance (
trusted-ts-checks@dbc81df3,slices/21/conformance.mjs):- Positive (
v0.21.0--release --locked):39 / 39PASS (exit0). - Negative control (
v0.20.0--release --locked):36 / 39(exit1— fails only6o,6p,6q).
- Positive (
Pull Requests
robertguss/trusted-ts-checks#43(dbc81df3) — Box Contract v21 & 39-check Slice 21 conformancerobertguss/trusted-ts#72(06d2f579) — Per-routeauth&rateLimitoverrides + fail-closedSIGHUPCIDR reloadrobertguss/trusted-ts#73(77192fac) — Durableschedule[]triggers, headlessserve,"schedule_tick"logs & 23-family/metricsrobertguss/trusted-ts#74(ddd6bd82) — Verbatim Box Contract v21 sync,v0.21.0bump, benchmarks, CI & docs