You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The five coupled libraries' source __version__ literals are deliberately frozen between releases (wheels are sed-stamped at build time; per-release bump commits to library mains caused the June/July 2026 accidental-release cascade, PyAutoBuild#118/#120). In-session research (full readers/writers map + check_version handshake mechanics) rejected migrating to a derived importlib.metadata version — local dev resolves via PYTHONPATH with no dist metadata, so it would only add per-run warnings while breaking the release sed. Instead: perform the deliberate manual sync to 2026.8.17.1, document the freeze in-line, and harden the release machinery so the loose sed can never silently ship a broken wheel.
Plan
Sync the five __version__ literals from 2026.7.23.1 to 2026.8.17.1, each with a one-line comment documenting the freeze design (tag/wheel = release truth; literal = last manual sync).
Delete the three dead legacy release.sh stampers (unreferenced; their grep -v __version__ rewrite would mangle any future multi-line stamp).
Add a post-sed guard in the release workflow: after each version-stamp sed, ast.parse the stamped __init__.py and assert the exact __version__ = "$VERSION" line, failing the build loudly otherwise.
In each of autonerves/__init__.py:119, autoarray/__init__.py:110, autofit/__init__.py:163, autogalaxy/__init__.py:134, autolens/__init__.py:154: set __version__ = "2026.8.17.1" preceded by a one-line comment: last manual sync; wheels are stamped at build time by the release workflow; git tag is release truth; deliberately not bumped per release (PyAutoBuild#118/feat: release stamping slim — wheels+tags only, no daily bump commits (R3-core) #120).
Delete PyAutoLens/release.sh, PyAutoArray/files/release.sh, PyAutoFit/files/release.sh (dead: no callers anywhere in the workspace; only release.sh reference is PyAutoBrain's unrelated release conductor).
In PyAutoHands/.github/workflows/release.yml, after the stamp sed in both the rehearsal build (~line 136) and the live build (~line 431): verify with python3 -c "import ast,sys; ast.parse(open(f).read())" over each stamped */__init__.py and grep -F "__version__ = \"$VERSION\"", exiting non-zero with a clear ::error:: if either fails. The current sed pattern [\."\'0-9]* is unanchored/zero-or-more and empirically corrupts non-literal assignments into SyntaxErrors — the guard converts that silent failure mode into a loud one.
Verify: ast.parse the five edited files locally; confirm PyAutoBrain/bin/version_drift.sh still resolves all five stamps (consensus at 2026.8.17.1); library test suites unaffected (zero __version__ assertions — verified by research).
Key Files
PyAutoHands/.github/workflows/release.yml — the two stamp seds + new guards
Version-stamp sync to 2026.8.17.1 + release-sed guards
Type: maintenance
Target: libraries
Repos:
@PyAutoNerves
@PyAutoArray
@PyAutoFit
@PyAutoGalaxy
@PyAutoLens
@PyAutoHands
Difficulty: small
Autonomy: safe
Priority: medium
Status: draft
Original request (verbatim): "should we even bother with having these versions?
I think we should but if so they should update?" → "ok do it but do a bit more
deep research on the source code first to make sure its the right approach".
In-session research (2026-08-17, full readers/writers map + handshake
mechanics) concluded the derive-from-importlib.metadata migration is
net-negative for this stack: local dev resolves libs via PYTHONPATH (no dist
metadata → fallback always taken → per-run check_version UserWarning), the
release stamp sed would corrupt a try/except block into SyntaxError wheels,
assistant chat-bundle regeneration would publish dev stamps to users, and
per-release bump commits to library mains are the documented cause of the
June/July 2026 accidental-release cascade (PyAutoBuild#118/#120). Human chose
the manual-sync-plus-guards package instead:
Sync the five frozen __version__ literals from 2026.7.23.1 to the
latest release 2026.8.17.1 (same deliberate manual sync that produced
7.23): autonerves/__init__.py:119, autoarray/__init__.py:110, autofit/__init__.py:163, autogalaxy/__init__.py:134, autolens/__init__.py:154. Add a one-line comment at each stamp site
documenting the freeze design (git tag / stamped wheel = release truth;
this literal = last manual sync, deliberately NOT bumped per release).
Delete the three dead legacy stampers — PyAutoLens/release.sh, PyAutoArray/files/release.sh, PyAutoFit/files/release.sh — unreferenced,
and their grep -v __version__ rewrite would mangle any future refactor of
the stamp lines.
Guard the live release seds in PyAutoHands/.github/workflows/release.yml (~136 rehearsal build, ~431 live
build): after each sed, verify the stamped __init__.py still parses
(python3 -c "import ast; ast.parse(...)") and contains the exact __version__ = "$VERSION" line, failing the job loudly otherwise. The sed's
unanchored zero-or-more pattern was empirically shown to be able to ship a
SyntaxError wheel silently.
Supersedes nerves_version_stamp_behind_consensus.md (its drift already
resolved — all five stamps read 2026.7.23.1; the pre_build stamp-sweep question
it raised is moot since pre_build no longer stamps versions). While in version_drift.sh territory: no change needed there — literal date stamps
remain grep-able after this task.
Overview
The five coupled libraries' source
__version__literals are deliberately frozen between releases (wheels are sed-stamped at build time; per-release bump commits to library mains caused the June/July 2026 accidental-release cascade, PyAutoBuild#118/#120). In-session research (full readers/writers map +check_versionhandshake mechanics) rejected migrating to a derivedimportlib.metadataversion — local dev resolves viaPYTHONPATHwith no dist metadata, so it would only add per-run warnings while breaking the release sed. Instead: perform the deliberate manual sync to2026.8.17.1, document the freeze in-line, and harden the release machinery so the loose sed can never silently ship a broken wheel.Plan
__version__literals from2026.7.23.1to2026.8.17.1, each with a one-line comment documenting the freeze design (tag/wheel = release truth; literal = last manual sync).release.shstampers (unreferenced; theirgrep -v __version__rewrite would mangle any future multi-line stamp).ast.parsethe stamped__init__.pyand assert the exact__version__ = "$VERSION"line, failing the build loudly otherwise.Detailed implementation plan
Affected Repositories
Branch Survey
Suggested branch:
feature/version-stamp-sync-guardsImplementation Steps
autonerves/__init__.py:119,autoarray/__init__.py:110,autofit/__init__.py:163,autogalaxy/__init__.py:134,autolens/__init__.py:154: set__version__ = "2026.8.17.1"preceded by a one-line comment: last manual sync; wheels are stamped at build time by the release workflow; git tag is release truth; deliberately not bumped per release (PyAutoBuild#118/feat: release stamping slim — wheels+tags only, no daily bump commits (R3-core) #120).PyAutoLens/release.sh,PyAutoArray/files/release.sh,PyAutoFit/files/release.sh(dead: no callers anywhere in the workspace; onlyrelease.shreference is PyAutoBrain's unrelated release conductor).PyAutoHands/.github/workflows/release.yml, after the stamp sed in both the rehearsal build (~line 136) and the live build (~line 431): verify withpython3 -c "import ast,sys; ast.parse(open(f).read())"over each stamped*/__init__.pyandgrep -F "__version__ = \"$VERSION\"", exiting non-zero with a clear::error::if either fails. The current sed pattern[\."\'0-9]*is unanchored/zero-or-more and empirically corrupts non-literal assignments into SyntaxErrors — the guard converts that silent failure mode into a loud one.ast.parsethe five edited files locally; confirmPyAutoBrain/bin/version_drift.shstill resolves all five stamps (consensus at 2026.8.17.1); library test suites unaffected (zero__version__assertions — verified by research).Key Files
PyAutoHands/.github/workflows/release.yml— the two stamp seds + new guardsautonerves|autoarray|autofit|autogalaxy|autolens/__init__.py— stamp sync + freeze commentPyAutoLens/release.sh,PyAutoArray/files/release.sh,PyAutoFit/files/release.sh— deleteOriginal Prompt
Click to expand starting prompt
Version-stamp sync to 2026.8.17.1 + release-sed guards
Type: maintenance
Target: libraries
Repos:
Difficulty: small
Autonomy: safe
Priority: medium
Status: draft
Original request (verbatim): "should we even bother with having these versions?
I think we should but if so they should update?" → "ok do it but do a bit more
deep research on the source code first to make sure its the right approach".
In-session research (2026-08-17, full readers/writers map + handshake
mechanics) concluded the derive-from-
importlib.metadatamigration isnet-negative for this stack: local dev resolves libs via
PYTHONPATH(no distmetadata → fallback always taken → per-run
check_versionUserWarning), therelease stamp sed would corrupt a
try/exceptblock into SyntaxError wheels,assistant chat-bundle regeneration would publish dev stamps to users, and
per-release bump commits to library mains are the documented cause of the
June/July 2026 accidental-release cascade (PyAutoBuild#118/#120). Human chose
the manual-sync-plus-guards package instead:
__version__literals from2026.7.23.1to thelatest release
2026.8.17.1(same deliberate manual sync that produced7.23):
autonerves/__init__.py:119,autoarray/__init__.py:110,autofit/__init__.py:163,autogalaxy/__init__.py:134,autolens/__init__.py:154. Add a one-line comment at each stamp sitedocumenting the freeze design (git tag / stamped wheel = release truth;
this literal = last manual sync, deliberately NOT bumped per release).
PyAutoLens/release.sh,PyAutoArray/files/release.sh,PyAutoFit/files/release.sh— unreferenced,and their
grep -v __version__rewrite would mangle any future refactor ofthe stamp lines.
PyAutoHands/.github/workflows/release.yml(~136 rehearsal build, ~431 livebuild): after each
sed, verify the stamped__init__.pystill parses(
python3 -c "import ast; ast.parse(...)") and contains the exact__version__ = "$VERSION"line, failing the job loudly otherwise. The sed'sunanchored zero-or-more pattern was empirically shown to be able to ship a
SyntaxError wheel silently.
Supersedes
nerves_version_stamp_behind_consensus.md(its drift alreadyresolved — all five stamps read 2026.7.23.1; the pre_build stamp-sweep question
it raised is moot since pre_build no longer stamps versions). While in
version_drift.shterritory: no change needed there — literal date stampsremain grep-able after this task.