Commit 2b093dc
committed
fix(08.1-06): sync __version__ to 0.2.5a1 + accept PEP 440 alpha suffixes in managed-block markers
The package's runtime __version__ in src/supamem/__init__.py had drifted
to 0.2.1 (last bumped manually two release lines ago); pyproject.toml
was the only updated source. `supamem --version` reported 0.2.1 even
on the freshly-built 0.2.5a1 wheel. Sync to match pyproject.
While re-smoking, the version bump exposed a second bug: the managed-
block fence regex in config_io._FENCE_RE / _BEGIN_RE and doctor._VERSION_RE
matched only `v[\d\.]+`, which rejects PEP 440 pre-release versions
that contain letters (e.g. 0.2.5a1, 1.0.0rc2, 2.1.dev0). Effect:
`supamem install` was no-longer idempotent on alpha versions — the
second run could not find the existing block and appended a duplicate
to ~/CLAUDE.md.
Widen the char-class to `[\w\.\+\-]+` (covers PEP 440 letters,
digits, dots, plus, minus, underscore — full release-segment shape).
Both fence-pair detection and doctor's drift probe now round-trip
cleanly across alpha releases. Confirmed by:
- tests/test_install_claude_code.py + test_install_opencode.py: green
- uv run pytest -q: 504 passed, 1 skipped
- Fresh-venv smoke: `supamem --version` reports 0.2.5a1; second
`install()` is a true no-op (no duplicate managed block)
Auto-fix per gsd-execute-phase Rule 1 (bug discovered during release
smoke; fix is in-scope for the version bump that exposed it).1 parent 27baeee commit 2b093dc
3 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | | - | |
| 184 | + | |
181 | 185 | | |
182 | | - | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | | - | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
0 commit comments