Skip to content

feat(ir): add OAuthAuthorizationCode.redirectUriBackupPorts for loopback port fallback - #17281

Merged
rishabh-fern merged 1 commit into
mainfrom
devin/1785333853-ir-oauth-redirect-backup-ports
Jul 29, 2026
Merged

feat(ir): add OAuthAuthorizationCode.redirectUriBackupPorts for loopback port fallback#17281
rishabh-fern merged 1 commit into
mainfrom
devin/1785333853-ir-oauth-redirect-backup-ports

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Description

Add one additive, optional IR field to the authorization-code (PKCE) OAuth config so a generated CLI can fall back across a pre-registered set of loopback callback ports. Ships as @fern-fern/ir-sdk@67.18.0. Pure schema addition — no consumer behavior change, no migration. Config parsing/converter/validator/generator/runtime all live in the follow-up generator PR.

Schema (ir-types-latest/definition/auth.yml), added to OAuthAuthorizationCode right after redirectUri:

redirectUriBackupPorts:
  type: optional<list<integer>>

Regenerated SDK shape (noOptionalProperties → required key typed | undefined):

// api
redirectUriBackupPorts: number[] | undefined;
// serialization
redirectUriBackupPorts: core.serialization.list(core.serialization.number()).optional(),

OAuthDeviceCode is untouched (device grant has no browser callback).

Changes Made

  • ir-types-latest/definition/auth.yml: add OAuthAuthorizationCode.redirectUriBackupPorts (optional<list<integer>>); append a discoverability sentence to the redirectUri doc.
  • Regenerated OAuthAuthorizationCode.ts (api + serialization) via fern generate --api ir-types-latest --local.
  • Bump ir-types-latest/VERSION 67.17.067.18.0 (minor, additive) + IR CHANGELOG.md entry.
  • CLI changelog: packages/cli/cli/changes/unreleased/ir-oauth-redirect-backup-ports.yml (type: internal).
  • Deviation from plan: two existing tests construct an OAuthAuthorizationCode (register/.../convertAuth.test.ts and ir-generator-tests/.../oauthPublicClientDynamic.test.ts). Because noOptionalProperties makes the new key a required | undefined property, each fixture needed redirectUriBackupPorts: undefined added to compile. No versions.yml irVersion, generators.yml coordinate, or migration changes.

Testing

  • pnpm --filter @fern-api/ir-sdk compile
  • pnpm turbo run compile --filter=@fern-api/register --filter=@fern-api/ir-generator --filter=@fern-api/ir-generator-tests
  • pnpm turbo run test for @fern-api/register + @fern-api/ir-generator-tests (all green)
  • git status shows only the expected files

Link to Devin session: https://app.devin.ai/sessions/55f07ebd06b74a67a8e6102098d8ffbf


Open in Devin Review

…ack port fallback

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

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@nitpickybot nitpickybot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review Summary

Purely additive IR schema change: adds OAuthAuthorizationCode.redirectUriBackupPorts as optional<list<integer>>, regenerates the SDK types/serializers, bumps the IR minor version, and patches two test fixtures for the noOptionalProperties required-key style. Consistent with the existing redirectUri field and the surrounding conventions; no functional risk to existing consumers. Only nit is a likely-wrong changelog date (though it matches the prior entry).

  • 🔵 1 suggestion(s)

Comment thread packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md

@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@github-actions

Copy link
Copy Markdown
Contributor

Docs Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-07-29T05:02:48Z).

Fixture main PR Delta
docs 271.4s (n=5) 266.6s (35 versions) -4.8s (-1.8%)

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-07-29T05:02:48Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-07-29 14:39 UTC

@github-actions

Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-07-29T05:02:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 71s (n=5) N/A 86s +15s (+21.1%)
go-sdk square 143s (n=5) 253s (n=5) 129s -14s (-9.8%)
java-sdk square 225s (n=5) 235s (n=5) 214s -11s (-4.9%)
php-sdk square 61s (n=5) N/A 72s +11s (+18.0%)
python-sdk square 132s (n=5) 229s (n=5) 139s +7s (+5.3%)
ruby-sdk-v2 square 107s (n=5) 121s (n=5) 101s -6s (-5.6%)
rust-sdk square 213s (n=5) 184s (n=5) 201s -12s (-5.6%)
swift-sdk square 77s (n=5) 445s (n=5) 57s -20s (-26.0%)
ts-sdk square 148s (n=5) 159s (n=5) 171s +23s (+15.5%)

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-07-29T05:02:48Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-07-29 14:40 UTC

@rishabh-fern
rishabh-fern merged commit 93108ac into main Jul 29, 2026
225 checks passed
@rishabh-fern
rishabh-fern deleted the devin/1785333853-ir-oauth-redirect-backup-ports branch July 29, 2026 14:46
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.

2 participants