Skip to content

hotfix: drop dead ai-gateway/config import from lib/auth.ts#1095

Merged
suisuss merged 1 commit intostagingfrom
hotfix/auth-dead-import-ai-gateway-config
May 3, 2026
Merged

hotfix: drop dead ai-gateway/config import from lib/auth.ts#1095
suisuss merged 1 commit intostagingfrom
hotfix/auth-dead-import-ai-gateway-config

Conversation

@suisuss
Copy link
Copy Markdown

@suisuss suisuss commented May 3, 2026

Summary

Fixes the staging build failure introduced by run 25268333761.

Root cause

A semantic merge conflict between two PRs that both touched lib/auth.ts's 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. The lib/ai-gateway/config.ts file deletion went through cleanly (no conflict on a deleted file), so post-merge lib/auth.ts:19 imported from a non-existent path:

./lib/auth.ts:19 Type error: Cannot find module './ai-gateway/config' or its corresponding type declarations.

The isAiGatewayManagedKeysEnabled symbol is referenced nowhere else in lib/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-check passes locally
  • CI build-images / build passes on this branch

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.
@suisuss suisuss merged commit 6abd7fc into staging May 3, 2026
25 checks passed
@suisuss suisuss deleted the hotfix/auth-dead-import-ai-gateway-config branch May 3, 2026 03:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1095
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

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