feat: Workspace filesystem cleanup #391
2 issues
code-simplifier: Found 2 issues (2 low)
Low
Nested ternary reduces clarity in shouldRecoverLockDir - `src/utils/fs-lock.ts:78-82`
The early-return branch uses a ternary inside a return expression to choose between two object literals. The code-simplifier skill explicitly calls out avoiding nested/conditional ternaries in favor of explicit if/else for multiple conditions. Replacing it with an if/else makes the recovery decision easier to read and debug.
Overly complex type signature in setRuntimeInstanceForTests reduces clarity - `src/utils/runtime-instance.ts:51-54`
The new parameter type Omit<RuntimeInstance, 'workspaceKey'> & Partial<Pick<RuntimeInstance, 'workspaceKey'>> is dense and hard to parse at a glance. Per the skill's clarity principle (prefer explicit code over overly compact solutions), defining an explicit named type or simply accepting RuntimeInstance | null and requiring callers to provide workspaceKey would be more readable and maintainable.
Duration: 14m 34s · Tokens: 790.7k in / 1.9k out · Cost: $4.58 (+merge: $0.00)