Skip to content

fix: 默认使用原生 worktree 模式,--mode / FSC_EXECUTION_MODE 真正生效 - #11

Merged
2233admin merged 1 commit into
mainfrom
fix/native-default-mode
Oct 25, 2026
Merged

2233admin merged 1 commit into
mainfrom
fix/native-default-mode

Conversation

@2233admin

Copy link
Copy Markdown
Owner

问题

FSC 的 agent 是原生进程,不是 Docker 容器,但默认配置是 executionMode: docker,而且 run --mode 根本不生效:configReader 没有读取 FSC_EXECUTION_MODE,CLI 设置的环境变量被无声丢弃。帮助文字写默认 bare,实际跑的是 docker。

改动

  • 默认 executionMode 改为 worktree(原生 git worktree),harnessMode 改为 local;docker 保留为可选。
  • configReader 读取 FSC_EXECUTION_MODE,非法值直接报错。
  • ExecutionMode 类型补上 worktree,去掉 as any。
  • CLI --mode 默认值与说明对齐。
  • README 执行模式一节按原生优先重写。
  • 新增 2 个测试:默认值,环境变量覆盖与校验。

验证

  • tsc --noEmit:退出码 0
  • bun test:三次完整运行分别是 176 通过 0 失败、175 通过 1 失败、176 通过 0 失败。失败的是不同的计时类测试(UnifiedScheduler (MockScheduler)、CodeCommitter),本机同时有其他会话在跑,负载高;单独跑 scheduler.test.ts 三次均通过。未做根因排查,应视为偶发。
  • 未跑:45 个跳过的 Docker 集成测试;没有用真实 agent 在 worktree 模式下端到端跑过。

🤖 Generated with Claude Code

https://claude.ai/code/session_016FSVfwwP6TVxGLUWatWM53

… now take effect

- FSC_EXECUTION_MODE was never read by configReader, so `run --mode` was silently
  ignored and every run used docker regardless of the flag or --help text
- default executionMode docker -> worktree, harnessMode docker -> local; docker stays optional
- ExecutionMode type now includes "worktree" (was cast through any); invalid values throw
- README execution-mode section rewritten around native worktree

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FSVfwwP6TVxGLUWatWM53
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ff2945b-d0c2-487d-94e7-cba71479aeea
Commits

Reviewing files that changed from the base of the PR and between 1b94213 and cbc0422.

Files selected for processing: 8
  • README.md
  • packages/cli/src/index.ts
  • packages/core/src/config.ts
  • packages/core/src/configReader.ts
  • packages/core/src/taskExecutor.ts
  • packages/core/src/taskSolver.ts
  • packages/core/src/taskSolverManager.ts
  • packages/core/test/configReaderSupplementary.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@2233admin
2233admin merged commit 3a6a7f2 into main Oct 25, 2026
2 checks passed
@2233admin
2233admin deleted the fix/native-default-mode branch October 25, 2026 13:43
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