• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dcdpr / jp / 26111134308
66%

Build:
DEFAULT BRANCH: main
Ran 19 May 2026 04:38PM UTC
Jobs 1
Files 319
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 May 2026 04:36PM UTC coverage: 65.651% (+0.3%) from 65.322%
26111134308

push

github

web-flow
chore(tools): Workspace path validation and dir move support (#658)

All filesystem tools previously validated user-supplied paths through
ad-hoc inline checks (is_absolute, trim_start_matches, etc.) with no
protection against symlink escape attacks. This commit replaces those
scattered checks with a shared `check_workspace_path` pipeline in
`fs/utils.rs` and two public entry points:

- `resolve_workspace_path` — canonicalizes through symlinks on existing
ancestors, guaranteeing the result lies inside the workspace root. Used
by write tools (`create_file`, `delete_file`, `modify_file`,
`move_file`, `read_file`).
- `clean_workspace_path` — lexically normalizes without following
symlinks, while still verifying the canonical ancestor stays in-root.
Used by read/search tools (`grep_files`, `list_files`) where the
returned path should match the user's input shape.

The validator rejects absolute paths, `..`-escape attempts that survive
normalization, symlinks whose canonical target falls outside the root,
path components exceeding 100 bytes, and paths with more than 20
components.

`fs_move_file` was also expanded to handle directories in addition to
files: directories are moved atomically with `fs::rename`, require the
target to not already exist, and get a broader dirty check via
`count_dirty_paths_impl` (any non-empty `git status --porcelain` line
counts). A same-path guard prevents no-op moves, and the success message
now distinguishes between file and directory moves. The tool description
in `.jp/mcp/tools/fs/move_file.toml` is updated to reflect the new
capability.

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

324 of 365 new or added lines in 9 files covered. (88.77%)

1 existing line in 1 file now uncovered.

27678 of 42159 relevant lines covered (65.65%)

275.71 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
84.89
84.89% .config/jp/tools/src/fs/move_file.rs
10
93.68
13.68% .config/jp/tools/src/fs/utils.rs
5
69.57
69.57% .config/jp/tools/src/fs/delete_file.rs
4
73.58
-1.42% .config/jp/tools/src/fs/create_file.rs
3
0.0
0.0% .config/jp/tools/src/fs.rs
2
76.35
-0.57% .config/jp/tools/src/fs/modify_file.rs
1
86.54
-1.22% .config/jp/tools/src/fs/read_file.rs

Coverage Regressions

Lines Coverage ∆ File
1
73.58
-1.42% .config/jp/tools/src/fs/create_file.rs
Jobs
ID Job ID Ran Files Coverage
1 26111134308.1 19 May 2026 04:38PM UTC 319
65.65
GitHub Action Run
Source Files on build 26111134308
  • Tree
  • List 319
  • Changed 9
  • Source Changed 9
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26111134308
  • f6061e72 on github
  • Prev Build on main (#26086411961)
  • Next Build on main (#26123672045)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc