Skip to content

Fix fallback workspace key derivation in forceStopDaemon

699fe46
Select commit
Loading
Failed to load commit list.
Merged

feat: Workspace filesystem cleanup #391

Fix fallback workspace key derivation in forceStopDaemon
699fe46
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-simplifier completed May 4, 2026 in 13m 44s

3 issues

code-simplifier: Found 3 issues (3 low)

Low

runStartupLifecycleSweep defined but never invoked in hunk - `src/daemon.ts:152-171`

The hunk defines a runStartupLifecycleSweep arrow function but does not show it being called within the visible changes. If it is never invoked, this is dead code; if invoked elsewhere, the indirection adds complexity without clear benefit. Per the simplifier principle of avoiding redundant abstractions, consider inlining the try/catch at the call site rather than wrapping it in a named lambda.

Nested ternary reduces clarity in shouldRecoverLockDir - `src/utils/fs-lock.ts:78-82`

The early-return branch uses a ternary on await isDirectoryOlderThan(...) to construct one of two object literals. The skill explicitly calls out avoiding ternaries for multi-branch decisions and prefers explicit if/else for clarity. Replacing with an if/else makes the recovery decision easier to read and debug.

Overly complex type for test helper parameter reduces clarity - `src/utils/runtime-instance.ts:51-54`

The setRuntimeInstanceForTests parameter type uses a nested Omit/Partial/Pick composition that is hard to read. Per the skill's clarity principle, explicit code is preferable to compact/clever type expressions. A simpler inline interface or type alias would be easier to understand and maintain.


Duration: 13m 40s · Tokens: 627.3k in / 2.1k out · Cost: $3.51 (+merge: $0.00)