Repository navigation
v0.14.0
turnstile v0.14.0
This release adds tamper evidence to the journal and pins its detection boundary with a differential test matrix. Opting in chains every journal row with SHA-256 over canonical JSON, batches the chain into Merkle-rooted epochs, and publishes each epoch to independent anchor sinks so a rewritten journal can be distinguished from a real one — with opencode-turnstile prov --verify available offline anytime. Marker classification and chain verification picked up fixes along the way.
New: journal tamper evidence (#312)
- Per-record hash chain — with
tamperEvidence.enabled(defaultfalse; existing journals and consumers stay on the unchained row shape), every journal row carriesseq,prevHash, andhash(SHA-256 over RFC 8785-style canonical JSON of{prevHash, ts, payload}). - Merkle epochs — every
tamperEvidence.epochEntries(default 512) data rows, a chainedchain-epochcommit row carries the epoch's Merkle root and head. - Anchor sinks — epoch refs publish fire-and-forget at task completion to independent stores in escalating trust domains:
session-state(host, default),git-noteandcommit-trailer(repository), or an external{plugin: "..."}sink; an array publishes to all and verification reports the weakest vouching domain. - Verification —
opencode-turnstile prov --verifyfolds the chain across rotation generations, re-derives epoch roots, and cross-checks anchored refs (exit 0 intact, 1 broken/unanchored);tamperEvidence.verifyOnSessionEndruns the same check once per session at idle and journals/toasts the verdict. - Config surface (
tamperEvidence.enabled,.anchor,.epochEntries,.verifyOnSessionEnd) mirrored inexamples/turnstile.example.json, the schema, the README config table, anddocs/architecture.md§"Tamper evidence".
New: differential tamper-matrix harness (#312, #315)
- Integration harness (
tests/tamper-matrix.test.ts) builds a captured honest journal through the real write path — with a rotation generation and a task-completion anchor — and pins nine mutation classes to expectedprov --verifyverdicts: local edits/deletes/inserts/reorders/forks fail at the chain fold; rewrite-all with a recomputed chain and truncate-and-continue ("recurring cleaner") fail only at the anchor check; the un-anchored tail is a deliberately documented blind spot. - Behavior pins for the prov CLI env, the row-8 absent split, shared harness options, and exact fold reasons (#315).
Fixed
- Marker results are classified from the regex capture group (#310) — surrounding text no longer leaks into classification.
- Chain verify hardened against restart, rotation, and multi-host edge cases (#312): monotonic epoch indices across rotations and trust-root handling for pruned generations.
Docs
- Replay global re-slice inclusion and boot memory bounds documented (#302).
freshFlags()JSDoc covers counter fields (#304); waiver-unreachability test pin forwaiverStateNote(#303).- README compatibility matrix row updated to turnstile 0.14.x;
HOST_COMPATunchanged (floor stays OpenCode ≥ 2.0.22, < 3.0.0).
Install
npx opencode-turnstile@0.14.0 init