Skip to content

fix: code review bug fixes#96

Open
blntrsz wants to merge 1 commit intomainfrom
fix/code-review-fixes
Open

fix: code review bug fixes#96
blntrsz wants to merge 1 commit intomainfrom
fix/code-review-fixes

Conversation

@blntrsz
Copy link
Copy Markdown
Owner

@blntrsz blntrsz commented Mar 29, 2026

Summary

Fixes 8 bugs found during a comprehensive code review of the codebase.

# File Fix
1 core/.../interactive-command.service.ts Removed spurious async from Effect.try's sync try handler wrapping Bun.spawnSync
2 core/.../sql-session.service.ts Date.now() → Effect DateTime.now for clock-based consistency
3 core/.../sql-task.service.ts Date.now() → Effect DateTime.now for clock-based consistency
4 cli/.../attach-workspace.command.ts Eliminated double initWorkspace call when project.isMain() && config.create
5 cli/test/remove-workspace.test.ts Fixed mock: mainProjectCwd used Effect.die but was called unconditionally
6 cli/test/dry-run.test.ts Replaced duplicate of workspace.common.test.ts with proper noop spawner test
7 core/.../list-branch-project.use-case.ts Typo: list-brachlist-branch in span name
8 core/.../destroy-workspace.service.ts Simplified ...(force ? { force: true } : {})force

- 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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +18 to 20
const mainProjectPath = yield* fileSystem.mainProjectCwd(projectModel);

yield* sandbox.detach(projectModel);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant