← Back to Pull requests

Add scripts to support updating template and stub hashes. #395

Closed
unknown closed this pull request without merging on Sep 14, 2026 03:15 UTC
View on GitHub
unknown unknown commented on Sep 08, 2026 05:59 UTC
Author

Briefcase v0.4.5 introduces the need to provide hashes for support packages and stub binaries. These are labor intensive to update by hand; so these are some scripts that automate the process of generating those updates.

The code is here rather than in the individual template repositories because there is enough commonality in the code for determining the newest release and updating templates that it's worth sharing.

Usage:
python scripts/update_stub.py path/to/template - determines the latest stub binary for the given template, updates the stub binary value, and updates the hashes to match
python scripts/update_support.py path/to/template - determines the latest support packages for the given template, and updates the hashes to match. This means:
- Github releases of Python-Apple-support for macOS and iOS templates
- Github releases of astral-sh/Python-build-standalone for Linux templates
- Python.org embeddable releases for Windows templates.

The intention is that these scripts will eventually be added as GitHub workflows to automatically update support packages (either on a manual trigger, or on a cron cadence)

There's no tests because the code is an internal utility, and failure will become evident fairly quickly when the update script fails.

Also removes the vestigial references to pygame workflows, since those were removed in Briefcase v0.4.5.

PR Checklist:


<!--- Go over all the following points, and put an x in all the boxes that apply. -->
  • I will abide by the BeeWare Code of Conduct

  • I have read and have followed the CONTRIBUTING.md file

  • This PR was generated or assisted using an AI tool

  • Assisted-by: Claude Sonnet 5

    Diff: 215 lines (+161 / -54) across 2 files Reviewer: glasnt Review duration: 8475m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 215 lines diff across 2 files
    0.37
    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.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #395"
    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: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    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: 15.8% · Safe to merge
    15.8%