fix(skills): remove all existing code-review-graph hook entries on reinstall (#558) - #836
fix(skills): remove all existing code-review-graph hook entries on reinstall (#558)#836Blazehue wants to merge 2 commits into
Conversation
|
Thanks. Two parts. The flows change does not fix #569 in the scenario the issue describes. os.path.abspath and Path.resolve at flows.py:489-497 resolve against the process cwd, not the repo root, and incremental_trace_flows never receives the root (tools/build.py:164 has it and does not pass it). Run the MCP server or daemon with cwd outside the repo and the new entry point is still missed. Your test only passes because pytest runs from the repo root. #673 threads repo_root through properly, so I will take that for flows. Please drop the flows.py and test_flows.py hunks. The hooks dedup is worth keeping, with two changes. Remove all existing code-review-graph entries instead of only the first (skills.py:1041-1046 breaks after one match), otherwise users who already accumulated duplicates keep the stale ones. And the regression test passes on main unchanged, since identical reinstalls were already deduped. Seed an old-style absolute-path hook and assert it is replaced. #576 is already fixed on main and closed, so drop it from the description. |
6c733eb to
059f559
Compare
I'll update #558 for the same:
Summary
_merge_hooks_into_settingsincode_review_graph/skills.pyto filter out all existingcode-review-graphhook entries before appending the new dynamic hook config. This purges stale absolute-path entries and accumulated duplicate hooks on re-installation.test_install_hooks_replaces_old_and_duplicate_hooksintests/test_skills.pyseeding an old-style absolute-path hook and duplicate entries, asserting that custom user hooks are preserved while all old CRG entries are replaced by a single dynamicgit rev-parsehook.Verification
pytest tests/test_skills.py(192 passed).