Deployments and incidents
Deployments are the deploy runs Jaah recorded for a project, with their commit range, PRs and post-deploy measurements. Incidents are the production problems recorded against a project, with their suspects, history and the tasks filed for them.
List deployments
Lists recorded deploy runs, newest first, in the projects the caller may view, filtered by `project_id`, `environment` and `status`; each row names the PRs it shipped (`pr_numbers`). Without `status`, skipped runs that reached no environment are left out; `status=skipped` lists them. Pages by keyset: pass `next_cursor` back as `cursor` to continue; it is null on the last page.
Get deployment
Returns one deploy run with its environments, commit range, PRs, post-deploy measurements, ledger edges and native probe results (`probes`, one per probe's health incident). Returns 404 for a deploy outside the projects the caller may view.
List incidents
Lists recorded incidents, newest first, in the projects the caller may view, filtered by `project_id`, `severity`, `state`, `type` and `task_id` (the incidents a task was filed for); each row carries its leading undismissed suspect (`top_suspect`) with its confidence. Pages by keyset: pass `next_cursor` back as `cursor` to continue; it is null on the last page.
Get incident
Returns one incident with its suspects, history, filed tasks, ledger edges, and its deploy's measurements and environments; `can_edit` says whether the caller may correct its suspects. Returns 404 for an incident outside the projects the caller may view.
Add suspect
Names a suspect PR of an incident by `repo_path` and `pr_number`: basis `operator`, confidence `high`, confirmed, with who and when stored (an existing row for that PR is confirmed in place). Needs `projects:edit` on the incident's project. Returns the incident as `get_incident` does.
Correct suspect
Confirms, dismisses or un-decides (`suggested`) one suspect PR of an incident, storing who and when; the incident's `incident_linked` ledger edges follow (a dismissal revokes one). Needs `projects:edit` on the incident's project: 403 for a caller who can only view it, 404 outside the projects the caller may view. Returns the incident as `get_incident` does.