Typed cli errors - #222
Merged
Merged
Conversation
Replace the string-only ClassifiedError boundary with CliError variants that preserve live anyhow sources and reserve catalogued user diagnostics for expected failures. Keep stable failure classes and codes while rendering internal chains and user messages through their distinct paths. Plan: typed-cli-errors (T01) Co-authored-by: SCE <sce@crocoder.dev>
Pass live `anyhow::Error` values through the auth, config, doctor, hooks, setup, and version command adapters so `CliError` retains the original source chain instead of receiving a preformatted message. Update the typed CLI error plan with T02 completion and verification evidence. Plan: typed-cli-errors.md (T02) Co-authored-by: SCE <sce@crocoder.dev>
Retain `ControlPlaneError` values across batch and refresh failures so higher-level sync code can distinguish authentication failures from other control-plane errors without changing rendered diagnostics. Add authentication-failure traversal to the control-plane, stream, and trace error types, and update the completed plan task with verification evidence. Plan: typed-cli-errors (T03) Co-authored-by: SCE <sce@crocoder.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Treat authentication failures from initial state loading and stream reconciliation as the typed not-authenticated user error, while preserving the live sync error as its source. Keep other sync failures on the internal-error path and cover the classification matrix with focused tests. Ref: context/plans/typed-cli-errors.md#T04 Co-authored-by: SCE <sce@crocoder.dev>
Give observability a single typed-error logging path that records the user-facing surface, catalog key, and technical source without duplicating terminal diagnostics. Rename the logger API to `log_cli_error`, extract field construction for focused tests, and retain `app_support` as the sole stderr diagnostic writer. Plan: typed-cli-errors (T05) Co-authored-by: SCE <sce@crocoder.dev>
Exercise user-error rendering, logging preservation, redaction, stderr color policy, and sync classification while keeping production diagnostics unchanged. Add explicit styling seams for deterministic tests, update the styling reference, and record completion evidence for the typed-cli-errors plan task. Plan: typed-cli-errors.md (T06) Co-authored-by: SCE <sce@crocoder.dev>
Route sync authentication failures through the typed CLI error boundary while preserving technical sources for observability, and render diagnostics with the stderr color policy. Document the shipped architecture and complete the durable context synchronization for the typed CLI errors plan, while retaining required formatting fixes in the affected Rust modules. Plan: `context/plans/typed-cli-errors.md` (T07) Co-authored-by: SCE <sce@crocoder.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.