Skip to content

RootSign v0.1.4 — security & correctness hardening

Choose a tag to compare

@oabolade oabolade released this 29 Jul 19:39
· 88 commits to main since this release
b21f288

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_redacted and bind it to
    the input_hash / output_hash the 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 tripping TAMPERED. 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 a SELECT ... FOR UPDATE row lock on the target action, and a partial
    unique index (uq_approvals_action_resolution) is a DB-level backstop.
    Two concurrent resolvers (the rootsign approve CLI 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 migration 0004 — run rootsign-admin init.
  • Config fails closed in production. Set ENVIRONMENT=production and
    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 raises HiTLTimeoutError, never HiTLRejectedError,
    preserving the timed_out vs human_rejected forensic 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-@tool flake eliminated (issue #3). A sync tool invoked
    via ainvoke no 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_CLOSE action counts are accurate. The SDK sequence counter now
    advances only on accepted ingests, so total_actions matches the store and
    the reconciliation warning no longer fires spuriously. (audit #9)
  • CLI polish: rootsign approve records 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 --reset now
    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 init to apply migration 0004 (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.


License

Apache License 2.0 — see LICENSE and NOTICE.