Audit & rollback
Append-only event log, hash-chain verification, transactional patches — explain and undo agent work.
If it happened, you can explain it. If a patch was applied, you can roll it back. hash-chained
What you’ll get
Section titled “What you’ll get”- How the event log and hash chain work
- Exact CLI for audit, verify, report, export
- Patch list / show / apply / rollback
Event flow
Section titled “Event flow”flowchart LR A[Agent action] --> K[Policy kernel] K -->|allow / deny / approve| D[PermissionDecision] D --> E[Event log] E --> H[Hash chain] H --> V[carina audit verify]
Audit guarantees
Section titled “Audit guarantees”- Append-only log; every event has timestamp + session id
- Side-effect events reference their permission decision id
- No raw media bytes in transcript/audit — only content-hash MediaRefContent-addressed media reference; bytes stay in the object store.s
- File history is queryable: which agent, task, patch, when
- Allow/deny is explainable: policy + reason on the decision
- Targets: intercept out-of-workspace access, zero secret plaintext in logs, every side effect audited
CLI — inspect
Section titled “CLI — inspect”carina sessionscarina audit SESSION # raw event streamcarina audit verify SESSION # hash-chain integritycarina audit last # most recent session summarycarina report SESSION # violations, files, commandscarina export SESSION # full audit bundlecarina items SESSION # normalized UI/SDK item streamcarina session review SESSION # governance-oriented projectionCLI — patches
Section titled “CLI — patches”File mutations should go through the patch pipeline when policy requires it:
- Propose (
workspace.patch.propose/ agent patch tool /carina patch propose) - Kernel evaluates PatchApply (may require approval)
- Apply → verify → commit with rollback pointer
- No half-applied state
carina patch list SESSIONcarina patch show SESSION PATCH_IDcarina patch propose SESSION PATH # content on stdincarina patch apply SESSION PATCH_IDcarina patch rollback SESSION PATCH_IDTransaction review
Section titled “Transaction review”The Fullscreen /changes workbench mirrors the transaction boundary rather than inventing a Git-only review model:
patch transaction -> affected files (A / M / D, additions, deletions) -> numbered hunks with attribution and verification evidence -> rollback preview for the same patch + transaction identityThe visible diff is a bounded review projection. A continuation row means more lines remain outside the viewport or source cap; it does not weaken verification or truncate the daemon’s rollback transaction. Confirmation is allowed only when the preview says the workspace is unchanged and its patch and transaction identifiers still match.
For keys, density, narrow-screen behavior, and accessibility, see CLI & TUI.
Recipe: after a bad edit
Section titled “Recipe: after a bad edit”Find the session
carina sessionscarina audit lastList patches
carina patch list SESSIONRoll back
carina patch rollback SESSION PATCH_IDConfirm chain still valid
carina audit verify SESSION
Not a Git replacement
Section titled “Not a Git replacement”Audit and patches explain agent work inside a session. They do not replace Git history, PR review, or branch policy. Use both: Git for collaboration history, Carina for governance of agent effects.
If it fails
Section titled “If it fails”| Symptom | Try |
|---|---|
verify fails | Treat as integrity incident; do not ignore — export bundle and investigate |
| Empty patch list | Agent may not have written files, or used a path that did not create a txn |
| Cannot find SESSION | carina sessions / carina audit last |
Source of truth
Section titled “Source of truth”docs/security-model.md(audit guarantees)- Event / media rules in protocol + control plane
- CLI:
carina --help· CLI reference - Related: Policy · Observability traces
- Common workflows — inspect / rollback recipes
- Method catalog —
session.*/ audit-related RPC
Was this page helpful?
What went wrong?
Thanks for the feedback.
One vote per page is recorded during this session.