Repository navigation
RootSign v0.3.0 — evidence bundles, and a client that survives the network
RootSign v0.3.0 — evidence bundles, and a client that survives the network
Two things ship here. rootsign export turns a session into a directory a compliance officer can read — the artefact gap, not the capture gap, is what has kept RootSign filed as a developer tool inside partner organisations. And the cloud transport arrives ahead of the backend it talks to, with an offline spool that means an unreachable endpoint costs you nothing.
Additive release: a new cloud extra, new commands, no default changes. Existing installs need no migration and no code changes.
Highlights
📑 Evidence bundles (ADR-014)
$ rootsign export --local ~/.rootsign/sessions/f758a636-….jsonl
VALID — 2 records, chain intact
Bundle: ./evidence-f758a636-7bcd-4f96-8940-eff7d80e760a
redaction.json report.html report.md timeline.json verification.json manifest.json
manifest.json SHA-256: a1d61338d0f793ea03ac472863fadea5660e1e94846913ce7613d8c117d67cc5
Record that hash outside the bundle — a ticket, an email, a chain-of-custody log.
It is what proves a bundle you receive later is the one that was generated.Three JSON documents (verification, timeline, redaction) plus a manifest, with report.md and report.html rendered from that JSON and nothing else — so a fact absent from the machine truth cannot appear in the human rendering, and the Phase 2 dashboard starts from a schema that already exists. The HTML has no JavaScript and no external requests: it opens identically from a file share, an attachment, or an air-gapped review machine.
What makes it worth handing over is what it refuses to claim:
- Records after a chain break are
unverified, neververified— the verifier stopped there and proved nothing about them. - A hash-only session says "payload previews not retained for this session" in words rather than showing empty fields.
redaction.jsonreports the field paths carrying the[REDACTED]sentinel and explicitly does not claim which rule fired, because that is not recorded anywhere and never will be for records already captured.--redact-previewswithholds every field carrying stored content — payload previews, the context a human was shown at a checkpoint, captured decision summaries — and names what it withheld, so a recipient knows what to ask for instead of guessing whether a field was stripped or never existed.
The bundle is self-verifying, and honest about the limit. manifest.json hashes every other file; rootsign export --check <dir> re-hashes them and also flags files that are present but unlisted. That proves internal consistency only — someone who edits a file and updates the manifest passes it. So the manifest's own digest is printed at export and on both --check outcomes, because comparing it against the value you noted out of band is the actual verification step.
The bundle schema is frozen by a golden-file test at format version 1.0, with the reserved empty compliance block Phase 2 fills without a version bump.
☁️ Cloud transport, ready before the backend (ADR-013)
pip install 'rootsign[cloud]'
export ROOTSIGN_BACKEND=cloud ROOTSIGN_API_KEY=...HttpIngestClient implements the published wire spec against a mock server: it seals the chain client-side so the store verifies rather than computes, owns its retry budget (so BufferedIngestClient stands down to one attempt per flush instead of multiplying 3×3), and classifies every rejection by the wire retryable flag rather than its own reading of a code — which is what lets the error registry grow without stranding fielded clients.
The core install stays at four dependencies; httpx lives in the extra.
📴 Nothing is lost when the endpoint is not there
When retries are exhausted the client fails over to the ADR-011 JSONL writer under $ROOTSIGN_DATA_DIR/spool/ — one WARNING for the outage, not one per record — and your tool calls keep returning their real results. Spooled records are ordinary session files, so the evidence is usable before it is uploaded:
$ rootsign verify --local ~/.rootsign/spool/sessions/<session_id>.jsonl
VALID ✓ — 2 records, chain intact
This is a spooled session — recorded locally because the cloud endpoint was unreachable.
Upload it (and everything else waiting) with:
rootsign-admin syncrootsign-admin sync replays the spool through the batch endpoint. Safe to re-run: idempotency is server-side by event_id, so a partially uploaded session resumes and records the store already has count as delivered. Fully-uploaded files move to spool/synced/; a partial one stays put and reports the first rejected sequence. --dry-run inspects the spool without contacting anything and works on a bare install.
The chain spans the outage. Records are sealed before the client picks a destination, so after sync the store holds one unbroken session rather than two fragments.
⚖️ Three verdicts, and an exit code that tells theft from loss
verify used to answer a boolean, which stopped being enough once records could be lost as well as altered:
| Verdict | Meaning | Exit |
|---|---|---|
VALID |
dense sequences, every hash recomputes | 0 |
TAMPERED |
a record was altered | 1 |
INCOMPLETE |
a record is missing; the rest verify cleanly | 2 |
One shared precedence rule serves both verifiers: a break explained by a sequence gap reads INCOMPLETE, a break between contiguous records reads TAMPERED, and a session with both reads TAMPERED with the gaps still listed. Verifiers re-anchor after a gap-explained break rather than stopping, so one dropped record cannot mask every alteration after it.
🪜 When the disk fails too
The bottom rung (ADR-013 Decision 4a): telemetry drops with accounting — one CRITICAL, an in-memory loss ledger re-logged at session close, and a chain gap that makes the loss provable rather than silent — while control records fail closed. A require_approval=True call whose pending record cannot be persisted raises HiTLPersistenceError before the tool runs: an approval is the control, not telemetry. ROOTSIGN_ON_RECORD_LOSS=fail opts the telemetry path into failing closed too.
📜 The wire format is published
docs/ingest-spec-v1.md specifies the envelope, the five event types, the complete error-code registry, idempotency by event_id, batch semantics, and the client-side hashing contract — the document a design partner's security reviewer asks for, and the contract the Phase 2 backend, the TypeScript SDK, and any community connector implement.
Upgrading
Nothing is required. Two things to know if they apply to you:
If you script rootsign verify: a missing record now exits 2 rather than 1. Checks written as != 0 are unaffected; a check written as == 1 will no longer catch an incomplete chain — change it to != 0 unless you specifically mean "altered".
If you consume VerifyResult or crud.action.verify_chain directly: both gained verdict and missing_ranges additively. VerifyResult.valid is now a derived property (verdict is VALID) rather than a stored field, so constructing one takes verdict= instead of valid=. The CRUD dict keeps every key it had — it is published through the MCP audit server, so its shape is a public surface.
If you are deploying a store that speaks the wire protocol: the schema version moves to 1.1 (the sealed chain fields on ACTION_RECORD). Per §9 of the spec, minor additions deploy store-first — a 1.0-era store rejects an envelope that actually carries the new fields, because the per-event payloads forbid extras.
Install
pip install rootsign # core — JSONL backend, four dependencies
pip install 'rootsign[cloud]' # + hosted ingest transport and sync
pip install 'rootsign[postgres]' # + PostgreSQL/TimescaleDBNotes and known limits
rootsign export <session_id>reads Postgres only. Cloud-backed export needs a server read API, and this release builds the write half of the cloud transport against a mock. Cloud users export from the spool with--local.- A file that spooled mid-session verifies
INCOMPLETE, notVALID. The records from before the outage went over the wire and are not in that file — and "this file is the whole session" is not a claim anyone can make offline. Sync it and the store's copy verifies VALID. - Cloud-mode HiTL is not supported in this release; the approval poll loop remains a Postgres surface.
- No PDF. Every PDF library drags heavy dependencies into a four-dependency core; browser print-to-PDF from the HTML is adequate until Phase 2 renders server-side.
- Content hashes prove integrity, not authorship. The bundle is not a signing system; if that is needed it gets its own ADR rather than an improvised scheme.
- New settings:
ROOTSIGN_SPOOL_DIR(defaults to$ROOTSIGN_DATA_DIR/spool),ROOTSIGN_ON_RECORD_LOSS(warn|fail),ROOTSIGN_HTTP_TIMEOUT_SECONDS,ROOTSIGN_HTTP_MAX_RETRIES(total attempts, not retries after the first). ROOTSIGN_MAX_RETRIES/ROOTSIGN_RETRY_BASE_DELAY/ROOTSIGN_RETRY_MAX_DELAYare read by no code path and are marked legacy in.env.example. Use theHTTP_settings above.- The JSONL record shape gained
duration_msandpolicy_id(both already part of the wire payload). Neither is in the canonical hash, so no existing digest moves.
Full changelog: v0.2.1...v0.3.0