Skip to content

Replace bin/wisp symlink with autobuild wrapper script - #1

Merged
dbmikus merged 1 commit into
mainfrom
dylan/wisp-build
Feb 5, 2026
Merged

dbmikus merged 1 commit into
mainfrom
dylan/wisp-build

Conversation

@dbmikus

@dbmikus dbmikus commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

bin/wisp now auto-builds dist/wisp if it doesn't exist before running it, removing the need to manually build first.

bin/wisp now auto-builds dist/wisp if it doesn't exist before
running it, removing the need to manually build first.
@dbmikus
dbmikus merged commit 0106d63 into main Feb 5, 2026
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
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