hotfix: drop dead ai-gateway/config import from lib/auth.ts#1095
Merged
hotfix: drop dead ai-gateway/config import from lib/auth.ts#1095
Conversation
PR #1049 (chore: remove Vercel fork relics) deleted lib/ai-gateway/ and removed the isAiGatewayManagedKeysEnabled import from lib/auth.ts. PR #1048 (KEEP-240) added a TRUSTED_ORIGINS import to the same import block. When #1049 merged staging in, git's three-way merge silently kept both the addition and the line that #1049 was supposed to delete (no line-level conflict because they were adjacent but distinct lines). The lib/ai-gateway/config.ts file deletion went through cleanly, leaving lib/auth.ts importing from a non-existent path. CI build then failed with: ./lib/auth.ts:19 Type error: Cannot find module './ai-gateway/config' or its corresponding type declarations. The symbol is referenced nowhere else in lib/auth.ts after #1049's intent, so the fix is to delete the orphaned import line - the same change #1049 made on its source branch. Verification: pnpm type-check passes.
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
ℹ️ No PR Environment to Clean UpNo PR environment was found for this PR. This is expected if:
|
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
Fixes the
stagingbuild failure introduced by run 25268333761.Root cause
A semantic merge conflict between two PRs that both touched
lib/auth.ts's import block:chore: remove Vercel fork relics, commit627716bf) deletedlib/ai-gateway/AND removed theimport { isAiGatewayManagedKeysEnabled } from "./ai-gateway/config"line fromlib/auth.ts.fix: KEEP-240 csrf origin check) addedimport { TRUSTED_ORIGINS } from "@/lib/trusted-origins"to the same import block.When PR #1049's branch merged staging in via
815081a0, git's three-way merge saw a deletion on one side and an unrelated addition on the other (different lines, no textual conflict) and silently kept both — including the line that PR #1049 was supposed to delete. Thelib/ai-gateway/config.tsfile deletion went through cleanly (no conflict on a deleted file), so post-mergelib/auth.ts:19imported from a non-existent path:./lib/auth.ts:19 Type error: Cannot find module './ai-gateway/config' or its corresponding type declarations.The
isAiGatewayManagedKeysEnabledsymbol is referenced nowhere else inlib/auth.ts— pure dead-import residue.Fix
Delete the orphaned import line. One-line change, identical to what PR #1049 had on its source branch.
Followup worth filing separately
Per-PR CI passes against the PR's pre-merge commit, so semantic conflicts of this shape (deletion in branch A vs unrelated addition in branch B touching the same file but different lines) are invisible to it. They're only caught by post-merge CI on
staging. Worth considering branch-protection or a merge-queue setup that re-runs CI on the post-merge SHA.Test plan
pnpm type-checkpasses locallybuild-images / buildpasses on this branch