Fix TS2300 duplicate formatBytes import in doctor.ts (broken build on main)#1249
Closed
waleedkadous wants to merge 4 commits into
Closed
Fix TS2300 duplicate formatBytes import in doctor.ts (broken build on main)#1249waleedkadous wants to merge 4 commits into
waleedkadous wants to merge 4 commits into
Conversation
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.
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: |
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.
Problem
Main fails to compile:
packages/codev/src/commands/doctor.tsimportsformatBytestwice — 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
formatBytesimplementations 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 formatLogBytesand updated its single call site (the session-log summary at line 111, which formats bytes frommeasureSessionLogs). The migration-backup import and its call site (line 847) are unchanged. One file, 2-line diff.Testing
pnpm exec tsc --noEmitinpackages/codev(after building@cluesmith/codev-core) passes with zero errors.🤖 Generated with Claude Code