Skip to content

Typed cli errors - #222

Merged
davidabram merged 7 commits into
mainfrom
typed-cli-errors
Aug 20, 2026
Merged

Typed cli errors#222
davidabram merged 7 commits into
mainfrom
typed-cli-errors

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

davidabram and others added 3 commits August 19, 2026 19:27
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>
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sce-config-json Ready Ready Preview Aug 20, 2026 7:31am

Request Review

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>
@davidabram
davidabram merged commit d90b6d9 into main Aug 20, 2026
10 checks passed
@davidabram
davidabram deleted the typed-cli-errors branch August 20, 2026 08:21
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