Skip to content

fix(install): stamp .graphify_version only for the platform being installed (#2694) - #2777

Closed
ousamabenyounes wants to merge 1 commit into
Graphify-Labs:v8from
ousamabenyounes:fix/issue-2694
Closed

fix(install): stamp .graphify_version only for the platform being installed (#2694)#2777
ousamabenyounes wants to merge 1 commit into
Graphify-Labs:v8from
ousamabenyounes:fix/issue-2694

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Fix #2694 (remaining version-stamp half; the CLAUDE_CONFIG_DIR half landed in v0.9.44).

Problem

graphify install --platform X calls _refresh_all_version_stamps(), which writes the current __version__ into .graphify_version for every already-installed platform's skill dir — including platforms whose SKILL.md this run never rewrote. Their content is still stale, but the fresh stamp makes _check_skill_version skip the skill 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_version when it (re)writes the skill content. So the cross-platform refresh is pure over-stamping: remove _refresh_all_version_stamps(), its call in install(), 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_version for 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: seed codex as a previously-installed platform stamped at an old version, then install("claude"), and assert codex's stamp is untouched while claude's is current.

RED (on unmodified v8, before the fix):

E   assert '0.9.44' == '0.0.1-old'
FAILED tests/test_install_version_stamp.py::test_install_does_not_bump_other_platforms_stamp

GREEN (with the fix):

tests/test_install_version_stamp.py::test_install_does_not_bump_other_platforms_stamp PASSED
1 passed

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 unmodified v8 too — a local GEMINI_API_KEY env leak, unrelated to this change (they pass with the var unset).
  • skillgen --check / --audit-coverage / --always-on-roundtrip: OK (no generated files touched).
  • Install/uninstall round-trip suites: green.

…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.

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@safishamsi

Copy link
Copy Markdown
Collaborator

Landed in v0.9.45, just published to PyPI. Cherry-picked onto v8 with your authorship preserved in the commit, so both the change and the credit are in the history. Thanks @ousamabenyounes. Closing since it is now released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants