← Back to Pull requests

(fix) daemon: the blind-preempt swap also fires on the #584 velocity projection #1538

Open
unknown opened this pull request with 266 lines diff across 3 files
View on GitHub
unknown unknown commented on Sep 27, 2026 02:03 UTC
Author

What

Daemon::blind_swap gains a third arm: the existing blind_velocity_projected_armed predicate (issue #584, until now REPORT-ONLY behind auto_protection_degraded) now also ARMS the bounded-blindness preemptive swap, under the same session_blind_swap_secs kill-switch as the anchor and Retry-After arms. A velocity-armed swap is treated like the anchor arm (not subject to the #582 walk/reserve breakers). No new wire fields, event tokens or config keys; everything after the gate is byte-identical.

Why

Observed 2026-09-26 on a 14-account roster driven by an unattended agent fleet: the active account went blind (14 consecutive usage_backoff class=rate_limited, Retry-After: 0) with a retained anchor of session 0.58 — below the 0.60 session_blind_risk_band. The level-only gate logged decision=skip_active_unavailable for 83 ticks while the account burned 0.58 → 1.00 in 34 minutes (blind_exit duration_secs=2251 session_pct=58 session_at_recovery=100 swapped_away=true — swapped away only by hand), and every consumer hit the usage limit. The #584 projection (0.58 + rate × 1.75 × blind_secs) crossed the ceiling at roughly 16 minutes into the window; acting on it would have swapped 18 minutes before exhaustion.

This is the predicate-shape argument #584 already made for the report — at long blind windows no anchor band is low enough for a level-vs-level comparison to stay safe — applied to the action. The bias-HIGH inflation is reused deliberately: the #484 swap-timing asymmetry (fire-early-is-cheaper for unattended runs) is exactly the regime a fleet runs in, and a false swap costs one rotation while a missed one costs the window.

ADR-0017 is amended in place (Status § "Amended 2026-09-26"), following the #539/#584 amendments.

Tests

Four new blind_swap_* tests (fires below the band on a sustained projection; does not fire on a below-ceiling projection; needs a sustained EMA; disabled by the kill-switch). The two pre-existing below-band tests pass unchanged (their warm-up leaves session_velocity = None). All five CLAUDE.md gate commands green; 2389 passed / 0 failed.

Diff: 266 lines (+199 / -67) across 3 files Reviewer: alexey-pelykh Review duration: 82395m
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.46) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 266 lines diff across 3 files
0.46
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
40%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #1538"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 40.9% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 46.4% (MEDIUM) · Higher = larger blast radius
46.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 40.9% · Lower = rushed or shallow review
40.9%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 27.4% · Safe to merge
27.4%