Skip to content

chore(cli): migrate @fern-api/local-workspace-runner to use CliError#15006

Open
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-local-workspace-runner
Open

chore(cli): migrate @fern-api/local-workspace-runner to use CliError#15006
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-local-workspace-runner

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

@FedeZara FedeZara commented Apr 14, 2026

Description

Migrates @fern-api/local-workspace-runner to use explicit CliError error codes on every failAndThrow / failWithoutThrowing call site.

This is one of the package migration PRs that follow the error classification system introduced in #14749.

Changes Made

Assigned typed error codes across call sites in packages/cli/generation/local-generation/local-workspace-runner/src/.

Error codes used

Code Usage
CONTAINER_ERROR Docker container execution failures, generator runtime errors
CONFIG_ERROR Invalid generator configuration, missing output paths
VERSION_ERROR Generator version incompatibility
INTERNAL_ERROR Unexpected generation states

Files touched (grouped by area)

  • Generation runner: GenerationRunner.ts, runLocalGenerationForWorkspace.ts
  • Dynamic snippets: dynamic-snippets/java/DynamicSnippetsJavaTestGenerator.ts

Testing

  • Existing tests pass (pnpm test, excluding e2e and pre-existing environment failures)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@FedeZara FedeZara changed the title refactor(cli): rename FernCliError to TaskAbortSignal chore(cli): migrate @fern-api/local-workspace-runner to use CliError Apr 14, 2026
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-local-workspace-runner branch 2 times, most recently from d103aff to f25f353 Compare April 14, 2026 22:57
@FedeZara FedeZara marked this pull request as ready for review April 17, 2026 11:25
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-local-workspace-runner branch from f25f353 to 86759e9 Compare April 17, 2026 11:26
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-17T04:58:39Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 98s 141s 46s -52s (-53.1%)
go-sdk square 114s 148s 53s -61s (-53.5%)
java-sdk square 170s 187s 112s -58s (-34.1%)
php-sdk square 99s 127s 42s -57s (-57.6%)
python-sdk square 114s 152s 65s -49s (-43.0%)
ruby-sdk-v2 square 102s 156s 71s -31s (-30.4%)
rust-sdk square 98s 94s 47s -51s (-52.0%)
swift-sdk square 84s 130s 38s -46s (-54.8%)
ts-sdk square 100s 138s 51s -49s (-49.0%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-17T04:58:39Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-04-17 11:44 UTC

@github-actions
Copy link
Copy Markdown
Contributor

Docs Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-17T04:58:39Z).

Fixture main PR Delta
docs 289.7s 274.3s (35 versions) -15.4s (-5.3%)

Docs generation runs fern generate --docs --preview end-to-end against the benchmark fixture with 35 API versions (each version: markdown processing + OpenAPI-to-IR + FDR upload).
Delta is computed against the nightly baseline on main.
Baseline from nightly run(s) on main (latest: 2026-04-17T04:58:39Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-04-17 11:45 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant