fix(install): stamp .graphify_version only for the platform being installed (#2694) - #2777
fix(install): stamp .graphify_version only for the platform being installed (#2694)#2777ousamabenyounes wants to merge 1 commit into
Conversation
…talled (Graphify-Labs#2694) graphify install advanced the .graphify_version stamp of every other already-installed platform even when it did not rewrite that platform's SKILL.md, so a not-upgraded platform carried a current stamp and its "skill is from graphify X, package is Y" refresh warning was silently suppressed. Each platform's own install path already stamps the content it writes, so drop the cross-platform stamp refresh and let each stamp track its own real content freshness.
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
This PR removes the _refresh_all_version_stamps helper from graphify/install.py (and its re-export in __main__.py), which previously bumped the .graphify_version stamp of all other already-installed platforms after a global install. As a result, install no longer touches version stamps for platforms it didn't re-write during a given run. It also adds a new regression test (tests/test_install_version_stamp.py) covering that installing one platform leaves another platform's stamp untouched, plus a CHANGELOG entry describing the change.
No blocking issues surfaced. 1 lower-confidence candidate did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 572 functions depend on the 342 functions this change touches.
Health — this change adds coupling hotspots:
- new:
dispatch_command()— 2 callers, 117 callees - new:
codebuddy_install()— 20 callers, 5 callees - new:
claude_install()— 19 callers, 4 callees - new:
gemini_install()— 10 callers, 7 callees - new:
claude_uninstall()— 17 callers, 4 callees - new:
_project_uninstall()— 5 callers, 13 callees - new:
dispatch_install_cli()— 2 callers, 31 callees - new:
codebuddy_uninstall()— 14 callers, 4 callees - …and 13 more
Verification — 572 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 572 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify install.
The verifier did not have enough to check install, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: not verifiable: all 23 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)
· 21 more finding(s) on lines outside this diff (see the check run).
|
Landed in v0.9.45, just published to PyPI. Cherry-picked onto |
Fix #2694 (remaining version-stamp half; the
CLAUDE_CONFIG_DIRhalf landed in v0.9.44).Problem
graphify install --platform Xcalls_refresh_all_version_stamps(), which writes the current__version__into.graphify_versionfor every already-installed platform's skill dir — including platforms whoseSKILL.mdthis run never rewrote. Their content is still stale, but the fresh stamp makes_check_skill_versionskip theskill is from graphify X, package is Y. Run 'graphify install' to update.warning. The stamp asserts a refresh that never happened, so the user is never prompted to update the genuinely-stale skill.Fix
Each platform's own install path (
_copy_skill_file) already writes that platform's.graphify_versionwhen it (re)writes the skill content. So the cross-platform refresh is pure over-stamping: remove_refresh_all_version_stamps(), its call ininstall(), and its re-export. A platform's stamp now advances only when its own content is (re)written, keeping the staleness warning truthful. This is the direction the issue requests: "Only stamp.graphify_versionfor platforms whose skill content was actually (re)written in this run; leave other platforms' stamps untouched."Test verification (RED → GREEN)
New focused regression test
tests/test_install_version_stamp.py: seedcodexas a previously-installed platform stamped at an old version, theninstall("claude"), and assert codex's stamp is untouched while claude's is current.RED (on unmodified
v8, before the fix):GREEN (with the fix):
Full local suite
uv run --frozen pytest tests/ -q→ 4514 passed, +1 new test; the only 3 failures (tests/test_ollama.py::test_detect_backend_*) are pre-existing on unmodifiedv8too — a localGEMINI_API_KEYenv leak, unrelated to this change (they pass with the var unset).skillgen --check/--audit-coverage/--always-on-roundtrip: OK (no generated files touched).