Commit Graph

10 Commits

Author SHA1 Message Date
imccyu
7e620db8ba test(windows): use host path semantics 2026-07-18 12:40:13 +08:00
Dudu-0223
a3f62478e1 Merge origin/master into codex/truncated-design 2026-07-17 18:21:54 +08:00
Dudu-0223
5ac03dde3f fix(review): generalize spill storage locators 2026-07-13 11:07:27 +08:00
Dudu-0223
43535aab42 Merge remote-tracking branch 'origin/master' into codex/truncated-design
# Conflicts:
#	docs/capability-seams.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	docs/rfc/INDEX.md
#	docs/tool-catalog.md
#	examples/acp-agent/README.md
#	packages/README.md
#	packages/bash/bash/README.md
#	packages/core/tools/tests/gen-tool-catalog.spec.ts
#	packages/support/acp-snapshot/src/harness.ts
#	pnpm-lock.yaml
#	scripts/gen-doc-graphs.ts
#	scripts/gen-tool-catalog.ts
#	scripts/type-equiv.manifest.json
2026-07-13 09:49:46 +08:00
Dudu-0223
3bb90bd4b6 fix: make search raw output recovery backend-neutral 2026-07-10 11:53:02 +08:00
Dudu-0223
1df9f3a84a test: cover the glob path arg in the fake-executor tier
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.
2026-07-09 22:00:43 +08:00
Dudu-0223
460a58639a fix: address codex review round 3
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.
2026-07-09 21:47:39 +08:00
Dudu-0223
590f520949 fix: address codex review round 2
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.
2026-07-09 21:28:42 +08:00
Dudu-0223
e94305d99e fix: address codex review round 1
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.
2026-07-09 21:12:41 +08:00
Dudu-0223
e0f20088d8 feat: bash-backed glob/grep discovery tools (dsh-tool-fs-search)
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.
2026-07-09 21:04:08 +08:00