fix(hooks-sync): use configured agent name for non-Claude hooks (gt-lch)#3242
fix(hooks-sync): use configured agent name for non-Claude hooks (gt-lch)#3242baumgold wants to merge 4 commits intogastownhall:mainfrom
Conversation
…ent_enabled and review_depth vars (gt-lch)
…resolved (gt-lch) When the configured agent binary (e.g. opencode) is not in PATH, ResolveRoleAgentConfig falls back to claude and the plugin files are never created. Switch to ResolveRoleAgentName (no binary validation) so hooks are installed based on the configured agent regardless of whether the binary is currently available on the machine.
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Build Status NoteThis PR fixes the pre-existing
Merge order: this PR should land first. Once merged, PRs #3241, #3243, #3244, #3245, #3246 should all pass CI. The CI failures shown on this PR ( |
…age-level globals (gt-g3z)
|
Added commit 86038e3: removes |
Fix-merge three baumgold PRs with conflict resolution: - PR #3246: JSON-escape GT_BIN on Windows — use json.MarshalIndent in test reformatter to avoid corrupting Windows drive letters - PR #3243: doctor hooks-sync uses ResolveRoleAgentName + preset directly instead of ResolveAgentConfigByName, preventing false negatives when non-Claude binary not in PATH - PR #3242: hooks-sync uses same preset-based approach for installing hooks for configured agent even when binary not found - Both #3243/#3242: remove t.Parallel() from tests that modify package-level globals, eliminating data races Co-authored-by: baumgold <baumgold@users.noreply.github.com>
…ooks fixes (gt-91g) Fix-merge three baumgold PRs with conflict resolution: - PR gastownhall#3246: JSON-escape GT_BIN on Windows — use json.MarshalIndent in test reformatter to avoid corrupting Windows drive letters - PR gastownhall#3243: doctor hooks-sync uses ResolveRoleAgentName + preset directly instead of ResolveAgentConfigByName, preventing false negatives when non-Claude binary not in PATH - PR gastownhall#3242: hooks-sync uses same preset-based approach for installing hooks for configured agent even when binary not found - Both gastownhall#3243/gastownhall#3242: remove t.Parallel() from tests that modify package-level globals, eliminating data races Co-authored-by: baumgold <baumgold@users.noreply.github.com>
Fixes #3247
When
gt doctor hooks-syncorgt hooks syncruns for non-Claude template-based agents (OpenCode, Gemini, etc.), it usesResolveRoleAgentConfigwhich falls back toclaudewhen the agent binary is not in PATH (e.g. in CI). This causes non-Claude hook targets to be silently skipped.Changes:
ResolveRoleAgentName(reads config directly, no PATH fallback) for determining which template to applyjudgment_enabled,review_depth)hooksDirparameter fromwriteTemplate