Skip to content

fix(setup): run worktree setup through mise exec (closes #225) - #226

Merged
plainprogrammer merged 2 commits into
mainfrom
225-setup-through-mise
Nov 8, 2026
Merged

plainprogrammer merged 2 commits into
mainfrom
225-setup-through-mise

Conversation

@plainprogrammer

Copy link
Copy Markdown
Owner

Closes #225.

Problem. Orca runs orca.yaml's setup and the post-checkout hook in its own environment. That environment carries the global mise Ruby (4.0.4), not the 4.0.7 that .ruby-version names, so worktree setup ran bundle check/bundle install and db:prepare on the wrong Ruby. Ruby 4.0.4's gem-installed Bundler 4.0.20 then wrote its own checksum into Gemfile.lock, which is why every Orca worktree started with the lockfile modified. Full diagnosis in #225.

Change (maintainer's choice: opinionated shared tool config):

  • orca.yaml: mise exec -- bin/setup --skip-server.
  • .githooks/post-checkout: the same when mise is on the PATH; plain bin/setup --skip-server otherwise (GitHub's runners have no mise).

Tests, red first (526bd11b, then the fix 074aafdc):

  • spec/project_config_spec.rb: orca.yaml runs setup through mise exec.
  • spec/githooks/post_checkout_spec.rb: a stub mise on the PATH receives exec -- bin/setup --skip-server. Without mise on the PATH, setup runs directly. The fallback example passed before the change too; it guards the fallback.

End to end, from a PATH that resolves Ruby 4.0.4 (as Orca's does):

  • git worktree add through the new hook ran mise exec -- bin/setup --skip-server, and Gemfile.lock stayed clean.
  • Control in the same worktree: plain bin/setup --skip-server on 4.0.4 left Gemfile.lock modified. On 4.0.4 even a satisfied bundle check rewrites the lockfile.
  • From that PATH, ruby is 4.0.4 and mise exec -- ruby is 4.0.7.

Depends on mise reading .ruby-version: this machine's idiomatic_version_file_enable_tools includes ruby. Recent mise versions leave it off by default.

The pre-push hook ran the full bin/ci on this head.

🤖 Generated with Claude Code

plainprogrammer and others added 2 commits November 8, 2026 17:04
orca.yaml's setup and the post-checkout hook must run bin/setup through
`mise exec`, so it uses the Ruby that .ruby-version names rather than the
global one in Orca's environment. The hook falls back to plain bin/setup
where mise isn't on the PATH (CI runners). Red: orca.yaml and the hook run
bin/setup directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orca runs orca.yaml's setup and the post-checkout hook in its own
environment, which carries the global mise Ruby (4.0.4) instead of the
4.0.7 that .ruby-version names. There `bundle check` failed, `bundle
install` ran on the wrong Ruby, and its gem-installed Bundler wrote its own
checksum into Gemfile.lock. Both now run `mise exec -- bin/setup
--skip-server`; the hook falls back to plain bin/setup without mise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@plainprogrammer plainprogrammer self-assigned this Nov 8, 2026
@plainprogrammer
plainprogrammer merged commit 9692a90 into main Nov 8, 2026
9 checks passed
@plainprogrammer
plainprogrammer deleted the 225-setup-through-mise branch November 8, 2026 22:16
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.

Orca worktree setup runs on the global Ruby, not .ruby-version's, and dirties Gemfile.lock

1 participant