Repository navigation
ci(fern): track latest Fern CLI via npx instead of pinning - #1194
Merged
Merged
Conversation
Pinning fern-api in package.json drifts: fern ships several releases per day, and 4.80.3 was treating a transient FDR 403 as fatal, breaking the "Fern docs (check)" and preview-comment jobs on every PR. Drop the devDependency and lockfile; have the npm scripts and the preview job shell out to "npx -y fern-api@latest" so CI and local dev always run a current CLI without manual bumps. Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Lawrence Lane <[email protected]>
Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Lawrence Lane <[email protected]>
`fern check` exits 1 with zero output (no stdout, no stderr) whenever docs.yml has a `check.rules` entry for `broken-links` or `missing-redirects` at any level (warn or error). Reproduced across fern-api 4.99.0 → 5.1.0. Removing the block makes fern check pass; broken links and missing redirects are still caught at publish time by `fern generate --docs`. A NOTE comment documents what to do when fern fixes the upstream bug. Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Lawrence Lane <[email protected]>
Restore `missing-redirects: error` in docs.yml and pass FERN_TOKEN to the check workflow. Per fern's site-level-settings docs, missing-redirects is supposed to be skipped when unauthenticated; we're seeing it silently exit 1 instead. This commit tests whether passing the token (which the publish + preview-comment workflows already use) lets the rule run. If CI passes, the token is the proper fix. If it still fails, the bug runs deeper than auth. Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Lawrence Lane <[email protected]>
chtruong814
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fern-apiwas pinned at^4.80.3infern/package.json. Fern ships several releases per day, and 4.x was treating a transient FDR 403 (a[missing-redirects]rule warning) as fatal —fern checkexits 1 with no surface-level error, andfern generate --docs --previewfails the same way. This has broken every "Fern docs (check)" and "Preview Fern Docs: Comment" run since 2026-04-28 (e.g. PR docs: improve product overview #1186 has no preview comment because of it).[email protected] check→ exit 1,[email protected] check→ exit 0 (same FDR 403 still appears in debug logs but is correctly downgraded to a warning).npx -y fern-api@latest. CI and local dev always run current Fern, no maintenance.Net diff: +10 / −242 lines (most of which is the deleted
fern/package-lock.json).Test plan
rm -rf fern/node_modules && cd fern && npm run check→ exit 0:herb:preview link on this PR (this is the real-world validation that the workflow change works)fern/also gets a preview comment and a green check🤖 Generated with Claude Code