v0.4.0 — Security & Performance Hardening
Breaking Changes
- HMAC key now required —
FailSafeAuditSink(hmac_key=...)no longer defaults to a dev key. Passhmac_key=b"failsafe-dev-key"explicitly for development or set a production key.
Security Hardening
DecisionRequest.__post_init__validatesaction,agent_did, and normalizesartifact_pathviaos.path.normpath- Exception messages sanitized — no
str(exc)leak in fail-open responses - Artifact paths in webhook events reduced to
os.path.basenameonly - SLI signal reasons truncated to 200 chars max
- Escalation queue eviction now runs under lock
Performance
- Persistent SQLite connections with WAL mode and
busy_timeout=5000in bothLocalFailSafeClientandFailSafeAuditSink LocalFailSafeClient.close()method for explicit connection cleanup- MCP client subprocess cleanup on handshake failure
Reliability
fail_open: bool = Trueparameter onFailSafeInterceptorandGovernancePipeline- Fail-closed mode raises on governance errors instead of silently allowing
- Trust score diminishing returns:
0.8 ** consecutive_successesdecay prevents score inflation
Stats
- 18 source files, 3,387 lines
- 305 tests passing, clean lint
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com