Repository navigation
RootSign v0.1.4 — security & correctness hardening
RootSign v0.1.4 — security & correctness hardening
A patch release clearing the pre-Phase-2 audit backlog: tamper-evidence
hardening, approval concurrency safety, HiTL correctness, CLI/config polish,
a dependency-security bump, and the elimination of a long-standing test flake.
No public API changes — a drop-in upgrade from 0.1.x.
pip install --upgrade rootsign[langgraph]
pip install --upgrade rootsign[crewai]Security & tamper-evidence
- Payload↔hash binding at verification.
verify_chain(DB) and
verify_session_local(offline JSONL) now re-derive
compute_payload_hash(input_redacted)/output_redactedand bind it to
theinput_hash/output_hashthe chain protects. Previously the chain
proved the hashes were intact but not that the stored human-readable
redacted payloads still matched them — so DB write access could rewrite the
evidence without trippingTAMPERED. Now it's caught with a distinct
payload_hash mismatch. (audit #4, verify side) - Approval resolution is concurrency-safe. Both approval write paths now
take aSELECT ... FOR UPDATErow lock on the target action, and a partial
unique index (uq_approvals_action_resolution) is a DB-level backstop.
Two concurrent resolvers (therootsign approveCLI and the poll-loop
timeout writer) can no longer both pass the terminal-state guard and write
duplicate approvals — the ADR-007 "human wins ties" invariant now holds.
(audit #5) Includes migration0004— runrootsign-admin init. - Config fails closed in production. Set
ENVIRONMENT=productionand
RootSign refuses to start against the dev-credentialed default database
instead of silently connecting to it. (audit #7c) - Dependency bumps: Pillow 12.2.0→12.3.0 and mcp 1.27.2→1.28.1, clearing
15 transitive Dependabot advisories (all via optional framework extras).
HiTL correctness
- Timeouts are no longer misclassified as human rejections. A timed-out
approval now always raisesHiTLTimeoutError, neverHiTLRejectedError,
preserving thetimed_outvshuman_rejectedforensic distinction even in
race/re-poll paths. (audit #10a) - Faster resolution. The poll loop checks once before sleeping, so an
already-approved action returns immediately instead of waiting a full poll
interval.
Fixes
- LangGraph sync-
@toolflake eliminated (issue #3). A sync tool invoked
viaainvokeno longer intermittently fails with an asyncpg cross-loop
error. A re-entrancy guard stops LangChain's sync-in-executor fallback from
re-entering the tracer on a second event loop and emitting a duplicate
record. SESSION_CLOSEaction counts are accurate. The SDK sequence counter now
advances only on accepted ingests, sototal_actionsmatches the store and
the reconciliation warning no longer fires spuriously. (audit #9)- CLI polish:
rootsign approverecords the actual operator
(cli:<user>) instead of a hardcoded id;rootsign verify <bad-uuid>gives
a clean error instead of a traceback;rootsign-admin init --resetnow
prompts for confirmation (or--yes) and derives the schema owner role from
the DSN. Idempotency store is now bounded. (audit #7a/#7b/#11a/#11b)
Upgrade notes
- Run
rootsign-admin initto apply migration0004(adds the approval
uniqueness index). Idempotent. - No code changes required — no public API changed.
Release process
First release published via PyPI Trusted Publishing (OIDC, no API tokens)
through .github/workflows/release.yml, triggered by publishing the GitHub
Release for the tag.