← Back to Pull requests

Update AGENTS.md with subprocess hang defense-in-depth learnings #134

Closed
RobotSail closed this pull request without merging on Jul 28, 2026 18:04 UTC
View on GitHub
RobotSail RobotSail commented on Jul 26, 2026 10:03 UTC
Author

Summary

Updates AGENTS.md with 3 learnings from training_hub PRs #132 and #133 (merged July 26, 2026):

1. Practice update: os._exit() in ART subprocess must be unconditional — a conditional version that only fired on success re-introduced the hang on error paths
2. New practice: Parent-side proc.join(timeout=...) as defense-in-depth — asyncio.run() can hang at a level below the coroutine's finally block, making subprocess-side fixes alone insufficient
3. Reference config: AIPCC 3.5 GA validated stack (torch 2.11.0, art 0.5.18, vllm 0.21.0+rhaiv.10, trl 1.8.0)

Two new incidents added to Past Incidents documenting the progression:

  • Conditional os._exit() regression (#132)

  • Parent proc.join() hang despite subprocess fix (#133)
  • Citations

  • training_hub PR #132 — Fix subprocess hang after GRPO training completes

  • training_hub PR #133 — Fix subprocess hang: use join timeout instead of blocking forever
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Documentation
    Clarified guidance for preventing GRPO training shutdown hangs.
    Added safeguards for both subprocess exit handling and parent-process timeouts.
    Documented two past incidents involving shutdown regressions.
    * Added validated dependency versions and verification notes for the RHOAI AIPCC 3.5 GA stack.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 217 lines (+162 / -55) across 2 files Reviewer: None requested Review duration: 3361m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.54) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.54 · 217 lines diff across 2 files
    0.54
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    57%
    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
    Diff Size diff_size
    0.322
    Shallow Review Depth shallow_review_depth
    0.289
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #134"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    RobotSail RobotSail
    Labels
    risk: low confidence: 58.0% 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: 53.7% (MEDIUM) · Higher = larger blast radius
    53.7%
    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: 58.0% · Lower = rushed or shallow review
    58.0%
    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: 22.5% · Safe to merge
    22.5%