Skip to content

fix(cli): warn about legacy behavior that fern sdk migrate drops - #18914

Open
devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1795617551-sdk-migrate-drift-diagnostics
Open

devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1795617551-sdk-migrate-drift-diagnostics

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Jira ticket: SDK-3463

fern sdk migrate dropped several legacy behaviors without printing a diagnostic. I found them by generating a seed spec with the legacy generators and again after migration. Each one now produces a warning, and each warning fails --strict.

Changes Made

  • FERN_API_AUTH_FIELD_UNSUPPORTED for a header auth name or bearer token.name that differs from the SDK Config default (apiKey / token). SDK Config v1 auth schemes have no field for the option name. The warning gives the x-fern-header / x-fern-bearer overlay that keeps the name. Covers the bearer half of SDK-3447.
  • FERN_API_IMPORT_SETTING_UNSUPPORTED for each generators.yml API setting that SDK Config v1 can't carry, for example filter, resolve-aliases, coerce-consts-to and example-generation (UNMIGRATED_API_IMPORT_SETTING_KEY_PAIRS). The setting is flagged on workspace specs and on generator api overrides. remove-discriminants-from-schemas: always is the default, so it isn't flagged.
  • FERN_SPEC_EXTENSION_UNSUPPORTED (scanSourceSpecExtensions.ts) for x-fern-base-path, x-fern-sdk-variables, and offset x-fern-pagination without step. These are found in OpenAPI specs and their overlays.
  • Changelog entry.

The spec-extension warnings describe what sdk-gen-core does today. They should be removed once the sdk-gen-core PRs that add support for these extensions ship.

Testing

  • Unit tests added/updated (driftDiagnostics.test.ts). The full sdk-migrate suite passes (120 tests).
  • Manual testing completed

Link to Devin session: https://app.devin.ai/sessions/25aa81329a9e413b9b5633a0c28ecd8c
Open in Devin Desktop: https://app.devin.ai/desktop/session/25aa81329a9e413b9b5633a0c28ecd8c?variant=devin
Requested by: @cdonel707


🟢 Devin fixed all 3 findings · Follow Devin's work

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@nitpickybot nitpickybot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AI Review Failed

I couldn't complete this review.

Error: The AI returned an invalid review response.

Comment /ai-review to try again.

cdonel707 and others added 5 commits November 25, 2026 14:47
…y check

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nfig

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…rget

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 3 findings. Devin automatically fixed all 3 findings.

Fixed by Devin (3)
  • Missing warnings for later SDK targets — Real gap. Merged targets now carry the union of every target's unmigratedApiImportSettings, so the diagnostics and --strict cover all of them.
  • Compatible SDK targets rejected — Real regression: two targets that differ only in a dropped setting were rejected. The fingerprint now ignores unmigratedApiImportSettings.
  • Supported union setting blocks migration — SDK Config v1 has apiImportSettings.inferDiscriminatedUnionBaseProperties, so migrate now carries the setting over instead of warning.

View findings in Devin Review · Follow Devin's work

Devin Review

This branch has not been deployed

No deployments
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