Add independent audit logging and reviewer fallback - #76
Conversation
| @@ -0,0 +1,9 @@ | |||
| #!/usr/bin/env node | |||
| import { createHash } from "node:crypto"; | |||
There was a problem hiding this comment.
can we use rust for the audit-log. moreover, let's rename it to logger
There was a problem hiding this comment.
Agreed and fixed in bf81275. The component is now the Rust multiagent-logger workspace crate and is renamed holistically to logger across its binary, Docker image, schema, environment variables, tests, and architecture/deployment docs. The port retains the SQLite WAL/FULL ledger, exact idempotency, hash chains, Ed25519 checkpoints, startup verification, scoped clients, and optional projections. The Rust tests and final Docker build pass.
| ValidationLeaseList, | ||
| GateCheck, | ||
| OpsDescribe, | ||
| OpsEvidenceRead, |
There was a problem hiding this comment.
I don't think we need a seperate evidence read. it should be hte same as other ops read
There was a problem hiding this comment.
Agreed and fixed in bf81275. OpsEvidenceRead and the ops evidence-read CLI were removed; reviewer observations now use the normal ops execute / prod-mcp operations_execute path. The supervisor still preserves the caller UID and fail-closes the reviewer branch to a live reviewer, a reviewed-request binding, identical task/goal/target/runbook scope, access=read, mutation=false, no mutation approvals, and the observer role/subject. A dedicated test proves reviewer and operator execution modes remain disjoint.
| } | ||
| let connection = | ||
| Connection::open(database).map_err(|error| format!("open logger database: {error}"))?; | ||
| connection.execute_batch("PRAGMA journal_mode=WAL; PRAGMA synchronous=FULL; PRAGMA locking_mode=EXCLUSIVE; PRAGMA foreign_keys=ON; PRAGMA trusted_schema=OFF; |
There was a problem hiding this comment.
It was the authoritative store for idempotency, per-session ordering and heads, checkpoints, restart recovery, and verification. Since we decided not to use a database, fixed in e5bd042: rusqlite/SQLite is removed and replaced with one canonical append-only JSONL ledger. Each record is fsynced before acknowledgement; the service holds an exclusive writer lock, rebuilds its indexes on startup, and fails closed on truncated, non-canonical, duplicate, out-of-sequence, hash-invalid, or signature-invalid records. No database remains in the logger.
Summary
Verification