← Back to Pull requests

fix(runtime-host): publish admission before execution imports #5325

Closed
unknown closed this pull request without merging on Sep 15, 2026 04:25 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 02:49 UTC
Author

Summary

Runtime Host candidates load the entire execution composition before owner election and Local IPC admission. Slow imports therefore leave the candidate undiscoverable, losing candidates load execution dependencies unnecessarily, and import failures escape candidate startup handling. Defer that import until the kernel has published its listener; preserve a bounded failure phase and errno in election diagnostics, and make the connection-timeout message describe an unavailable endpoint.

Fixes #5324. The issue includes the triggering Windows nightly report and a controlled reproduction; this PR does not claim to establish the sole cause of that historical 45-second timeout or increase the default deadline.

Verification

  • Runtime Host TypeScript project build and diff checks passed. Repository-wide Biome lint (3,592 files) and format (2,122 files) passed on the submission branch. The submission is based on current main; the affected package sources and manifests are identical to the validated checkout.

  • 18 targeted tests passed: candidate entry/factory, startup error copy, owner election/recovery/errno propagation, and clean/unexpected candidate exits.

  • The new import-order regression fails against the original factory (registration absent, unclassified exit 1) and passes with this change (listener reachable before import; failures handled; losing candidate skips execution imports).

  • Full execution Host smoke on Windows 10.0.19042, Node 22.23.1: fresh temporary root ready in ~7.7 seconds under the normal 45-second budget; subsequent clean exit 0.

  • Known baseline failure: owned connection keeps a fresh Host alive for its full election window times out under its 6-second budget on this machine, with both the original and changed factory. Its timeout was not relaxed. Full repository build/test/typecheck and desktop/UI Knip were not run; the all-suites checklist remains unchecked.

  • Staged ASF/protocol guards passed. The staged Biome checker was invoked with the native executable because its default Windows .cmd spawn returns EINVAL.
  • AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: OpenAI Codex investigated the report, implemented the changes and regression tests, ran local validation, and prepared this submission. The commit includes a Generated-by: OpenAI Codex trailer.

    Checklist

  • Tests cover the change and fail without it

  • Lint, format, typecheck and the affected suites pass locally
  • Does this PR entail a change in behavior?

  • Yes — described under Summary above

  • No
  • Diff: 332 lines (+249 / -83) across 4 files Reviewer: M4n5ter Review duration: 96m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 332 lines diff across 4 files
    0.42
    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: 35%
    56%
    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.347
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5325"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 42.1% (MEDIUM) · Higher = larger blast radius
    42.1%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 18.2% · Safe to merge
    18.2%
    Repository