- tests/helpers/common.bash: hide_command hides python3/jq/rg via a
per-directory-batched PATH shim (not per-file — that took minutes),
making the fail-open/grep-fallback branches testable.
- 20 new tests across all 7 .bats files: unknown flags, invalid
--settings-scope, missing python3/jq, grep fallback when rg is
unavailable, empty/multi-vault config edge cases, a vault path that
stops existing or isn't a directory, and the previously-untested
tool_name != Bash branch of force-ask-on-raw-git.sh. 53 -> 73 tests.
- hooks.bats: deploy the hooks once in setup_file() (BATS_FILE_TMPDIR)
instead of per-test (BATS_TEST_TMPDIR) -- faster, and gives kcov one
stable path per hook to aggregate coverage against instead of a
fragmented copy per test.
- .gitignore (first in this repo) + tests/README.md Coverage section
documenting the kcov invocation and why --include-pattern needs three
entries, not two.
Real, tool-measured coverage via kcov: 86.15% (255/296 lines) across
all 10 wrapper/setup/hook scripts in both plugins, replacing an earlier
manual ~68% branch-coverage estimate.
Isolated per-test $HOME sandboxing via tests/helpers/common.bash.
Covers both plugins' wrapper scripts, their setup.sh, and
git-manager's two PreToolUse hooks (53 tests). Verified the suite
catches regressions by temporarily reintroducing the recently-fixed
vault_search.sh -g/-- ordering bug and confirming it fails.
Placing -g after -- made ripgrep treat the filters as literal
positional paths instead of options, so the .obsidian/.git/*.md
exclusions were silently inert (confirmed: matched inside a .pdf).
Backward-compatible feature addition (raw-git nudge hook, tag subcommand,
repo-ambiguity guidance in SKILL.md). Bumping per ARCHITECTURE.md's
documented convention, and because the plugin cache path is version-keyed
(~/.claude/plugins/cache/skill-repo/git-manager/<version>/), so a bump is
also what makes /plugin marketplace update reliably pick up the change.
Forces a normal confirmation prompt (never a silent block, never a silent
allow) when Bash runs raw git instead of git_cmd.sh, worded more
insistently when the subcommand is one the wrapper already supports.
Raw git stays a valid fallback for unsupported subcommands and
unregistered repos - a hard deny would remove that fallback entirely.
Also documents in SKILL.md that repo ambiguity (which registered repo is
meant, or none at all) must be resolved by asking the user rather than
guessing - a hook only sees the literal command string, not the
conversation, so that judgment can't live in the hook itself.