Skip to content

chore: add orca.yaml and .worktreeinclude for worktree setup - #132

Merged
amondnet merged 3 commits into
mainfrom
chore/orca-worktree-setup
Oct 22, 2026
Merged

amondnet merged 3 commits into
mainfrom
chore/orca-worktree-setup

Conversation

@amondnet

@amondnet amondnet commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Orca worktree setup so a new worktree is ready to use without manual steps:

  • orca.yaml — scripts.setup copies gitignored local files from the main checkout via bunx @pleaseai/worktreeinclude, then runs bun install.
  • .worktreeinclude — lists the gitignored files to copy (.env*, per-app/package .env, .claude/settings.local.json, .mcp.local.json, .turbo/config.json). A file is copied only if it matches here and is gitignored.

No source, build, or CI changes.

Related issue

None.

Checklist

  • PR title follows Conventional Commits
  • Tests added or updated, and the suite passes (bun run test) — n/a, config only
  • Lint/format pass (bun run lint)
  • Documentation updated if behavior changed — n/a
  • No breaking change, or a BREAKING CHANGE: note is included

Summary by cubic

Adds Orca worktree setup so a new worktree is ready to use without manual steps.

  • orca.yaml runs setup through mise (trust, install, exec) so it uses the bun pinned in mise.toml, copies gitignored local files from the main checkout via @pleaseai/worktreeinclude@0.1.0 (pinned for reproducibility), then runs bun install; the script aborts on unset ORCA_* variables and pins every step to the worktree path.
  • .worktreeinclude lists which gitignored files get copied (.env*, app/package .env files, .claude/settings.local.json, .mcp.local.json, .turbo/config.json); a file is copied only if it's listed here and gitignored. .gitignore now includes /.mcp.local.json so that entry is actually copied.

No source, build, or CI changes.

Written for commit 8258aca. Summary will update on new commits.

Turn on auto-fix

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces configuration files for Orca, a worktree-native IDE. It adds .worktreeinclude to specify gitignored local files to copy into new worktrees, and orca.yaml to define the setup script that copies these files and installs dependencies. The review feedback recommends pinning the version of the @pleaseai/worktreeinclude package in the setup script to ensure reproducible and secure setups.

Comment thread orca.yaml Outdated
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@amondnet
amondnet marked this pull request as ready for review October 22, 2026 14:38
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds automatic setup for new Orca worktrees.

  • Orca worktrees now copy local setup files and install dependencies.

Both previous, unnumbered findings are fixed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "chore: apply AI code review suggestions" · Reviewed by Greptile

Comment thread .worktreeinclude
Comment thread orca.yaml Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Architecture diagram
sequenceDiagram
    participant Orca as Orca Worktree Manager
    participant Setup as orca.yaml setup script
    participant WI as worktreeinclude CLI
    participant FS as Filesystem
    participant Bun as Bun Installer

    Note over Orca,Bun: Orca Worktree Creation Flow

    Orca->>Orca: Create new worktree
    Orca->>Setup: Run scripts.setup
    Note over Setup: Injected env vars:
    Note over Setup: ORCA_ROOT_PATH (main checkout)
    Note over Setup: ORCA_WORKTREE_PATH (new worktree)

    Setup->>Setup: Enable strict mode (set -e)

    Setup->>WI: bunx @pleaseai/worktreeinclude ORCA_ROOT_PATH ORCA_WORKTREE_PATH

    WI->>FS: Read .worktreeinclude patterns from repo
    FS-->>WI: Pattern list (.env*, apps/*/.env, etc.)

    loop For each file in worktree
        WI->>FS: Check if file matches pattern AND is gitignored
        alt File matches pattern AND is gitignored
            WI->>FS: Copy from ORCA_ROOT_PATH to ORCA_WORKTREE_PATH
            FS-->>WI: File copied
        else No match OR not gitignored
            WI->>FS: Skip file
        end
    end

    WI-->>Setup: Copy complete (exit 0)

    Setup->>Bun: bun install
    Bun->>Bun: Resolve dependencies
    Bun-->>Setup: Dependencies installed

    Setup-->>Orca: Setup script complete
    Orca-->>Orca: Worktree ready for use
Loading

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread orca.yaml Outdated
Comment thread .worktreeinclude
Comment thread .worktreeinclude
- Pin @pleaseai/worktreeinclude to 0.1.0 so worktree setup is reproducible.
- Gitignore .mcp.local.json so the .worktreeinclude entry is actually copied.
- Run setup through mise (trust, install, exec) to use the bun pinned in mise.toml.
@amondnet

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Orca worktree setup by adding a .worktreeinclude configuration file, updating .gitignore to include local MCP settings, and creating an orca.yaml setup script. The reviewer suggests adding environment variable validation and explicit directory navigation to the setup script to improve robustness and prevent potential execution errors.

Comment thread orca.yaml Outdated
Guard the setup script: set -u aborts on an unset ORCA_* variable, and
cd "$ORCA_WORKTREE_PATH" pins every step to the new worktree.
@amondnet

Copy link
Copy Markdown
Contributor Author

/gemini review

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Orca worktrees by adding local MCP configuration to .gitignore, defining gitignored files to copy in .worktreeinclude, and creating an orca.yaml setup script that uses mise and bun to prepare new worktrees. Feedback suggests adding a robustness fallback in orca.yaml to handle environments where mise is not installed, allowing the script to fall back to global bun and bunx commands.

Comment thread orca.yaml
@amondnet
amondnet merged commit d2fef58 into main Oct 22, 2026
10 checks passed
@amondnet
amondnet deleted the chore/orca-worktree-setup branch October 22, 2026 17:04
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