Skip to content

Fix TS2300 duplicate formatBytes import in doctor.ts (broken build on main)#1249

Closed
waleedkadous wants to merge 4 commits into
mainfrom
builder/task-08Gm
Closed

Fix TS2300 duplicate formatBytes import in doctor.ts (broken build on main)#1249
waleedkadous wants to merge 4 commits into
mainfrom
builder/task-08Gm

Conversation

@waleedkadous

Copy link
Copy Markdown
Contributor

Problem

Main fails to compile: packages/codev/src/commands/doctor.ts imports formatBytes twice — from ../lib/migration-backup-audit.js (line 27) and ../agent-farm/servers/session-log-sweep.js (line 36) — causing a TS2300 duplicate identifier. Introduced by PR #1243 (session-log sweep doctor check).

Root Cause

Two independent formatBytes implementations were imported under the same name after the session-log-sweep check merged alongside the existing migration-backup check.

Fix

Aliased the session-log-sweep import as formatBytes as formatLogBytes and updated its single call site (the session-log summary at line 111, which formats bytes from measureSessionLogs). The migration-backup import and its call site (line 847) are unchanged. One file, 2-line diff.

Testing

pnpm exec tsc --noEmit in packages/codev (after building @cluesmith/codev-core) passes with zero errors.

🤖 Generated with Claude Code

Alias session-log-sweep's formatBytes as formatLogBytes and update its
call site; migration-backup-audit's formatBytes stays unaliased. Fixes
the broken build on main introduced by PR #1243.
@waleedkadous

Copy link
Copy Markdown
Contributor Author

Superseded by hotfix PR #1248 (the call-site-paired alias fix for the same TS2300 duplicate formatBytes), which merged one minute after this PR opened. Verified main already carries the aliased import (doctor.ts line 37: formatBytes as formatLogBytes). Closing as redundant.

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