CI has no rg, so the integration suite self-skips there and the
fake-executor suite must carry the per-file 100% coverage gate alone.
parseGlobArgs's valid-path branch was only exercised by integration
(node 24 / coverage failed at 95.45% branches on glob.ts); a fake-tier
test now threads a valid path through to the quoted `-- 'sub'` root.
glob leaked VCS internals when the model rooted the search AT a VCS
directory (path: '.git' or 'sub/.git'): the prune glob !**/.git is
matched against root-prefixed candidate paths, which never end in the
directory name when the walk starts inside it. Pair each VCS exclude
with a contents glob (!**/<name>/**), verified empirically to exclude
relative, nested, and absolute VCS roots while leaving broad searches
untouched. Pinned by the command-construction test and a real-rg
integration case rooting at .git.
Translate ctx.bash.run() REJECTIONS into the SEARCH_* taxonomy. The seam
contract has run() reject for infrastructure failures (a pre-aborted
signal, an unusable/deleted session workdir, a missing shell); the bare
await let those escape as plain Errors, so the tool registry produced
isError results without the structured SearchError { name, code } the
package documents. A pre-aborted spec.signal now maps to SEARCH_ABORTED
and any other start failure to SEARCH_FAILED, original error chained as
cause. Covered by fake-executor tests for both branches plus real-executor
integration tests pinning the exact pre-aborted-signal and deleted-cwd
paths.
Two functional gaps in the search tools change:
- Enforce rawOutputMaxBytes on UNTRUNCATED inline stdout too. The cap was
only checked on the truncated->raw-spill path, so an executor retaining
more inline than the search cap (or a deployment lowering the cap below
the bash retention) could smuggle an over-cap parse through, contradicting
the documented SEARCH_RAW_OUTPUT_OVERFLOW contract. Covered by a new
over-cap-inline test.
- Load @deepseek-ai/dsh-timeout-policy in the coding-agent tree. The search
tools declare timeoutMs but nothing in the demo enforced it, so the
advertised 30s budget silently degraded to the bash executor's 60s
backstop. The keyless smoke boots the amended tree.
Implements docs/rfc/implemented/feature/2026-07-09-bash-backed-grep-glob-
discovery.md: model-facing glob/grep in a new @deepseek-ai/dsh-tool-fs-search
package, executing fixed ripgrep templates through ctx.bash.resolve/run —
not ctx.fs provider methods — so filesystem backends stay free of a search
contract and sandboxed/remote executors substitute cleanly. The tools never
call ctx.bash.start(); the tool layer owns quoting (one singleQuote safety
boundary), rg --json parsing, ItemRetainer/TextRetainer retention, and the
first tool-owned ctx.spillFiles.saveText() handoff (item-level retention the
generic post-execute spill policy cannot recover).
RFC amendments on the way to implemented/: a shared src/search-core.ts (the
SEARCH_* vocabulary + bash-run/raw-spill/spill plumbing was byte-identical
across both tools — the missed-extraction smell), and a snapshot-gap note:
wiring the acp-agent tree changes the assembled prompt, so goldens need a
keyed re-record; the spill notice text is pinned by unit tests instead and
only the coding-agent example ships the tools for now.