Skip to content

[pull] main from fern-api:main#732

Merged
pull[bot] merged 5 commits into
code:mainfrom
fern-api:main
May 16, 2026
Merged

[pull] main from fern-api:main#732
pull[bot] merged 5 commits into
code:mainfrom
fern-api:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 16, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

FedeZara and others added 5 commits May 16, 2026 12:38
## Description
Linear ticket: Refs https://linear.app/buildwithfern/issue/FER-10254/obs-cli-automation-mode-enrichment-three-leg-failure-flow-process

Adds CLI-side automation telemetry enrichment and the three-leg failure reporting flow for automation runs. This intentionally does not close the Linear ticket; remaining work still needs to close the gap in the CLIs.

## Changes Made
- Add CLI v1 automation telemetry context/event modeling, including GitHub run/config metadata and action context inherited from the wrapper.
- Route automation failures through Sentry, PostHog, and the automation event API, with Sentry tags/context aligned to the actions wrapper.
- Add a dedicated PostHog automation event path so automation events use their event name and run ID distinct ID instead of the legacy CLI command shape.
- [ ] Updated README.md generator (if applicable)

## Testing
- [x] Unit tests added/updated
- [x] Manual testing completed
- [x] `pnpm --filter @fern-api/cli test src/telemetry/__test__/SentryClient.test.ts src/cli-context/__test__/TaskContextImpl.test.ts`
- [x] `pnpm turbo run compile --filter @fern-api/task-context --filter @fern-api/posthog-manager --filter @fern-api/cli --filter @fern-api/cli-v2` passed before rebasing onto current `main`
- [ ] Current `origin/main` broad compile has unrelated `@fern-api/remote-workspace-runner` TypeScript errors; focused tests still pass on this branch
## Description
Linear ticket: Refs

Report escaped fatal CLI errors through the existing telemetry path for packaged production CLI runs, while preserving local/dev crash behavior.

## Changes Made
- Added process-level handlers for `uncaughtException` and `unhandledRejection` in packaged production CLI runs.
- Shared the same telemetry initialization gate between the process handlers and Sentry setup, including `FERN_DISABLE_TELEMETRY`, `--local`, local dev builds, and production CLI detection.
- Updated SentryClient tests for the new initialization gate.
- [ ] Updated README.md generator (if applicable)

## Testing
- [x] Unit tests added/updated
- [x] Manual testing completed

Tested with:
`pnpm --filter @fern-api/cli test -- src/telemetry/__test__/SentryClient.test.ts`

Made with [Cursor](https://cursor.com)
Co-authored-by: FedeZara <43422322+FedeZara@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators May 16, 2026
@pull pull Bot added the ⤵️ pull label May 16, 2026
@pull pull Bot merged commit bf84da9 into code:main May 16, 2026
3 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants