Fix hook repo quoting and restore docs repo_root#192
Fix hook repo quoting and restore docs repo_root#192GrimoireScribe wants to merge 1 commit intotirth8205:mainfrom
Conversation
|
The fixes here are correct and important — hook format now matches Claude Code's actual schema (nested hooks array with type:command), PreCommit removed (invalid hook event), --repo path is properly shell-quoted via json.dumps(), and get_docs_section_tool repo_root param is restored for backwards compat. However the tests have a platform-specific bug that will fail on Linux/macOS CI: The three assertions like this: Path('/repo').resolve().as_posix() returns '/repo' on Linux/macOS, not 'E:/repo' — the 'E:' prefix is your Windows drive. Please replace these three assertions with OS-agnostic checks, for example: import json Or simply check that the command contains '--repo' and that the path is quoted (contains a double-quote character) without hardcoding the drive letter. Please fix the three affected test assertions and rebase on main, then this is good to merge. |
Summary
Following feedback on #154, this separates the remaining non-JSX fixes into their own PR.
This PR does two things:
--repopaths so repos under paths with spaces do not breakrepo_rootparameter onget_docs_section_toolso the MCP schema remains backward-compatibleWhy
The JSX parser work now lives on its own branch/PR.
These two changes are still useful independently:
repo_roottoget_docs_section_toolshould not breakVerification
Ran targeted validation locally for the affected areas.