Human-in-the-Loop Approvals (WaitingApproval)
Any MaintenancePolicy route that opens a Pull or Merge Request can set requireApproval: true to pause for operator sign-off before anything is pushed to the Git forge.
Policy Configuration
Section titled “Policy Configuration”spec: policy: approvalTimeout: 24h routes: - name: open-rightsizing-pr when: "output.action == 'patch'" action: OpenPR requireApproval: true draft: true labels: - type/maintenancespec.policy.approvalTimeout defaults to 24h. A background sweeper (--approval-sweep-interval, default 1m) expires overdue checkpoints automatically.
Checkpoint Lifecycle and Pre-Pause Sandbox Teardown
Section titled “Checkpoint Lifecycle and Pre-Pause Sandbox Teardown”- Investigate, Edit, and Validate: Faber executes the ReAct loop, runs offline Tier 1 validation commands inside the ephemeral sandbox, and extracts the unified diff and changed file set operator-side in
BeforeSandboxClose. - Pre-Pause Sandbox Teardown: The
SandboxClaimis deleted immediately before pausing. A pausedWaitingApprovalrun holds zero sandbox pods and zero sandbox memory. - Hard Diff Gates and Verifier: The controller evaluates hard diff policy gates (allowlist, denylist, file/line limits, secret scanner, protected workload rules) and runs the optional independent verifier model before requesting approval.
- Zstd Checkpoint Persistence: The verified output JSON, file changes, unified diff, validation results, artifact IDs, matched routes, and exact token/USD usage are saved as a zstd-compressed
RunCheckpointin the backing store (SQLite or PostgreSQL). - Notification and Pause: The
RemediationRunenters phaseWaitingApproval, emits anapproval.requestedaudit event and SSE event, and dispatches configured notifications (Matrix, webhook, Slack, Discord, or Apprise) with a deep link tohttps://faber.example.com/runs/<run-id>.
Approving or Rejecting a Run
Section titled “Approving or Rejecting a Run”Operators can act on a WaitingApproval checkpoint from four interfaces:
1. Embedded Web GUI
Section titled “1. Embedded Web GUI”Open the run detail page (https://faber.example.com/runs/<run-id>), inspect the syntax-highlighted unified diff, validation log, and verifier verdict, enter an optional comment, and click Approve or Reject.
2. faberctl CLI
Section titled “2. faberctl CLI”faberctl runs list --phase WaitingApprovalfaberctl runs diff <run-id>faberctl runs approve <run-id> --actor jan --comment "verified memory bounds"faberctl runs reject <run-id> --actor jan --comment "too aggressive on ingress pod"3. HTTP REST API
Section titled “3. HTTP REST API”curl -X POST https://faber.example.com/api/v1/runs/<run-id>/approve \ -H "Authorization: Bearer $FABER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"comment":"looks good"}'
curl -X POST https://faber.example.com/api/v1/runs/<run-id>/reject \ -H "Authorization: Bearer $FABER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"comment":"skip this workload"}'4. Kubernetes CR Annotations
Section titled “4. Kubernetes CR Annotations”Patching the RemediationRun CR directly also wakes the reconciler (via remediationRunEventPredicate passing approval-decision annotation updates):
kubectl -n faber annotate remediationrun <name> \ faberops.dev/approval-decision=approved \ faberops.dev/approval-actor=jan \ faberops.dev/approval-comment="approved via kubectl"Verified decidedBy Identity
Section titled “Verified decidedBy Identity”When native authentication is enabled (--auth-mode=oidc or --auth-mode=k8s) or trusted reverse-proxy headers are configured (auth.trustedProxy.*), the HTTP API ignores any caller-supplied actor field in the JSON body and stamps decidedBy unconditionally from the verified principal subject. Every decision is written to the immutable audit log (approval.decided) with the verified actor, timestamp, outcome, and comment.
For per-policy ownership ACLs (OwnerACLConfig), separation of duties (requireDistinctApprover), multi-approver quorums (minApprovals), and opt-in ValidatingAdmissionPolicy enforcement on kubectl annotate, see Ownership ACLs, Multi-Approval Quorums, and Verified Identity.
Resume, Rejection, and Expiry Behavior
Section titled “Resume, Rejection, and Expiry Behavior”- Approved:
RemediationRunReconcilerloads the checkpoint before settle/LLM/sandbox logic, re-runs the hard diff policy gates as defense-in-depth, commits the verified diff to the configured forge, opens or updates the PR/MR, and marks the runSucceededwith zero extra LLM turns and zero sandbox claims. - Rejected: The run transitions to
Skipped(approval rejected) and stores the operator’s comment as a Layer 3 lesson so subsequent runs on the same target avoid repeating the rejected proposal. - Expired: Once
expiresAtpasses, the approval sweeper transitions the checkpoint toExpiredand closes out the run cleanly without opening a PR.