Repository navigation
fix(worktree): find mise and put its Ruby first in Orca's setup shell (#268) - #269
Merged
Merged
Conversation
Add script/worktree/with_mise: mise on the PATH, else the usual install directories; no mise is an error unless --optional. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mise (#268) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… exec (#268) A login bash keeps mise's tool directories but behind /usr/bin; mise exec does not move a directory already in the PATH, so setup ran on Ruby 2.6. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #268.
Cause
Two things, both about the environment Orca's setup shell (
bash -lc 'eval "${ORCA_SEQUENCED_SETUP_SCRIPT}"') has, which #226's check (from an interactive shell with mise active) never saw:/usr/bin:/bin:/usr/sbin:/sbin; a loginbashdoesn't activate mise.mise execgivescommand not found(127), and the post-checkout hook's "no mise, run as is" fallback ranbin/setupon macOS's Ruby 2.6 (the error in Orca worktree setup still runs bin/setup on the system Ruby #268).bash -lc), mise'sinstalls/ruby/4.0.7/binis in the PATH but behind/usr/bin(macOS path_helper), andmise execdoesn't move a directory already in the PATH.mise exec -- ruby -vsaid 4.0.7, butmise exec -- sh -c 'command -v ruby'said/usr/bin/ruby, sobin/setup's#!/usr/bin/env rubyandbundleran on 2.6. Unsetting the__MISE_*variables changed nothing; only the PATH order matters.Fix
script/worktree/with_mise [--optional] COMMAND…finds mise (PATH, then~/.local/bin,/opt/homebrew/bin,/usr/local/bin, Linuxbrew,~/.cargo/bin;COLLECTOR_MISE_SEARCHoverrides), drops mise's owninstalls/*andshimsdirectories from the PATH, and runsmise exec -- COMMAND. No mise is exit 127 with a message;--optional(the hook, for CI runners) runs the command as is.orca.yamland.githooks/post-checkoutuse it. Cause recorded in theorca.yamlcomment, the script's header, CLAUDE.md's Worktrees fact anddocs/lessons/2026-11-09-orca-setup-shell-has-no-mise.md.Evidence
Before (main, real worker-start worktree; the setup terminal):
Could not find 'bundler' (4.0.20) … Ruby.framework/Versions/2.6 … bin/setup:10:in 'system', agent skipped (failedStage=agent_readiness). The first version of the fix (finding mise only) failed identically in that terminal, which is how cause 2 was found.After (this branch,
orca orchestration worker-start --worktree new-top-level --base-branch 268-orca-setup-system-ruby): stateready, setup terminal:Specs:
spec/script/worktree/with_mise_spec.rb(9),spec/githooks/post_checkout_spec.rb,spec/project_config_spec.rb;bin/cipasses at the pushed SHA (pre-push hook).🤖 Generated with Claude Code