Roll back to a prior manifest — one-click oncall mitigation
manifests
Roll back to a prior manifest — one-click oncall mitigation
One-click rollback to a prior manifest version.
A single POST replaces the three-step manual path (look up the previous
manifest_id, re-register with that hash, rely on the auto-revert branch
inside register_manifest) — useful when you need to revert an agent
quickly during an incident.
Flow:
- Load the target manifest. Org-scoped (404 if not in caller’s org).
- If target is already
status=active, return 400. - Find the current active manifest for the same agent.
- Atomically: mark current_active = ‘superseded’, target = ‘active’.
- Write an AuditLog row with action=‘manifest.rollback’, target_id= the manifest being deactivated, metadata=which manifest is now active.
- Return the now-active manifest.
Optional body: {"reason": "..."} is recorded in audit_log.metadata_json.
POST
Roll back to a prior manifest — one-click oncall mitigation