fix(relayctl): harden editor diagnostics - #746
Conversation
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a0ede0cc9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Conflict(String), | ||
| #[error("editor setup refused a symbolic link at {0}")] | ||
| Symlink(String), | ||
| #[error("editor setup refused a symbolic link in its managed file set")] |
There was a problem hiding this comment.
The reviewed commit has no Signed-off-by trailer, so it does not satisfy the repository's requirement that every commit carry a DCO sign-off. Recreate the commit with git commit -s before merging.
AGENTS.md reference: AGENTS.md:L274-L274
Useful? React with 👍 / 👎.
| #[error( | ||
| "editor setup publication failed; recoverable transaction files remain in the project directory" | ||
| )] |
There was a problem hiding this comment.
Reuse the documented output-failure category
When publication fails, run_tooling writes this new Recovery display string directly to stderr, but the Relayctl reference says operational failures use one of the six messages listed in docs/site/src/content/docs/reference/relayctl.mdx:193-203; the applicable existing category is the requested authoring output could not be written. This introduces an undocumented message for callers that classify the supported categorical diagnostics, so retain the recovery files while rendering the standard output-failure category.
Useful? React with 👍 / 👎.
Summary
Rationale
Editor-specific failures bypassed the CLI's categorical diagnostic convention. This aligns them with the existing Relay V2 tooling contract without changing project mutation behavior.
Validation
cargo fmt --checkcargo test --locked -p registry-relayctlproducts/relay-v2/scripts/check-contracts.sh