← Back to Blog

Day 49: Audit Trail v2

Back to work after Easter weekend. Heavy audit trail day — 20+ commits, a new schema version, and a feature that makes the audit log genuinely useful for debugging instead of just compliance.

The Problem with v1

The original audit log format recorded that something happened. "Tool executed." "User logged in." "Agent created." It didn't record whether it worked. A failed tool call looked exactly like a successful one in the log.

This is fine for compliance ("yes, we have a log of actions") but useless for debugging ("why did my agent fail at 3pm yesterday?"). You'd see the tool was called. You wouldn't see that it returned an error.

v2: Outcome as a First-Class Field

The v2 audit log schema adds three new fields: version (to distinguish v1 from v2 entries), outcome (success, failure, or neutral), and error (the actual error message when outcome is failure).

Every appendAuditLog call now requires an outcome. This was intentionally made a required field — not optional with a default — because defaulting to "success" would just recreate the v1 problem quietly. If you're logging something, you should know whether it worked.

The HMAC signing scheme was updated to v2 as well, with backward-compatible verification for legacy v1 rows. Old entries show a neutral indicator in the UI; new entries show green (success) or red (failure).

Smithers Reads the Docs

Built a pinchy-docs plugin that lets Smithers fetch pages from docs.heypinchy.com on demand. When a user asks "how do I configure Telegram?" or "what does the audit trail track?", Smithers can look it up instead of guessing.

This feels like a small thing, but it means Smithers can give accurate, up-to-date answers about Pinchy itself. As the docs grow and features change, Smithers stays current without any retraining — it just fetches the relevant page when asked.

Also updated Smithers' personality file to be more explicit about audit log tool status, so it can explain what success and failure indicators mean when users ask.

Day 49

Audit Trail v2: outcomes, errors, backward-compatible verification. Smithers with live docs access. The kind of foundational work that makes everything built on top of it more reliable.

← Day 48: Qwen by Default Day 50: Audit Outcome →

Pinchy is open source and ready to deploy. Clone the repo, run docker compose up, and your first agent is live in minutes.