perf(ci): wake listeners on demand and reduce capacity reads #3138
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 384 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.356
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3138"
general
weight: 0.35
DefeatMan
TL;DR
Idle repositories keep their scale-set listeners closed, and active listeners retain each queued workflow job until its departure is confirmed.
How it works
If one of 100 authorized repositories queues a job, a signed webhook or an authorized repository scan wakes that repository’s requested runner label. The other 99 need no scale-set session or capacity probe.
The inbox deduplicates demand by installation and workflow job ID. An empty poll or partial acquisition preserves the pending jobs across a restart. A confirmed status change clears only the matching job, and an older scan result preserves a newer notice.
Each due repository scan reads at most eight notice rows in one indexed query inside the claim transaction. Its cursor advances with the existing task write. Only jobs absent from the queued inventory need individual GitHub status checks, and a 404 leaves the job pending.
Assigned jobs, pending acquisitions, reservations and workers awaiting retirement keep their labels recoverable.
Hosted capacity probes validate scope metadata in one fenced read and read mutable counters once. An empty credential-retirement page skips its separate database-clock read. Listener documentation · Repository compensation · Design
Verification
With the review fixes reverted, one acquired offer or an empty poll cleared queued notices, and a standalone personal-token scan left a canceled job pending. The regression cases pass with the fixes applied on SQLite and PostgreSQL for listener polling and on standalone SQLite for personal-token reconciliation.
The shared listener suite, standalone runner suite, selected hosted CI suites and both builds passed. Production SQL QPS, cold-job latency and compensation API volume still require measurement after rollout.
The design review flagged limited independent verification of external sources. It suggested checking notice settlement across restart, lost custom-label webhooks, overlapping poll versions, reservations changing between reads, and malformed unlimited-domain counters. The regression suite covers restart, custom-label compensation and overlapping notifications.
The commit audit noted that a status confirmed by a scan saves the observed notice version and repeats job identity fields in the job fact. This adds payload bytes to those records.