Skip to content

Commit 5dae7e0

Browse files
Fix Windows installer stamping itself as beta.3 (#10)
Codex reported: installer/windows/setup.iss's MyAppVersion -- baked into the built .exe as its AppVersion, visible in Windows' Programs & Features and the installer's own properties -- was still 0.1.0-beta.3 after v0.1.0-beta.4 was tagged and released. The advertised beta.4 download would therefore install and register itself as beta.3, misleading for version reporting and upgrade diagnosis. Bump MyAppVersion to 0.1.0-beta.4. Add a regression test cross-checking it against docs/index.html's JSON-LD softwareVersion field -- there's no single VERSION file in this repo, so this catches future drift without introducing new shared state.
1 parent 8f41639 commit 5dae7e0

3 files changed

Lines changed: 44 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ installation and successfully launches Socials Studio -- see README.md's Testing
151151

152152
### Fixed
153153

154+
- **The Windows installer stamped itself as beta.3 after v0.1.0-beta.4 was released.** Reported by
155+
Codex review: `installer/windows/setup.iss`'s `MyAppVersion` -- baked into the built `.exe` as
156+
its `AppVersion`, visible in Windows' Programs & Features and the installer's own properties --
157+
was left at `0.1.0-beta.3`, so the advertised beta.4 download would install and register itself
158+
as beta.3, misleading for version reporting and upgrade diagnosis. Fixed by bumping
159+
`MyAppVersion` to `0.1.0-beta.4`. Added a regression test cross-checking it against
160+
`docs/index.html`'s JSON-LD `softwareVersion` field, since there's no single VERSION file in this
161+
repo to check against instead.
154162
- **Linux setup no longer mistakes Chromium for the required Google Chrome.** Reported by Codex
155163
review: `installer/bootstrap.py`'s Linux Chrome detection accepted `chromium` and
156164
`chromium-browser` in addition to real Chrome executable names, but

installer/windows/setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
; succeeded is reported from the real CI run, not asserted in this comment.
5151

5252
#define MyAppName "Socials Studio"
53-
#define MyAppVersion "0.1.0-beta.3"
53+
#define MyAppVersion "0.1.0-beta.4"
5454
#define MyAppPublisher "Socials Studio (independent, community project)"
5555
#define MyAppURL "https://github.com/tradewithmeai/socials-studio"
5656
#ifndef MyOutputBaseFilename

tests/test_installer_setup_iss.py

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,24 @@
88
"IPersistFile::Save failed; code 0x80070005. Access is denied." targeting
99
"C:\\Users\\Public\\Desktop\\Socials Studio.lnk". {userdesktop} (the current
1010
user's own desktop) never has that problem.
11+
12+
Also guards against a Codex-reported regression: setup.iss's MyAppVersion
13+
(baked into the built .exe as its AppVersion) was left at "0.1.0-beta.3"
14+
after v0.1.0-beta.4 was tagged and released, so the advertised beta.4
15+
download would have installed and registered itself as beta.3 -- misleading
16+
for version reporting and upgrade diagnosis. There's no single VERSION file
17+
in this repo; the version string is repeated across a few files, so this
18+
test cross-checks setup.iss against docs/index.html's machine-readable
19+
JSON-LD softwareVersion field rather than introducing new shared state.
1120
"""
1221
from __future__ import annotations
1322

23+
import re
1424
from pathlib import Path
1525

16-
SETUP_ISS = (
17-
Path(__file__).resolve().parent.parent / "installer" / "windows" / "setup.iss"
18-
).read_text(encoding="utf-8")
26+
REPO_ROOT = Path(__file__).resolve().parent.parent
27+
SETUP_ISS = (REPO_ROOT / "installer" / "windows" / "setup.iss").read_text(encoding="utf-8")
28+
DOCS_INDEX_HTML = (REPO_ROOT / "docs" / "index.html").read_text(encoding="utf-8")
1929

2030

2131
def test_privileges_required_is_lowest():
@@ -66,3 +76,25 @@ def test_desktopicon_task_still_declared():
6676
"""The `desktopicon` task itself (which makes the shortcut opt-in, not
6777
automatic) must still exist."""
6878
assert 'Name: "desktopicon"' in SETUP_ISS
79+
80+
81+
def test_installer_version_matches_docs_index_software_version():
82+
"""Regression test for the Codex-reported version-drift bug: setup.iss's
83+
MyAppVersion is baked into the built .exe's AppVersion (visible in
84+
Windows' Programs & Features / installer properties). If it isn't bumped
85+
alongside a release, the advertised binary silently installs and
86+
registers itself as an older version. docs/index.html's JSON-LD
87+
softwareVersion field is a machine-readable version marker already
88+
expected to track the current release, so cross-checking against it
89+
catches this drift without introducing a new shared VERSION file."""
90+
iss_match = re.search(r'#define MyAppVersion "([^"]+)"', SETUP_ISS)
91+
assert iss_match, "MyAppVersion not found in setup.iss"
92+
93+
docs_match = re.search(r'"softwareVersion":\s*"([^"]+)"', DOCS_INDEX_HTML)
94+
assert docs_match, "softwareVersion not found in docs/index.html"
95+
96+
assert iss_match.group(1) == docs_match.group(1), (
97+
f"installer/windows/setup.iss's MyAppVersion ({iss_match.group(1)!r}) does not match "
98+
f"docs/index.html's softwareVersion ({docs_match.group(1)!r}) -- the built Windows "
99+
"installer would install and register itself as the wrong version."
100+
)

0 commit comments

Comments
 (0)