fix: pass error when failed to parse toml#386
Conversation
Greptile SummaryThis PR fixes a silent-failure bug in Confidence Score: 5/5Safe to merge — the change is minimal, correct, and the doc comment is already updated. Only P2 findings (missing test for the new hard-fail path); no logic or security issues introduced. tests/test_e2e_namespace.rs — no test verifies the new hard-fail behavior introduced by the fix. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[all_merged_from] --> B[list_paths_from]
B --> C{for each path}
C --> D[Self::read]
D --> E{Result?}
E -- Ok --> F[namespace collision check]
F --> G[pt.merge]
G --> C
E -- "Err (old)" --> H["eprintln! — continue loop"]
H --> C
E -- "Err (new)" --> I["return Err(e.wrap_err(...))"]
I --> J[Caller receives error]
Reviews (3): Last reviewed commit: "fix: pass error when failed to parse tom..." | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request modifies the error handling in src/pitchfork_toml.rs to propagate errors encountered during file reading instead of just printing them. A review comment correctly identifies that the current implementation will fail to compile because wrap_err is being called on the error object itself rather than a Result type. The feedback also suggests using wrap_err_with for better performance and notes that the function's documentation needs to be updated to reflect the new error-returning behavior.
29a4553 to
70aaff7
Compare
70aaff7 to
60f9d8a
Compare
## 🤖 New release * `pitchfork-cli`: 2.6.0 -> 2.7.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [2.7.0](v2.6.0...v2.7.0) - 2026-04-26 ### Added - *(supervisor)* run daemons as a configured user ([#384](#384)) - *(watch)* impl poll mode ([#353](#353)) - *(cli)* stop / restart --all-global / --all-local ([#385](#385)) - version check in IPC ([#354](#354)) ### Fixed - pass error when failed to parse toml ([#386](#386)) ### Other - *(deps)* update rust crate xx to v2.5.4 ([#378](#378)) - *(deps)* lock file maintenance ([#371](#371)) - *(deps)* update rust crate xx to v2.5.4 ([#363](#363)) - *(deps)* update rust crate hyper-rustls to v0.27.9 ([#359](#359)) - *(deps)* update rust crate rmcp to v1.5.0 ([#364](#364)) - *(deps)* update rust crate libc to v0.2.185 ([#360](#360)) - *(deps)* update rust crate tokio to v1.52.1 ([#365](#365)) - *(deps)* update rust crate uuid to v1.23.1 ([#362](#362)) - *(deps)* update rust crate rustls to v0.23.38 ([#361](#361)) - *(deps)* update rust crate clap to v4.6.1 ([#358](#358)) - *(deps)* update rust crate axum to v0.8.9 ([#357](#357)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk release bookkeeping: only bumps the `pitchfork-cli` version and regenerates changelog/docs metadata, with no runtime code changes. > > **Overview** > Updates project metadata for the `v2.7.0` release. > > Bumps `pitchfork-cli` from `2.6.0` to `2.7.0` across `Cargo.toml`, `Cargo.lock`, and the generated CLI docs (`docs/cli/*` and `pitchfork.usage.kdl`), and adds the `2.7.0` entry to `CHANGELOG.md`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e93c44b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
fixes #337 (reply in thread).