Repository navigation
Description
Overview
An untimed urlretrieve to hips2fits stalled in ssl.read and hit the 300 s smoke cap (run 34099198772). autolens_workspace#293 fixed it once, and it returned in four scripts within three weeks (fixed again in autolens_workspace#537). Add a durable check so the pattern cannot return.
Plan
- Add a self-contained step to Heart's reusable
smoke-tests.ymlPR gate (called by autolens_workspace, autogalaxy_workspace and autofit_workspace) that AST-scansscripts/**/*.pyand fails withfile:lineon anyurlretrieve(call, orurlopen(without a timeout. - Workspace
tests/are not run by any CI, so the gate lives centrally: one step covers every workspace caller — no per-workspace mirror needed. - Heart tests execute the step verbatim against planted offending / clean scripts, and pin its position before the install.
Detailed implementation plan
Affected Repositories
- PyAutoHeart (primary)
Suggested branch: feature/no-untimed-network-downloads
Implementation Steps
.github/workflows/smoke-tests.yml— new step "Reject untimed network downloads" after "Reject tracked validation output",python3heredoc, no${{ }}, honoursWORKSPACE_DIR(defaultworkspace).tests/test_workflow_wiring.py— run the step on fixtures: flags urlretrieve and timeout-less urlopen with file:line; passes keyword/positional timeouts; no-op withoutscripts/.- Verify the step passes on current main of all three workspaces.
Key Files
.github/workflows/smoke-tests.ymltests/test_workflow_wiring.py
Original Prompt
Click to expand starting prompt
Guard every workspace script against untimed network downloads
Type: test · Target: autolens_workspace · Repos: autolens_workspace, autogalaxy_workspace, autofit_workspace, PyAutoHeart
Witness: a repo-level check (pytest or a PyAutoHeart/PyAutoHands lint) fails on any urllib.request.urlretrieve( or urlopen( call without timeout= under scripts/, and passes on current main after autolens_workspace#537 merges.
On 2026-09-07 scripts/multi_dataset/features/imaging_and_point_source/modeling.py timed out at the 300 s smoke cap in PyAutoHeart run 34099198772 because an untimed urlretrieve to hips2fits stalled in ssl.read (CI artifact traceback).
autolens_workspace#293 (commit 3920ed30, 2026-07-19) had fixed the identical defect in scripts/cluster/start_here.py, and it came back in four scripts within three weeks (multi_dataset/.../modeling.py, weak/start_here.py, weak/real_data/a2744.py, weak/features/strong_lensing/a2744.py; fixed in autolens_workspace#537).
Add a durable check so the pattern cannot return: scan scripts/**/*.py in each workspace for urlretrieve( and for urlopen( without a timeout= kwarg, fail with the file:line. Decide where it lives (a workspace test_* file that Heart's PR gate already runs, or a shared PyAutoHands lint that every workspace gate calls) and mirror it to the other workspaces that download data.
Do not add retry logic here; the check is the deliverable.
Activity
Jammy2211 commentedon Nov 8, 2026
Shipped
Merged in #327 (merge commit
0b49dd7). The reusablesmoke-tests.ymlPR gate now fails onurlretrieve(or a timeout-lessurlopen(underscripts/**/*.pyin every workspace that calls it. Both pytest legs (3.12 and 3.13) were green.Generated by Claude Code