Skip to content

fix(doctor): remove duplicate LocalConfig import breaking main CI - #606

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
jeff-r2026:fix/doctor-dup-localconfig-import
Sep 17, 2026
Merged

jeff-r2026 merged 1 commit into
Tencent:mainfrom
jeff-r2026:fix/doctor-dup-localconfig-import

Conversation

@jeff-r2026

Copy link
Copy Markdown
Collaborator

Problem

main CI has been red since #599 (and stayed red through #594). All four
Lint & Test jobs (Node 20/22 × ubuntu/macos) fail at the Type check
step with:

src/doctor.ts(5,30): error TS2300: Duplicate identifier 'LocalConfig'.
src/doctor.ts(14,8): error TS2300: Duplicate identifier 'LocalConfig'.

Root cause

src/doctor.ts imports LocalConfig twice from ./types.js:

  • line 5 — import type { GlobalOptions, LocalConfig } from './types.js';
  • line 14 — type LocalConfig, inside the grouped import block

tsc --noEmit rejects this (TS2300) and exits 2.

The two imports were added on separate PRs and merged without a textual
conflict, so each PR's own branch build passed — they only collided at the
type level once both landed on main.

Fix

One line: drop the LocalConfig binding from line 5 and keep it in the
grouped block alongside TeamaiConfig, matching the surrounding style.

Test plan

Run locally against origin/main (3d4353f) with the fix applied:

  • npx tsc --noEmit → exit 0, no errors
  • npm run build → Build success
  • npx vitest run src/__tests__/doctor.test.ts → 22/22 passed
  • npx vitest run (full suite) → 235 files / 3305 tests passed

src/doctor.ts imported LocalConfig twice — once in the top type-only
import (line 5) and once in the grouped import block from './types.js'.
TypeScript rejected this with TS2300 (Duplicate identifier 'LocalConfig'),
so `tsc --noEmit` failed and the main CI has been red since Tencent#599.

The two imports landed cleanly as a merge (no textual conflict) but
collided at the type level, so each PR's own branch build was green.

Drop the LocalConfig binding from line 5 and keep it in the grouped
block alongside TeamaiConfig, matching the surrounding style.
@jeff-r2026
jeff-r2026 merged commit d3f8634 into Tencent:main Sep 17, 2026
8 checks passed
@jeff-r2026
jeff-r2026 deleted the fix/doctor-dup-localconfig-import branch September 17, 2026 04:42
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