Repository navigation
Conversation
…y-Labs#3805) When ~/.claude/CLAUDE.md is a symlink, the registration block is written into the file it points to, but install only printed the link path, so a rules file elsewhere changed without any mention. Print `link -> target` for symlinks on install and on the project-scoped removal path.
|
Thanks for the pull request, @bercedev. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Formal verification. 2 change(s) tested, no difference found (not proven).
Graphify review — findings
When CLAUDE.md (or another always-on registration target) is a symlink, install and uninstall output now names both the link and the file it resolves to (link -> target). Writes go through to the target, and printing only the link hid which file actually changed. _shown_path handles this, falling back to the plain path for regular files, so non-symlink output is unchanged.
Worth a look
- Symlink-only CLAUDE.md uninstall leaves registration in target —
graphify/install.py:425· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 594 functions depend on the 325 functions this change touches.
Health — this change adds coupling hotspots:
- new:
main()— 98 callers, 3 callees - new:
dispatch_command()— 2 callers, 126 callees - new:
install()— 14 callers, 11 callees - new:
_copy_skill_file()— 15 callers, 7 callees - new:
codebuddy_install()— 20 callers, 5 callees - new:
_refresh_stale_skills()— 25 callers, 4 callees - new:
gemini_install()— 11 callers, 7 callees - new:
claude_install()— 19 callers, 4 callees - …and 20 more — each is listed as a finding
Verification — 594 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: 513 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
32 of 308 test file(s) selected (10%) via static blast radius.
tests/test_affected_cli.py— impacttests/test_agents_platform.py— impacttests/test_atomic_version_stamp.py— impacttests/test_claude_md.py— impacttests/test_codebuddy.py— impacttests/test_devin.py— impacttests/test_explain_cli.py— impacttests/test_extract_cli.py— impacttests/test_gemini_hook.py— impacttests/test_global_add_tag_inference.py— impacttests/test_god_nodes_cli.py— impacttests/test_hollow_chunks_arm_shrink_guard.py— impacttests/test_home_sandbox.py— impacttests/test_hook_strict.py— impacttests/test_incomplete_build_guard.py— impacttests/test_install.py— impact, changed-testtests/test_install_references.py— impacttests/test_install_strings.py— impacttests/test_install_version_warning.py— impacttests/test_merge_chunks_validation.py— impacttests/test_multigraph_diagnostics.py— impacttests/test_no_dedup_flag.py— impacttests/test_path_cli.py— impacttests/test_query_cli.py— impacttests/test_query_induced_edges.py— impacttests/test_read_hook.py— impacttests/test_replace_or_append_section.py— impacttests/test_search_hook.py— impacttests/test_skill_auto_refresh.py— impacttests/test_skill_version_warning.py— impacttests/test_uninstall_scope.py— impacttests/test_unverified_semantic_shrink.py— impact
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
No difference found (not proven): No behavior difference found in \_register\_always\_on\_block (not a proof).
The verifier ran both versions of \_register\_always\_on\_block on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
No difference found (not proven): No behavior difference found in \_remove\_claude\_skill\_registration (not a proof).
The verifier ran both versions of \_remove\_claude\_skill\_registration on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
· 28 more finding(s) on lines outside this diff (see the check run).
Solidity free functions (#3906), VB.NET qualified calls (#3909), Astro frontmatter-only AST pass (#3902), surprise bonus/reason alignment (#3934), exclude-hubs stranded-neighbour (#3933), graph-DB push index (#3957), label retry keep-named (#3956), stale-hook status (#3951), virtual-workspace Cargo.toml skip (#3930), and symlinked-instructions install/uninstall handling (#3950/#3953). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Shipped in v0.9.73 (now on PyPI) via an authorship-preserving cherry-pick, so your commit keeps contributor-graph credit. Thanks @bercedev! |
What does this PR do?
Refs #3805 (ask 1 only).
When
~/.claude/CLAUDE.mdis a symlink,installwrites the registration block into the file the link points to, but the output only named the link:So a rules file somewhere else got changed and nothing in the output said so. This adds a small
_shown_pathhelper that printslink -> targetwhen the path is a symlink, and uses it in the three places that report a write to that file:skill registered in,created at, and the project-scopedregistration removed from. Paths that aren't symlinks print the same as before.The issue's repro, after the fix:
The link itself is left alone, and the block still goes into
rules.mdexactly as before. The only change is in what gets printed.Type of change
Verification & Invariants
Invariant: when install or uninstall edits a file through a symlink, the output names the file that was actually changed. Where the block is written, what it contains, and the link are all unchanged.
Limitations:
--no-claude-md/--skill-onlyopt-out) and ask 3 (whether the block is still needed for--platform claude) add a CLI flag or change a default, so I left them for you to decide. I'm happy to follow up on either one.How was this tested?
The new tests cover a symlink to an existing file, a symlink whose target doesn't exist yet (so
created at), and the project-scoped removal. The symlink tests are skipped on Windows, because creating symlinks there needs admin rights.I also ran the repro above with a fake
HOME, before and after the change. Before, the output named only the link. After, it names both the link andrules.md.Graphify-specific checklist
uv run python -m tools.skillgen --bless) when changing their source fragments.Note: I used Claude Code while working on this fix. I reviewed and ran all of it myself.