summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/31/01.md
blob: ff5291fcdc006ffd6348ea468c92ad02f3c27064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2026-03-31 — Add interface dependency and full test suite

## Changes

### Dependency Setup
- Added `dispatch-tools-interface` as a runtime dependency in `gemspec` (`~> 0.1`)
- Added local path reference in `Gemfile` for development

### Source Updates
- `lib/dispatch/tool/files.rb`: Added `require "dispatch/tools/interface"` and defined `SandboxError`, `FileNotFoundError`, `FileExistsError` error classes
- `spec/spec_helper.rb`: Added interface, tmpdir, and fileutils requires
- `spec/dispatch/tool/files_spec.rb`: Removed placeholder failing test

### Test Suite (7 spec files)
- `sandbox_spec.rb` — Path resolution, traversal attacks, symlinks, absolute paths, `within_worktree?`
- `read_file_spec.rb` — Full read, line ranges, line numbers, not found, binary detection
- `write_file_spec.rb` — Write new, overwrite, parent dirs, byte count, sandbox
- `edit_file_spec.rb` — Single/multiple edits, sequential application, not found, ambiguous match
- `create_file_spec.rb` — Create new, fail on existing, parent dirs, sandbox
- `list_files_spec.rb` — Recursive/non-recursive, glob patterns, relative paths, directory errors
- `search_files_spec.rb` — Plain text, regex, invalid regex, path scoping, pattern filter, result limit