Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Claude finished @cngonzalez's task —— View job Code Review Complete ✅Issues That Need Fixing:1. Potential Double Error Message in findProjectRootSync.ts:70-73 Fix: Only wrap non-descriptive errors or extract specific error types: } catch (err: unknown) {
if (err instanceof Error && err.message.includes('No project root found')) {
throw err // Re-throw descriptive errors as-is
}
const message = err instanceof Error ? err.message : `${err}`
throw new Error(`Error occurred trying to resolve project root:\n${message}`)
}2. Missing Error Handling in getCliConfigSync.ts:44 Fix: Add try-catch around the require call: try {
const require = createRequire(import.meta.url)
const loaded = require(configPath)
cliConfig = tryGetDefaultExport(loaded) as CliConfig | undefined
} catch (requireErr: unknown) {
const message = requireErr instanceof Error ? requireErr.message : `${requireErr}`
throw new Error(`Failed to load CLI config from ${configPath}: ${message}`)
} finally {
unregister()
}3. Insufficient Test Coverage for Error Paths
Fix: Add tests for these error scenarios in 4. Potential Memory Leak in configClient.ts:5-12 Fix: Wrap in try-catch or use conditional initialization: let token: string | undefined
try {
token = await getCliToken()
} catch {
// Token will remain undefined, handled by downstream code
}
if (token) {
getCliClient.__internal__getToken = () => token
} |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9b138c8 to
b3e2836
Compare
2950118 to
db43757
Compare
b3e2836 to
90d88cb
Compare
90d88cb to
7d1afbd
Compare
b3ce1ac to
a3a3c07
Compare
c3c0d6c to
a37651e
Compare
|
To address the Claude feedback:
|
ryanbonial
left a comment
There was a problem hiding this comment.
Approved with one non-blocking error message wording fix suggestion.
a37651e to
1754fd5
Compare
1754fd5 to
d47bb70
Compare

Description
Moves
cliClient.tsto the new CLI. This is only used inexec, so its impact is pretty limited. It's a bit larger than I'd like because it would be a breaking change to make getting the client asynchronous, so some functions had to be duplicated in a synchronous way.What to review
Are we using all utilities in the correct way? Anything look out of place?
Testing
Has some basic tests, and is tested via integration test in #186 .