fix(hooks): resolve Claude plugin hook runner cross-platform#942
fix(hooks): resolve Claude plugin hook runner cross-platform#942igorls merged 5 commits intoMemPalace:developfrom
Conversation
|
Thanks for the pointer @mvalentsev . I checked #833, and it looks complementary rather than identical:
Issue #753’s current code example is the wrapper path ( If maintainers would prefer a single combined solution, I’m happy to close this and rework it on top of #833, but as written it looks like #942 fixes the plugin wrapper layer while #833 fixes the legacy save/precompact shell hooks. |
|
You're right, my mistake -- #833 targets hooks/ (legacy scripts) while this PR targets .claude-plugin/hooks/ (plugin wrappers). Different files, complementary fixes. Thanks for checking. |
|
btw, |
|
Thanks — agreed on both points.
However, I think it is better to keep the MCP config files ( |
|
I have a tested Codex-wrapper follow-up patch ready locally as well |
|
Hi, The wrapper execution tests pass a Windows-formatted path (backslashes/drive letters) directly to Severity: action required | Category: reliability How to fix: Use POSIX path for bash Agent prompt to fix - you can give this to your LLM of choice:
We noticed a couple of other issues in this PR as well - happy to share if helpful. Found by Qodo code review |
|
Thanks — fixed. Happy to look at the other findings too if you can share the specific issues or exact lines involved. I’d prefer to keep follow-up changes concrete and in-scope for this PR. @qodo-ai-reviewer |
Opened MemPalace#1115 on 2026-04-22 attempting to land the `.claude-plugin/` venv-aware Python resolution upstream; closed it on 2026-04-23 after CI correctly caught the violation of the PATH-only contract MemPalace#942 established, and the realization that the `.claude-plugin/` side of the autodetect work was explicitly waiting on MemPalace#1069 arbitration. - CLAUDE.md PR tracker header: 7 → 8 closed - CLAUDE.md PR tracker gains a MemPalace#1115 closed row with reason - CLAUDE.md fork-ahead row MemPalace#19 language updated (was "Candidate for PR upstream" → now notes the attempt, withdrawal, and gating on bensig's MemPalace#1069 direction) - README.md change queue: Hooks row reflects the MemPalace#1115 attempt + withdrawal; still waiting on arbitration Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restore-integrity release. Unbreaks fresh `pip install mempalace` from v3.3.2 by re-tagging current develop, which carries both the plugin.json consumer (shipped in 3.3.2) and the matching mempalace-mcp entry point in pyproject.toml (added on develop ~10h after the 3.3.2 tag via MemPalace#340 by @messelink). MemPalace#1093 diagnosed by @jphein. Bumps (all 5 sources agree per Version Guard / CLAUDE.md): - mempalace/version.py 3.3.2 → 3.3.3 - pyproject.toml 3.3.2 → 3.3.3 - .claude-plugin/plugin.json 3.3.2 → 3.3.3 - .claude-plugin/marketplace.json 3.3.2 → 3.3.3 - .codex-plugin/plugin.json 3.3.2 → 3.3.3 - CHANGELOG.md new [3.3.3] entry No code changes. The fix for MemPalace#1093 is already on develop via merged PRs MemPalace#340, MemPalace#1021, MemPalace#851, MemPalace#942, MemPalace#833, MemPalace#673, MemPalace#661, MemPalace#659, MemPalace#1097, MemPalace#1051, MemPalace#1001, MemPalace#945. Branch name intentionally outside the `release/*` ruleset so follow-up CI-fix commits aren't gated behind a nested PR. (Supersedes MemPalace#1143 — closed for exactly that reason after it missed 3 of 5 version files.) Smoke-tested locally from a fresh develop clone: grep mempalace-mcp pyproject.toml .claude-plugin/plugin.json # both ✓ python -m build --wheel # ✓ pip install …-py3-none-any.whl # ✓ which mempalace-mcp # ✓ mempalace-mcp --help # ✓
… state Three stale sections updated: - Fork change queue: row 8 (.blob_seq_ids_migrated marker) struck through → FILED as MemPalace#1177. Two new rows added for segfault fixes discovered today (MemPalace#1171 concurrent-write lock, MemPalace#1173 quarantine in make_client) that weren't in the queue because the bugs surfaced today, not during the original 2026-04-21 triage. - Open upstream PRs: was showing 3 of 10 PRs. Now shows all 10 with current CI/review state. All rebased onto current upstream/develop and MERGEABLE as of today. - Merged since v3.3.1: added v3.3.3 release (2026-04-24) with its constituent merges — MemPalace#942, MemPalace#833, MemPalace#1097, MemPalace#1145, MemPalace#1147, MemPalace#1148/1150/1157 entity-detection overhaul (via @igorls's MemPalace#1175 stacked-PR rescue), MemPalace#1166 palace-path security, MemPalace#340/MemPalace#1093 install regression, plus MemPalace#851 from the 2026-04-22 batch.
What does this PR do?
Closes #753
Summary
.claude-plugin/hooks/mempal-stop-hook.sh.claude-plugin/hooks/mempal-precompact-hook.shmempalaceCLIpython3/pythonScope
This PR intentionally fixes the Claude plugin shell hook wrappers only.
It does not change
.claude-plugin/plugin.jsonor.claude-plugin/.mcp.json,which still need a separate supported mechanism for MCP command resolution.
How to test
Manual verification
python3: command not found{}with exit code 0 in a PATH containingpythonbut nopython3Validation
bash -n .claude-plugin/hooks/mempal-stop-hook.shbash -n .claude-plugin/hooks/mempal-precompact-hook.shruff format tests/test_claude_plugin_hook_wrappers.pyruff check tests/test_claude_plugin_hook_wrappers.pyruff format --check tests/test_claude_plugin_hook_wrappers.pypython -m pytest tests/test_claude_plugin_hook_wrappers.py -vpython -m pytest tests/test_hooks_cli.py tests/test_claude_plugin_hook_wrappers.py -vpython -m pytest tests/ -vChecklist
python -m pytest tests/ -v)ruff check .)