guarded_commit
Record an already-performed git commit against a gate session, marking it committed and updating the audit log. Use after a successful commit to complete the gate-controlled workflow.
Instructions
AUDIT RECORD ONLY — call this AFTER git commit has already succeeded, never before. It does not perform or authorize the commit: on success it marks the session "committed" in the store, and the git pre-commit hook treats a committed session as used up. Calling this BEFORE running git commit will cause that following commit to be BLOCKED (the hook will see no eligible session). Correct flow: register_gate for every required role -> gate_status to confirm commit_allowed:true -> run the real git commit yourself -> optionally call guarded_commit afterward to log it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| override | No | Force-record commit even with missing gates (records override in audit log, self-attested — not independently verified). Does NOT bypass the git hook itself — see GATE_BYPASS for that. | |
| session_id | Yes | The gate session ID to check | |
| commit_message | Yes | The commit message of the commit that was ALREADY made (this call records it, it does not create it) | |
| override_reason | No | Reason for override (required if override=true) |