Parapet.Operator (parapet v1.0.0)

Copy Markdown View Source

Phoenix-free public boundary for the in-app Operator UI. Provides queue/detail queries and audited command entrypoints for incident mutations.

Stable

This module is stable as of v1.0.0. Its public API will not change without a major-version bump and a full deprecation cycle. See Stability & Deprecation Policy for details.

Summary

Functions

Executes an audited acknowledge_incident command. Transitions the incident to 'investigating' state and adds an 'acknowledge' timeline entry.

Returns an Ecto.Query for open action items, sorted by inserted_at ascending.

Executes an audited attach_change_marker command.

Delegates dynamic capability queries (e.g., UI mitigations) to the capability registry.

Confirms and executes a recovery action. Validates the preview_token and requires an idempotency_key in the payload.

Executes a mitigation step securely via dynamic dispatch from a runbook.

Fetches an incident by ID along with its timeline entries and returns a workbench-ready map containing the incident, entries, and derived fields.

Returns a bounded, active-only incident queue page suitable for operator browsing. Invalid cursor or direction params fall back to the first page.

Executes an audited mark_investigating command on an incident.

Previews a recovery action for a runbook step. Resolves the named capability and returns a bounded preview payload.

Returns an Ecto.Query for the incident queue, sorting open/investigating first, and resolved incidents second (Phase 2 default sort).

Executes an audited record_note command.

Executes an audited request_approval command.

Executes an audited resolve_incident command. Transitions the incident to 'resolved' state and attaches an automated retrospective.

Records a temporary suppression window for pending escalation execution.

Records an explicit operator request to trigger the next escalation. Persists only bounded current-state metadata and leaves execution to the worker.

Functions

acknowledge_incident(incident, payload)

(since 1.0.0)

Executes an audited acknowledge_incident command. Transitions the incident to 'investigating' state and adds an 'acknowledge' timeline entry.

action_items_query()

(since 1.0.0)

Returns an Ecto.Query for open action items, sorted by inserted_at ascending.

attach_change_marker(incident, change_ref, payload)

(since 1.0.0)

Executes an audited attach_change_marker command.

capabilities(type)

(since 1.0.0)

Delegates dynamic capability queries (e.g., UI mitigations) to the capability registry.

confirm_runbook_step(incident, step_id, preview_token, payload)

(since 1.0.0)

Confirms and executes a recovery action. Validates the preview_token and requires an idempotency_key in the payload.

execute_runbook_step(incident, step_id, payload)

(since 1.0.0)

Executes a mitigation step securely via dynamic dispatch from a runbook.

incident_detail(incident_id)

(since 1.0.0)

Fetches an incident by ID along with its timeline entries and returns a workbench-ready map containing the incident, entries, and derived fields.

list_incident_queue(opts \\ [])

(since 1.0.0)

Returns a bounded, active-only incident queue page suitable for operator browsing. Invalid cursor or direction params fall back to the first page.

mark_investigating(incident, payload)

(since 1.0.0)

Executes an audited mark_investigating command on an incident.

preview_runbook_step(incident, step_id, payload)

(since 1.0.0)

Previews a recovery action for a runbook step. Resolves the named capability and returns a bounded preview payload.

queue_query()

(since 1.0.0)

Returns an Ecto.Query for the incident queue, sorting open/investigating first, and resolved incidents second (Phase 2 default sort).

record_note(incident, text, payload)

(since 1.0.0)

Executes an audited record_note command.

request_approval(incident, approval_key, payload)

(since 1.0.0)

Executes an audited request_approval command.

resolve_incident(incident, payload)

(since 1.0.0)

Executes an audited resolve_incident command. Transitions the incident to 'resolved' state and attaches an automated retrospective.

suppress_pending_escalation(incident, suppressed_until, payload)

(since 1.0.0)

Records a temporary suppression window for pending escalation execution.

trigger_next_escalation(incident, payload)

(since 1.0.0)

Records an explicit operator request to trigger the next escalation. Persists only bounded current-state metadata and leaves execution to the worker.