← Back to Pull requests

fix(substrate): keep control-plane text out of fork refusals #277

Merged
aramase merged 9 files (828 lines) on Nov 16, 2026 21:38 UTC
View on GitHub
aramase aramase commented on Nov 16, 2026 17:29 UTC
Author

When a Substrate fork is refused, the error that forkError publishes as FAILED_PRECONDITION or ABORTED included the control plane's own error text (for example from a failed TagActor after the parent is gone). That text should not reach API clients.

  • Add a small hiddenCause error type, modelled on computeFailure: the message is the typed reason plus the parent, tag, clone or child involved, while errors.Is and errors.As still reach the original error.

  • Apply it at the fork-path sites that leaked: parent gone or superseded during the tag, parent not found, busy tag, create from tag, egress install and clone resume, a clone deleted or replaced before resume, and busy create or resume of a STATELESS_REPLAY child. A failed clone teardown now reports only its error kind in the message; the full error is still logged.

  • Status codes and ErrorInfo reasons are unchanged. Adds a Security changelog fragment and corrects the existing fork tag-cause fragment.
  • Tested with new runtime tests and gRPC tests that inject a sentinel string into the control client error and assert it is absent from the status message for FAILED_PRECONDITION and ABORTED (stateful and replay forks), while the cause stays reachable from Go. go test -race ./runtime/substrate/ ./session/ ./placement/ passes.

    Diff: 828 lines (+768 / -60) across 9 files Reviewer: None requested Review duration: 249m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.67) × (1 − Review Confidence (0.62)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.67 · 828 lines diff across 9 files
    0.67
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.45 · 1 substantive comment(s)
    0.45
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    61%
    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.400
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 item
    "Review active on #277"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    aramase aramase
    Labels
    risk: low confidence: 61.6% 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: 66.7% (HIGH) · Higher = larger blast radius
    66.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: 61.6% · Lower = rushed or shallow review
    61.6%
    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: 25.6% · Safe to merge
    25.6%