fix(auto-triage): close eligible cases reliably — offset paging, in-loop close, fail-closed guards#950
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.