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

dcdpr / jp / 20715320592
58%

Build:
DEFAULT BRANCH: main
Ran 05 Jan 2026 12:32PM UTC
Jobs 1
Files 172
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

05 Jan 2026 12:24PM UTC coverage: 49.929% (-0.08%) from 50.008%
20715320592

push

github

web-flow
enhance(cli, attachment): improve relative path handling (#366)

File attachments now benefit from better workspace awareness and
validation. When adding or removing attachments via the CLI, relative
paths are resolved against the current working directory and then
validated to ensure they reside within the workspace root.

For example, if the workspace root is `/foo` and the current working
directory is `/foo/bar`, then `../baz.txt` will be resolved as
`/foo/baz.txt`, which is inside the workspace, but `../../baz.txt` will
be resolved as `/baz.txt`, which is outside the workspace, and returns
an error. Absolute paths are allowed, as long as they point to a file or
directory within the workspace.

This restriction exists because attachments are lazy-loaded, and we want
to ensure workspace conversations can be used across multiple machines
or users.

To facilitate this change, CLI attachment argument parsing is split into
two phases: an argument parser that distinguishes between URLs and file
paths, using the new `AttachmentUrlOrPath` enum, and at a later stage,
when we have access to the workspace root path, we validate and rewrite
the attachment path relative to the workspace root.

Additionally, the `path-clean` dependency has been replaced with
`clean-path` for an unsafe-free alternative.

Example usage with relative paths:

```shell
jp query --attachment ../lib.rs "Explain this file"
jp query -a /path/to/workspace/README.md "Explain this project"
```

---------

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

14 of 80 new or added lines in 8 files covered. (17.5%)

9125 of 18276 relevant lines covered (49.93%)

125.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% crates/jp_cli/src/cmd/attachment.rs
1
0.0
0.0% crates/jp_cli/src/cmd/config.rs
2
26.86
1.08% crates/jp_cli/src/cmd/query.rs
2
0.0
0.0% crates/jp_cli/src/lib.rs
3
0.0
0.0% crates/jp_cli/src/cmd/attachment/add.rs
3
43.36
-0.36% crates/jp_workspace/src/lib.rs
7
0.0
0.0% crates/jp_cli/src/cmd/attachment/rm.rs
47
0.0
0.0% crates/jp_cli/src/parser.rs
Jobs
ID Job ID Ran Files Coverage
1 20715320592.1 05 Jan 2026 12:32PM UTC 172
49.93
GitHub Action Run
Source Files on build 20715320592
  • Tree
  • List 172
  • Changed 10
  • Source Changed 10
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20715320592
  • dc93bd4c on github
  • Prev Build on main (#20708921720)
  • Next Build on main (#20717190180)
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