Skip to content

fix(cli): scope PR update to current generator and fix CI concurrency#12331

Merged
davidkonigsberg merged 1 commit intomainfrom
devin/1770995207-fix-remote-local-parity-ci
Feb 13, 2026
Merged

fix(cli): scope PR update to current generator and fix CI concurrency#12331
davidkonigsberg merged 1 commit intomainfrom
devin/1770995207-fix-remote-local-parity-ci

Conversation

@davidkonigsberg
Copy link
Collaborator

Description

Refs: Devin session
Requested by: @davidkonigsberg

Fixes the test-remote-vs-local-generation-parity workflow that has been failing since Feb 9 (when PR #11502 / v3.70.0 introduced the PR update feature for self-hosted GitHub generation).

Root cause: When multiple generators (ts-sdk, java-sdk, go-sdk, python-sdk) run concurrently in CI, they all target fern-api/empty and findExistingUpdatablePR finds the same most-recently-updated PR for all of them. They all try to push to the same branch, causing non-fast-forward rejections on all but the first push. Retries don't help because each retry hits the same race.

Changes Made

  • Generator-scoped branch prefixes: Branch naming changes from fern-bot/{date} to fern-bot/{generator-name}/{date} (e.g. fern-bot/fernapi-fern-typescript-sdk/2026-02-13_...). findExistingUpdatablePR now filters by this generator-specific prefix, so generators only find and update their own PRs.
  • Workflow concurrency: Changed cancel-in-progress: truefalse. With GitHub Actions, this lets the current run finish while cancelling any intermediate pending runs, so only the newest queued run executes next (instead of constantly cancelling in-progress jobs).
  • CLI versions.yml: Added v3.77.1 changelog entry.

Review Checklist

  • Backward compatibility: Existing PRs with old fern-bot/{date} branches won't be matched by the new prefix filter. First generation after this change will create a new PR instead of updating existing ones — acceptable one-time transition?
  • generatorName is optional: Falls back to "fern-bot/" (old behavior) when undefined. In practice, generatorInvocation.name is always defined at the call site — verify this is safe.
  • Branch name sanitization: Only replaces / with -. Are there other characters in generator names that could be invalid in git branch names?
  • Same-generator race: This fix prevents cross-generator races but doesn't address two concurrent runs of the same generator. Not an issue for the test workflow (one job per generator), but worth considering for production.

Testing

  • Lint passes (pnpm run check)
  • CI workflow validation (requires full environment with tokens and fern-api/empty repo — will validate post-merge)

Co-Authored-By: David Konigsberg <davidakonigsberg@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 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 and CI monitoring

@davidkonigsberg davidkonigsberg merged commit fcfbd31 into main Feb 13, 2026
82 of 83 checks passed
@davidkonigsberg davidkonigsberg deleted the devin/1770995207-fix-remote-local-parity-ci branch February 13, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants