summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests/test_repo_resolution.py
AgeCommit message (Collapse)Author
2026-11-09security-guidance: tests read the session state file by nameMohamed Hegazy
The test helper opened the first JSON file in the state directory, which can be the review model cache depending on directory order. Select the session state file by its prefix and require exactly one. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-10-15security-guidance: recognize more git global options before commit and pushmhegazy/sg-git-valueless-global-optionsMohamed Hegazy
A commit or push written with a flag that takes no value (git --no-pager commit), a partly quoted option value (git -c user.name="A B" commit) or --namespace / --config-env / --attr-source with a separate value was not recognized by the hook, so it was not reviewed. Commit and push detection now share one global-option pattern that covers these.
2026-10-13security-guidance: start fewer hook processes per Bash callClaude
Claude Code runs every `if`-filtered hook entry when it cannot parse a Bash command, so the seven commit/push entries started seven processes on those calls. Use three entries (git commit, git push, gt) and let the hook's own regex decide what is a commit or a push.
2026-10-09security-guidance: stop reviewing on every subagent finishmhegazy/sg-drop-subagent-reviewMohamed Hegazy
Each subagent finish re-reviewed the whole diff since the last prompt, so a turn with N subagents sent N growing reviews. The end-of-turn review already covers what subagents changed, so drop the SubagentStop registration.
2026-09-09Harden git invocation and repository hint handlingsg-resolve-repo-rootOctavian Guzu
:house: Remote-Dev: homespace
2026-09-09Adjust SubagentStop handling and repository precedenceOctavian Guzu
- SubagentStop reviews without consuming or advancing the session's Stop state; an identical diff is not reviewed twice. - SubagentStop from a different working tree than the project is skipped. - An explicit `git -C <dir>` / `cd <dir>` naming another repository takes precedence over the hook cwd. - Narrows the `git -C … commit` matcher; keeps Windows path separators when tokenizing; adds `--no-textconv` to diff/show invocations. - Adds tests. :house: Remote-Dev: homespace
2026-09-09security-guidance: resolve repository from command and edited paths (2.0.7 ↵Octavian Guzu
→ 2.0.8) - Adds repository resolution from `git -C <dir>` / `cd <dir>` in the hook command, from the commit SHA, and from edited file paths when the hook cwd is not a git repository. - Adds PostToolUse matchers for `git -C … commit|push`. - Registers SubagentStop. - Adds `repo_resolution` / `cwd_is_repo` metric fields. - Adds tests. :house: Remote-Dev: homespace