Skip to content

fix(auto-triage): close eligible cases reliably — offset paging, in-loop close, fail-closed guards#950

Merged
scottbrumley merged 1 commit into
mainfrom
feat/soc-uni-auto-triage
Jun 16, 2026
Merged

fix(auto-triage): close eligible cases reliably — offset paging, in-loop close, fail-closed guards#950
scottbrumley merged 1 commit into
mainfrom
feat/soc-uni-auto-triage

Conversation

@scottbrumley

Copy link
Copy Markdown
Contributor

No description provided.

…oop close, fail-closed guards

JOB - Auto Triage was selecting cases but draining almost nothing (~70/hr).
Root causes were stacked: it scanned a slice that never reached the low-score
backlog, and the close path couldn't keep up with selection.

SOCAutoTriageScoreFilter.py
- Replace keyset-on-creation_time paging with offset pagination. get_incidents
  has no sort parameter (sort_by_creation_time is silently ignored), so keyset
  walking skipped the eligible backlog entirely (201 scanned / 0 passed).
- Close in-loop: per-case update_incident in a tight Python loop. The API has
  no bulk close (incident_id_list is rejected 400), and the old task 8 forEach
  spun a separatecontext per case — that was the throughput bottleneck.
- Write one execution-dataset row per actual close result instead of per
  selection, ending the re-selection inflation (~40k rows for ~563 closes).
- Record every skip with a reason; score skips were silently dropped and hid
  the real cause for a full session.
- Wall-clock runtime guard (540s, under the 600s automation timeout); partial
  runs resume next schedule. Replaces max_batches=200 that timed out under
  offset paging. Default max_batches 200 -> 20.
- Add fail-closed status backstop (skip unless status is confirmed 'new'),
  mirroring the starred backstop, so in-progress cases can never be closed.

SOCAutoTriageScoreFilter.yml
- Declare dry_run and batch_size args (were being stripped at invocation).
- Update outputs/contract to the close-result fields.

JOB_-_Auto_Triage_V3.yml
- Remove task 5 (condition) and task 8 (per-case forEach close playbook);
  task 12 now closes in-process and flows straight to close-job.
@scottbrumley scottbrumley added the version:patch Bug fix or hotfix → x.x.N label Jun 16, 2026
@scottbrumley scottbrumley merged commit 2e25e46 into main Jun 16, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Bug fix or hotfix → x.x.N

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants