Conversation
- Remove spurious async in sync Effect.try handler (interactive-command.service) - Replace Date.now() with Effect DateTime in session and task services - Fix double initWorkspace call in attach-workspace command - Fix broken test mock in remove-workspace test (mainProjectCwd) - Replace duplicate dry-run test with proper noop spawner test - Fix typo in list-branch-project span name (brach -> branch) - Simplify force flag spreading in destroy-workspace service
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b084ed153
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const mainProjectPath = yield* fileSystem.mainProjectCwd(projectModel); | ||
|
|
||
| yield* sandbox.detach(projectModel); |
There was a problem hiding this comment.
Detach workspace before filesystem path lookup
destroyWorkspace now resolves mainProjectCwd before calling sandbox.detach, which introduces a new failure path where detach is skipped entirely if path resolution fails (for example, when mainCwd cannot create/read the repo root due to permissions or filesystem errors). In the previous flow, detach happened first, so tmux/session cleanup still occurred even if later filesystem work failed.
Useful? React with 👍 / 👎.
Summary
Fixes 8 bugs found during a comprehensive code review of the codebase.
core/.../interactive-command.service.tsasyncfromEffect.try's synctryhandler wrappingBun.spawnSynccore/.../sql-session.service.tsDate.now()→ EffectDateTime.nowfor clock-based consistencycore/.../sql-task.service.tsDate.now()→ EffectDateTime.nowfor clock-based consistencycli/.../attach-workspace.command.tsinitWorkspacecall whenproject.isMain() && config.createcli/test/remove-workspace.test.tsmainProjectCwdusedEffect.diebut was called unconditionallycli/test/dry-run.test.tsworkspace.common.test.tswith proper noop spawner testcore/.../list-branch-project.use-case.tslist-brach→list-branchin span namecore/.../destroy-workspace.service.ts...(force ? { force: true } : {})→force