Skip to content

fix(cli,sentry): fix --org/--server flags and add Sentry capture to backend errors#507

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/cli-base-flags-and-sentry-capture
Feb 23, 2026
Merged

fix(cli,sentry): fix --org/--server flags and add Sentry capture to backend errors#507
zbigniewsobiecki merged 1 commit intodevfrom
fix/cli-base-flags-and-sentry-capture

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Fix --org and --server CLI flags: These flags on all 40+ dashboard CLI commands were silently ignored because parseBaseFlags() in the DashboardCommand base class was a stub that always returned undefined. Added an extractBaseFlags() pure function that parses flag values directly from this.argv — zero changes to any subcommand.
  • Add missing Sentry capture to backend adapter: The claude-code backend adapter's catch block logged errors locally but never called captureException(), unlike the llmist backend lifecycle which had the correct pattern. Backend execution failures (e.g. 404 on PR fetch due to missing repo access) were invisible to Sentry monitoring.

Files changed

File Change
src/cli/dashboard/_shared/base.ts Add extractBaseFlags() helper, wire into parseBaseFlags()
src/backends/adapter.ts Add captureException() call in catch block
tests/unit/cli/dashboard/base.test.ts 12 new tests (9 unit + 3 integration)
tests/unit/cli/dashboard/client.test.ts 1 new test for x-org-context header
tests/unit/backends/adapter.test.ts 1 new test verifying Sentry capture on backend error

Test plan

  • extractBaseFlags unit tests: empty argv, --org, --server, both, = syntax, missing value, -- stop, mixed flags
  • Integration tests: TestCommand with --org/--server argv passes overrides to createDashboardClient
  • x-org-context header set when orgId present in config
  • captureException called with correct tags/extra when backend throws
  • Full test suite: 2739 tests passing
  • Lint + typecheck clean

🤖 Generated with Claude Code

…ackend errors

The --org and --server CLI flags on all 40+ dashboard commands were
silently ignored because parseBaseFlags() was a stub returning undefined.
Extract flag values directly from this.argv via a pure extractBaseFlags()
helper — zero changes to any subcommand.

Also add missing captureException() call in the claude-code backend
adapter's catch block, matching the pattern already used in the llmist
lifecycle. Backend execution errors (e.g. 404 on PR fetch) were logged
locally but never reported to Sentry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit b695dde into dev Feb 23, 2026
5 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/cli-base-flags-and-sentry-capture branch February 23, 2026 15:30
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