Implementation:3641397194 wq Gpt6 Astra verify release downloads
| Knowledge Sources | |
|---|---|
| Domains | Release_Management, Verification |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
Concrete tool for verifying published release installers via anonymous HTTP range requests — checking status, magic bytes, and size — without using any GitHub credentials, provided by the ColdBrew Zero tools package.
Description
The verify_release_downloads script constructs the 7 installer URLs for a given release version (Windows exe, macOS arm64/x64 dmg+zip, Linux AppImage+deb), then issues anonymous HTTP `Range: bytes=0-31` requests to each. For every URL it verifies:
- The response status is 200 or 206 (partial content).
- The response body is non-empty and not an HTML error page.
- The first bytes match the expected file magic (`MZ` for exe, `PK\x03\x04` for zip, `\x7fELF` for AppImage, `!<arch>\n` for deb).
- The total size (from Content-Range or Content-Length) exceeds 32 bytes.
Requests are retried with exponential backoff (up to `--attempts` times, default 3) and run concurrently (4 workers). The script outputs a JSON report and exits non-zero if any check fails. No cookies, Authorization headers, credential helpers, or environment tokens are used — verification is purely anonymous.
Usage
- Release verification: run after a release to confirm all installers are downloadable and well-formed.
- CI gate: use as a post-release smoke test; non-zero exit fails CI.
- Custom repo/version: pass `--repo owner/name` and `--version x.y.z` to verify arbitrary releases.
Code Reference
Source Location
- Repository: ColdBrew Zero
- File: tools/verify_release_downloads.py
- Lines: 1-88
Signature
def asset_names(version: str) -> list[str]
def check_asset(url: str, opener=urllib.request.urlopen) -> dict
def main(argv=None) -> int # 0 = all ok, 1 = any failure
Import
# Standalone script — run directly:
# python3 tools/verify_release_downloads.py [--repo OWNER/REPO] [--version X.Y.Z] [--attempts N] [--output FILE]
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| --repo | string | No | GitHub owner/repo (default: 3641397194-wq/gpt6-Astra) |
| --version | string | No | Release version (default: read from VERSION file) |
| --attempts | int | No | Retries per URL, 1-10 (default: 3) |
| --output | Path | No | Write JSON report to this file |
Outputs
| Name | Type | Description |
|---|---|---|
| stdout | string | {ok: false, url, error}] } |
| exit code | int | 0 if all checks passed, 1 if any failed |
| --output file | File | JSON report written to the specified path |
Usage Examples
Verify Current Release
python3 tools/verify_release_downloads.py
# Prints JSON report; exits 0 if all 7 installers pass
Verify a Specific Version
python3 tools/verify_release_downloads.py --version 3.2.0-preview.3 --attempts 5
Save Report to File
python3 tools/verify_release_downloads.py --output release-check.json
cat release-check.json
Programmatic Check
from tools.verify_release_downloads import asset_names, check_asset
urls = [f"https://github.com/3641397194-wq/gpt6-Astra/releases/download/v3.2.0-preview.3/{n}"
for n in asset_names("3.2.0-preview.3")]
for url in urls:
result = check_asset(url)
print(result["url"], result["status"], result["total_bytes"])