Repository navigation
Replace bin/wisp symlink with autobuild wrapper script - #1
Merged
Merged
Conversation
bin/wisp now auto-builds dist/wisp if it doesn't exist before running it, removing the need to manually build first.
3 of 5 tasks
dbmikus
added a commit
that referenced
this pull request
Apr 20, 2026
## Summary Fixes two bugs in `--branch` / `--new-branch` handling and updates docs to match the corrected behavior. ### `--branch` and `--new-branch` semantics When creating a sandbox with `--git`, the clone starts on the host's current branch. The flags modify which branch the sandbox ends up on: | Flags | Behavior | | ---------------------------------- | -------------------------------------------------------------------------------- | | _(neither)_ | Stay on the host's current branch | | `--branch foo` | Check out `foo` if it exists, or create it from the current branch if it doesn't | | `--new-branch bar` | Create `bar` from the current branch | | `--branch foo --new-branch bar` | Resolve `--branch foo` first (checkout or create), then create `bar` on top | ### Bugs fixed 1. **`--new-branch` without `--branch` branched from main/master instead of the host's current branch.** If the host was on a feature branch, the new branch would lose those commits and start from the default branch. Now it starts from HEAD (the host's current branch). 2. **`--branch X --new-branch Y` required `X` to already exist.** If `X` was a new branch name, the command errored with "base branch does not exist". Now `--branch` uses checkout-or-create semantics regardless of whether `--new-branch` is also set. 3. **`.amika/config.toml` and `lifecycle.setup_script` were read from the host working tree, not the prepared checkout.** After branch selection, the config should reflect the branch the sandbox is actually on. Fixed by loading config from `Mount.Source` (the prepared clone) instead of `RepoRoot` (the host repo). ## Test plan - [x] `TestPrepareGitMount_CleanClone_NewBranchFromHostBranch` — verifies bug #1 fix - [x] `TestPrepareGitMount_CleanClone_BranchAndNewBranchCreatesBase` — verifies bug #2 fix - [x] `TestConfigReadFromPreparedRepo` — verifies bug #3 fix - [ ] Manual: `amika sandbox create --git --new-branch test-1` on a non-default branch, verify sandbox is on `test-1` rooted at the host branch - [ ] Manual: `amika sandbox create --git --branch new-feat --new-branch new-feat-fix` where `new-feat` doesn't exist yet
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.
bin/wisp now auto-builds dist/wisp if it doesn't exist before running it, removing the need to manually build first.