claudecode/crates/tools
Yeachan-Heo 39c87d9d1d Prevent tool regressions by locking down dispatch-level edge cases
The tools crate already covered several higher-level commands, but the
public dispatch surface still lacked direct tests for shell and file
operations plus several error-path behaviors. This change expands the
existing lib.rs unit suite to cover the requested tools through
`execute_tool`, adds deterministic temp-path helpers, and hardens
assertions around invalid inputs and tricky offset/background behavior.

Constraint: No new dependencies; coverage had to stay within the existing crate test structure
Rejected: Split coverage into new integration tests under tests/ | would require broader visibility churn for little gain
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep future tool-coverage additions on the public dispatch surface unless a lower-level helper contract specifically needs direct testing
Tested: cargo fmt --all; cargo clippy -p tools --all-targets --all-features -- -D warnings; cargo test -p tools
Not-tested: Cross-platform shell/runtime differences beyond the current Linux-like CI environment
2026-03-31 23:33:05 +00:00
..
src Prevent tool regressions by locking down dispatch-level edge cases 2026-03-31 23:33:05 +00:00
.gitignore Polish Agent defaults and ignore crate-local agent artifacts 2026-03-31 20:46:06 +00:00
Cargo.toml feat(tools): add WebFetch and WebSearch parity primitives 2026-03-31 19:15:05 +00:00