← Back to Pull requests

fix(release): name the cause of a swallowed step failure #2431

Closed
unknown closed this pull request without merging on Oct 20, 2026 16:58 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 16:23 UTC
Author

Summary

Every release step adapter that caught an exception returned a bare unknown, so scripts/release.sh resume printed only request status: unknown for prepare, publication and deployment failures. During 2.0.122.0, three resume rounds passed before a missing emsdk surfaced, and two more before a creator proof timeout did. Each round costs 25–30 minutes. This is item 1 of the "now" plan in #2422.

Change

  • Observation gains a console-only diagnostic:

  • - excluded from equality;
    - allowed only on unknown or conflict;
    - bounded to 400 characters.
  • The prepared, publication and deployment carriers, and the driver's own catch sites (observe, managed advance, backend advance, execute), fill it through the new commands.describe_failure:

  • - errors raised by tools.release keep their authored why/remedy message and a command's detail, both passed through the existing sanitize_diagnostic (credentials, tokens, NAME=value, absolute paths removed);
    - any other exception contributes its type name only, following the boundary set by the Build 87 transport repair in the gate-failure-readability pitfall.
  • The driver writes the cause to a private <request>.failure note beside the journal:

  • - file mode 0600;
    - only the latest failure is kept;
    - the note is cleared when the request completes.
  • resume and status print the note as last failure: <step> <status> at <utc>: <cause>.

  • The cause never enters the request state, its digest or DriveResult. The existing tests asserting that upstream text never reaches the public status pass unchanged.

  • Journal admission and listing only read .json and .alias entries, so the note is inert there.
  • Example, for the 2.0.122.0 emsdk case:

    last failure: prepared unknown at 2026-10-20T03:00:00Z: CommandError: release command failed: bash (exit 1): Creator Web error: EMSDK is not configured
    

    Related Issue

    Related issue: #2422

    Verification

    Current head: 147d5d1b534a7fee2cee73910f106e99b768fc08.

    New tests:

  • release_prepared_step_test: a CommandError cause is kept and its token redacted; a foreign RuntimeError yields only RuntimeError.

  • release_orchestration_driver_test:

  • - the note is written with mode 0600 and contains no credential, token or URL userinfo;
    - the result and the request state carry no failure text;
    - a foreign exception records its type only;
    - a later complete run clears the note;
    - a diagnostic is rejected on pending, on an over-long string and on an empty string, and two observations differing only in diagnostic compare equal.
  • release_cli_orchestration_test: run and status print the last failure line, never the foreign exception's text, and status drops it after a successful resume.
  • Mutation proof: with orchestration_driver.py and prepared_step.py restored to main, the new driver tests fail (1 failure, 2 errors) and the prepared-step test errors. With the change, all pass.

  • release_orchestration_driver_test, release_orchestration_test, release_cli_orchestration_test, release_prepared_step_test, release_publication_effect_test, release_deployment_effect_test, release_managed_dispatch_test, release_command_output_test: OK.

  • python3 tests/build/ci_pitfall_ledger_test.py: OK.

  • git diff --cached --check: clean.

  • All tests/build/release_*_test.py suites: see the follow-up comment.
  • CI Scope

    Expected mode: focused
    Expected selected lanes: ci_contract deploy_contract docs_static
    Expected skipped lanes: core_asan core_coverage core_macos core_ubuntu creator package portal web_runtime_host web_runtime_lab web_toolchain
    ci:full required: no
    Reason: release tooling, its Python tests and one pitfall entry.

    Version Management

    Version impact: none
    Reason: release tooling diagnostics only; no Module, Host, Contract or Product identity changes.

    Documentation Impact

    Documentation impact: none
    Affected portal pages:
    Reason: operator console output and a private local journal note only; no portal page or documented behaviour changes.

    Pitfall Impact

    Pitfall impact: recurrence gate-failure-readability

    Merge Danger

    Door: two-way
    Blast Radius: release driver console output and one new private journal-side file.
    No step outcome, journal state or evidence changes; only what the operator sees when a step is not verified.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none

    🤖 Generated with Claude Code

    Diff: 566 lines (+424 / -142) across 7 files Reviewer: endaye Review duration: 34m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 566 lines diff across 7 files
    0.50
    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%
    60%
    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.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2431"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 49.7% (MEDIUM) · Higher = larger blast radius
    49.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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 19.6% · Safe to merge
    19.6%
    Repository