forked from bchanot/claude
fix(rtk): rtk resolution + absolute-path rewrite — compression was silently dead
rtk lives at ~/.cargo/bin but the hand-managed .bashrc lost the cargo line: command -v failed in hook AND tool shell, so the hook no-op'd with a stderr warn on every Bash call — input compression silently OFF. - Resolve RTK_BIN by probing known install dirs (LRN-036 class). - Substitute the ABSOLUTE path at the rewrite head: a bare 'rtk …' exits 127 in the tool shell, whose PATH the hook cannot fix (proven). - Compound rewrites carrying further bare rtk segments pass through unrewritten: quoted text (commit messages) makes a global substitution unsafe — lose compression, never emit a command that 127s (proven: a commit chain 127'd mid-flow). - detect_rtk probes the same dirs so the banner reports capability. - Re-pinned .rtk-hook.sha256: the rtk BINARY verifies the hook against it at execution time and refuses a modified hook — the pin is live machinery, not a vestige; coupling documented in the header. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zA3Qh2Q1QpcGXzXxKeDHR
This commit is contained in:
co-authored by
Claude Fable 5
parent
fe9fa86bb2
commit
f0b7e89468
@@ -1 +1 @@
|
||||
ef0d630994fd7ef5f2b84fb66cd6249c493bb8736bcacd4734d7c798125018fb rtk-rewrite.sh
|
||||
0f43229d17d03342d27c0b836b9b70f25f98dfb80a35ffc8dc2488034cb8719c rtk-rewrite.sh
|
||||
|
||||
Reference in New Issue
Block a user