← Back to Pull requests

try-mainnet.sh: wait for the IC API to list a new canister, and add link #43

Closed
unknown closed this pull request without merging on Nov 06, 2026 11:06 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 08:50 UTC
Author

Behrad's first mainnet run of try-mainnet.sh install --subnet re2t4-… failed after the wallet was installed. Canister w7ojd-oyaaa-aaaay-aad6a-cai was created and installed, then the subnet check failed. ic-api.internetcomputer.org/api/v3/canisters/<id> answered 404, because the API had not listed the new canister yet. curl -f failed, JSON.parse("") threw, set -e stopped the script, and the claim link was never printed.

What changes

  • subnet_of prints nothing when the API does not list the canister: a 404, a network error or JSON it cannot read.

  • The subnet check after install:

  • - It retries every 15 seconds for up to five minutes.
    - If the API names another subnet, it still stops, and now prints the stop and delete commands.
    - If the API still has not listed the canister, it says so, prints the curl command to check later, and goes on to print the claim link.
  • link prints the installed wallet's claim link again from .icp/try-mainnet/<env>/.

  • README: documents link and the slow listing.
  • Checked

  • bash -n passes.

  • link with a saved key prints https://<id>.icp0.io/claim#<seed>, the same seed as the install's link. Without state, it exits 1 with "run install first".

  • subnet_of prints an empty string when the fetch fails, and the name when the JSON has subnet_id.

  • Not run on mainnet: this container cannot reach ic-api.internetcomputer.org.
  • ---
    _Generated by Claude Code_

    Diff: 189 lines (+141 / -48) across 2 files Reviewer: b3hr4d Review duration: 135m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 189 lines diff across 2 files
    0.36
    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.314
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #43"
    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: 35.9% (MEDIUM) · Higher = larger blast radius
    35.9%
    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: 14.2% · Safe to merge
    14.2%