test(install): assert stale untouched platform still warns end-to-end (#2694)

Adds the end-to-end assertion the version-stamp fix was really about: after
installing one platform, a different stale platform actually emits the
staleness warning on stderr (the behavior the over-stamping suppressed). Adds
the CHANGELOG entry closing #2694.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
safishamsi
2026-08-16 18:34:11 +01:00
co-authored by Claude Opus 4.8
parent a59a4e812e
commit 7addee1159
2 changed files with 28 additions and 0 deletions
+1
View File
@@ -4,6 +4,7 @@ Full release notes with details on each version: [GitHub Releases](https://githu
## 0.9.45 (unreleased)
- Fix: `graphify install <platform>` now advances the `.graphify_version` stamp only for the platform it actually (re)writes, instead of stamping every installed platform as current; a platform whose skill content was left untouched keeps its old stamp so its staleness warning stays truthful (#2694, thanks @ousamabenyounes). This completes #2694 (the CLAUDE_CONFIG_DIR half shipped in 0.9.44).
- Fix: loading a `graph.json` that contains a hyperedge with no `id` field (the semantic extractor emits them and they persist verbatim) no longer crashes the incremental re-extract with `KeyError: 'id'`; id-less hyperedges are tolerated and retained (#2775, thanks @ousamabenyounes).
## 0.9.44 (2026-08-15)
+27
View File
@@ -47,3 +47,30 @@ def test_install_does_not_bump_other_platforms_stamp(tmp_path, monkeypatch):
assert codex_stamp.read_text() == _STALE_STAMP, (
"installing claude must not advance codex's version stamp (#2694)"
)
def test_stale_untouched_platform_still_emits_warning(tmp_path, monkeypatch, capsys):
"""End-to-end (#2694): after installing one platform, a different stale
platform must actually EMIT the staleness warning — the behavior the
over-stamping bug suppressed."""
home = tmp_path / "home"
home.mkdir()
monkeypatch.chdir(tmp_path)
real_check = mainmod._check_skill_version # keep the real warner for the assertion
with patch("graphify.__main__.Path.home", return_value=home):
codex_skill = mainmod._platform_skill_destination("codex", project=False)
codex_skill.parent.mkdir(parents=True, exist_ok=True)
codex_skill.write_text("stale skill body", encoding="utf-8")
(codex_skill.parent / ".graphify_version").write_text(_STALE_STAMP, encoding="utf-8")
with patch.object(mainmod, "_check_skill_version", lambda _: None):
mainmod.install("claude") # install noise silenced
capsys.readouterr() # drop install output
real_check(codex_skill) # now run the real warner on the untouched platform
err = capsys.readouterr().err
assert _STALE_STAMP in err and "update" in err, (
f"stale codex platform should warn, got stderr: {err!r}"
)