grep: the zero-result warning recommends include_hidden without checking it could help
Repro (2026-09-24): grep(pattern="zqxv-no-such-token-anywhere-7731") returns 0 matches plus this warning:
this zero describes what was searched, not the pattern. Hidden paths were not searched, including .buddy/, .cargo/, .claude/ … Pass include_hidden=true to search them …
None of the listed hidden directories contains that token, so include_hidden=true would still return 0. The warning recommends a remedy it never checked could help. (Careful when reproducing: codescout logs your own query into .codescout/usage.db and .codescout/debug.log, so a raw grep -r "finds" the token there. .codescout is excluded from the warning's list, so that isn't a counterexample.)
Where: WalkAudit::completeness_warning in src/tools/grep.rs.
Task: only assert the include_hidden remedy when hidden pruning could explain the zero. One option is a cheap pass over just the pruned hidden roots, but the cost/benefit call is yours. Whatever you choose, the warning must stay accurate about what was searched. That part is correct today and is the point of docs/adrs/2026-08-27-negative-results-name-their-scope.md: read it first.
Acceptance, two tests:
- A pattern present only under a hidden directory: the warning still recommends
include_hidden. - A pattern present nowhere: no
include_hiddenrecommendation.
Test 1 is what stops the fix from simply deleting the advice.
Bug file: docs/issues/2026-09-24-residual-grep-hidden-paths-warning-checks-its-premise.md.
Base your branch on a fresh origin/experiments.