Skip to content

Commit 4fea6c5

Browse files
committed
fix(cli): mirror errorClass onto ErrorClassification (CDK↔CLI type sync)
#599 added `errorClass?: ErrorClassType` to the CDK ErrorClassification, which serializes into the GET /tasks/{id} `error_classification` response — but the hand-maintained CLI mirror (cli/src/types.ts) wasn't updated, so the CLI's structured error display couldn't surface the transient/service/user axis (real drift per the CLAUDE.md shared-API-shape routing rule). Add the optional field to the CLI's ErrorClassification, inlined as a union literal rather than a named `ErrorClassType` export — the types-sync drift check (scripts/check-types-sync.ts) requires CDK to be the source of truth for any exported type name, and CDK exports ErrorClassType from error-classifier.ts, not shared/types.ts. Inlining keeps the field synced without a CLI-only export. Verified: `//:check:types-sync` OK (57 CLI exports validated), cli build green (600 tests, compile + eslint clean).
1 parent 0e3a76b commit 4fea6c5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cli/src/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ export interface ErrorClassification {
7575
readonly description: string;
7676
readonly remedy: string;
7777
readonly retryable: boolean;
78+
/** Retry-semantics axis: transient (self-heals on retry) vs service (admin
79+
* must fix) vs user (change the request/code). Optional (older classifications
80+
* omit it; absent ⇒ user). Inlined (not a named export) to mirror the cdk
81+
* ErrorClassification field without introducing a CLI-only exported type. */
82+
readonly errorClass?: 'transient' | 'service' | 'user';
7883
}
7984

8085
/** Task detail returned by GET /v1/tasks/{task_id}. */

0 commit comments

Comments
 (0)