Skip to content

chore(tools): improve infrastructure and testability - #384

Merged
JeanMertz merged 3 commits into
mainfrom
improve-tool-inquery48
Jan 29, 2026
Merged

JeanMertz merged 3 commits into
mainfrom
improve-tool-inquery48

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

Migrate from std::path to camino across jp_tool and project tooling to ensure UTF-8 path safety. This change simplifies path handling and prevents potential encoding issues when interacting with external processes.

Introduce a ProcessRunner abstraction to decouple tool logic from the system shell. This enables unit testing of tools that invoke git or cargo by using a new MockProcessRunner, eliminating the need for complex integration tests that rely on the local environment.

Refactor the cargo, fs, and git tool modules to use the new runner and improve consistency in error reporting. Additionally, enhance the XML serialization logic to better handle multiline strings and provide more readable output for LLM consumption.

Migrate from `std::path` to `camino` across `jp_tool` and project
tooling to ensure UTF-8 path safety. This change simplifies path
handling and prevents potential encoding issues when interacting with
external processes.

Introduce a `ProcessRunner` abstraction to decouple tool logic from
the system shell. This enables unit testing of tools that invoke `git`
or `cargo` by using a new `MockProcessRunner`, eliminating the need for
complex integration tests that rely on the local environment.

Refactor the `cargo`, `fs`, and `git` tool modules to use the new
runner and improve consistency in error reporting. Additionally,
enhance the XML serialization logic to better handle multiline
strings and provide more readable output for LLM consumption.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit 38392fe into main Jan 29, 2026
12 checks passed
@JeanMertz
JeanMertz deleted the improve-tool-inquery48 branch February 1, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant