Skip to content

witness v0.3.0: faster journal, oracles, fleet mode, exec recording

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Sep 12:22
· 1 commit to main since this release

Four features, built in parallel and merged the same session.

Journal group commit (#9). Appends now flow through a single writer thread that fuses concurrent submissions into one write and one flush per batch (up to 256 records). Measured on the same machine as the README numbers: recording ceiling up from ~37k to ~53k calls/sec, p99 at c=20 down from 1.4 ms to 0.58 ms, added p50 about 0.22 ms. The writer also re-syncs the chain tip per batch, closing a stale-tip hazard when a second process (witness attest, witness mcp) appends to a journal a proxy is serving from.

Verifier oracles (#3). witness attest --seq N --oracle '<shell command>' runs any command as a judge over a recorded response (body on stdin, exit 0 = verified). A verified response becomes unconditionally cacheable regardless of sampling parameters, and the attestation itself is journaled with the exact command, so an auditor sees who vouched for what. witness attested lists them.

Fleet mode v1 (part of #1). witness serve --peer <url> --peer-token <secret>: on a local cache miss for a reusable request, siblings are asked before the upstream, with a 300 ms budget per peer. Peer bodies are verified against their advertised content hash, so a peer can serve you bytes but cannot poison you. Peer hits journal locally as cache="peer" and show up in metrics. Scope is honest: no consistent hashing, journals stay per-instance, attestations do not travel.

Exec recording (Layer 3). witness run -- <command> fingerprints the working directory before and after, tees output live, and journals the diff (added, modified, deleted, with hashes) plus stdout, stderr and exit code. witness diff --seq N pretty-prints it, and witness audit now follows exec records into their recorded output. Optional --docker <image> runs the command in a container.

88 tests. Binaries for Linux (x86_64, arm64) and macOS (arm64, x86_64) attached.