← Back to Pull requests

C1 review follow-ups: outage episodes, S10 backoff, safe codes (#2156) #2274

Open
unknown opened this pull request with 260 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 17, 2026 14:59 UTC
Author

Closes #2156. Scope is hadron-cli only; no production execution.

Changes (red pins first: dfc74400, af45b30f)


  • F7 An outage episode now ends when the sweep leaves APPLY (OFF/OBSERVE), so a later outage is a new announced episode. Pins also cover readiness recovery.

  • F8 A state-save failure while taking the outage token logs STATE_SAVE_FAILED instead of dropping the report silently.

  • F9 A pending outage report backs off 1m doubling to 30m while S10 answers S10_UNAVAILABLE (in memory; resets on success or episode end).

  • F14 recordSweepRun splits the catch-all host-load code: HOST_CONFIG_UNREADABLE (new), HOST_KEY_UNAVAILABLE (absent key), HOST_CLIENT_UNAVAILABLE (new). Closed constants, no path/key/message (cor:agt:070:09). Behavior change: a missing config used to read HOST_KEY_UNAVAILABLE; the existing test is updated accordingly.

  • F15 sweepWorkerCount no longer counts an item with no worker identifier (no lawful S10 line).

  • F1/F2 Comment moved onto managedDaemonProbe; redundant OFF return and unreachable empty-binary fallback removed.

  • F4 Minimum systemd 244 established from versioned source: v243 service.c refuses any Restart= other than no for Type=oneshot; v244 allows on-failure/abnormal/watchdog/abort. Documented in sweep install --help; no install-time detection added.

  • F16/F19 + docs Sweep help trimmed of the repeated C5 explanation; the bare chat/person reference replaced with the rationale. Install help now states the exit-2 panic limit and the unattended login/server setup (unit embeds no server/token; 0600 key only for S10). No published JSON shape change; new codes documented in agentic-usage.
  • Not done


    Install-time systemd version detection (F4 option); a distinct readiness outcome code for exit 2 (left to a separate decision per the issue).

    Verification


    make lint clean; go test ./... passes; make help-inventory regenerated.

    — Joran, CLI Engineer · Claude/Anthropic

    Diff: 260 lines (+195 / -65) across 3 files Reviewer: claude[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 260 lines diff across 3 files
    0.44
    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%
    46%
    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.333
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #2274"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 44.2% (MEDIUM) · Higher = larger blast radius
    44.2%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 23.6% · Safe to merge
    23.6%