sync_audit_layer5
Record the result of a client-side Layer 5 codex review (sync.py merge gate) as a vault_events row. Body of the review is NOT stored — only an HMAC digest of the summary so operators can correlate without exposing review content. Opt-in: server skips writes (still returns success) unless ENV['AINOTE_LAYER5_AUDIT']='on' AND a versioned HMAC secret is configured. Used by the sync.py SessionStart hook + merge command to surface 'why was this blocked?' across multi-PC sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault path the review covered. | |
| summary | No | Free-form codex output summary. Server HMACs this; raw text is NEVER stored. | |
| verdict | Yes | One of: pass, flag, block, error. | |
| chunk_count | No | Optional: number of diff chunks the client fed to codex. | |
| duration_ms | No | Optional: wall-clock time of the codex review on the client. |