bots-garden/sidekickspublic Fork
⑂ save-20261108
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
📦️ Create a release. 0a53b99 · on save-20261108 · k33g · 24d ago
test-issue-47-on-macos.md · 127 lines · 7.3 KBmarkdown
Blame HistoryOpen raw

How to test issue #47 on macOS (recreating an sbx sandbox)

This guide checks on a Mac what issue #47 brings: Sidekicks recreates an agent's sbx sandbox when it no longer exists, stops or removes it from the Agents panel, and the "Add an agent" assistant fills itself in when an sbxenv.yaml is dropped on it. It assumes the Mac is set up for milestone M4, sbx is installed and Milo's kit is reachable (agents/milo/sbxenv.yaml). Allow 30 minutes, plus the time to create a sandbox (pulling the kits). The labels quoted are those of the interface in English, its default language.

Keep a macOS Terminal window open at the root of the repository.

0. Prepare

make check              # expected: 0 issues, Tests 89 passed, 15 passed, licence headers ok
sbx ls                  # sbx answers; milo-sbx may exist or not
make dev
  • make check passes and sbx ls answers.

1. Declare the commands in Settings

  1. In Settings, declare Milo with its lifecycle (replace the milo entry if there is one), then save:

      - name: milo
        title: Milo (sbx)
        icon: "🦊"
        command: sbx
        args: [exec, -i, milo-sbx, mm, -acp]
        workspace: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo/workspace
        runtime:
          type: sbx
          sandbox: milo-sbx
          lifecycle:
            folder: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo
            create: [sbx, env, create, --force]
            stop: [sbx, stop, milo-sbx]
            remove: [sbx, env, rm, --force]
    
  2. Typing under lifecycle:, completion offers folder, create, stop, remove.

  3. Replace create with crate: the editor reports an unknown key on its line and suggests create. Put create back and save.

  4. Give a local agent runtime: {type: local, lifecycle: {create: [sbx, env, create]}}: saving is refused, with a problem on lifecycle. Remove it.

  • Steps 1 to 4 behave as described.

2. A missing sandbox is recreated

  1. In the macOS Terminal, remove the sandbox if it exists, then check:

    sbx rm milo-sbx --force; sbx ls -q
    

    milo-sbx is no longer listed.

  2. In Agents, click 📂 next to Milo, open the Log tab, then ▶ Start.

  3. The state stays on starting during the creation. The log shows, in order:

    • sandbox: sandbox milo-sbx not found: creating it
    • sandbox: $ sbx env create --force
    • the output of sbx env create, line by line, prefixed with sandbox:
  4. The agent becomes ready. sbx ls -q lists milo-sbx again.

  5. 💬 Conversation: write to Milo, it answers from the sandbox.

  • Steps 1 to 5 behave as described.

3. A stopped sandbox is not recreated

  1. ■ Stop on Milo, then in the macOS Terminal: sbx stop milo-sbx.
  2. ▶ Start: the agent starts, and the log holds no new not found: creating it line (sbx exec starts a stopped sandbox by itself).
  • Steps 1 and 2 behave as described.

4. Stop and remove from the Agents panel

  1. Milo's header shows ■ Stop the sandbox and 🗑 Remove the sandbox. The other (local) agents do not.
  2. With the agent started, click ■ Stop the sandbox: the agent becomes stopped, the log shows sandbox: $ sbx stop milo-sbx and sbx's output. sbx ls shows milo-sbx stopped.
  3. Click 🗑 Remove the sandbox: a box asks "Remove the sandbox of Milo (sbx)? …". Click Cancel: nothing happens and sbx ls -q still lists milo-sbx.
  4. Again, and click Remove: the log shows sandbox: $ sbx env rm --force. sbx ls -q no longer lists milo-sbx.
  5. ▶ Start: the sandbox is recreated as in section 2.
  6. In Settings, remove stop: and save: only 🗑 Remove the sandbox is left. Put stop: back.
  • Steps 1 to 6 behave as described.

5. Errors are readable

  1. ■ Stop on Milo. In Settings, replace sandbox: milo-sbx with sandbox: milo-typo (keep args as it is) and save.
  2. ▶ Start: milo-typo does not exist, the create command runs, then the agent goes to error. Depending on sbx's state, the reason is either the failure of sbx env create (the milo-sbx sandbox already exists) or the create command ended but there is no sandbox milo-typo: …. The log shows sbx's output.
  3. Put sandbox: milo-sbx back. Replace folder: with a folder that does not exist, save, remove the sandbox (sbx rm milo-sbx --force), then ▶ Start: the agent goes to error, with a reason that names the create command. Put the right folder: back.
  • Steps 1 to 3 behave as described.

6. The assistant and dropping an sbxenv.yaml

  1. Open the assistant (⇧⌘N). With On this computer or In a Docker container, no "Recreate the sandbox…" area shows. Choose In an sbx sandbox: the area shows, with a dashed border.
  2. From the Finder, drag agents/milo/sbxenv.yaml over the area: its border takes the accent colour. Drop it:
    • Sandbox name: milo-sbx;
    • Agent's folder: …/agents/milo/workspace (if it was empty);
    • Folder the commands run in: …/agents/milo;
    • the commands sbx env create --force, sbx stop milo-sbx, sbx env rm --force;
    • the message "Filled from …/sbxenv.yaml. You can still change every field."
  3. Change a command by hand: the field stays editable.
  4. Drop the same file elsewhere in the window (outside the area): nothing changes, and the window does not navigate to the file.
  5. Drop agents/milo/workspace/agent.yaml on the area: "This file cannot be used: not an sbx environment file (sbxenv.yaml)", and the fields do not change.
  6. In the macOS Terminal: cp agents/milo/sbxenv.yaml "/tmp/dev env.yaml". Click Choose an sbxenv.yaml… and pick /tmp/dev env.yaml: the commands become sbx env create "dev env.yaml" --force and sbx env rm "dev env.yaml" --force, and the folder /tmp.
  7. Drop agents/milo/sbxenv.yaml again, then fill in Name shown Milo 2, Program mm, Arguments -acp. Click Add the agent.
  8. In Settings, the milo-2 entry holds runtime.lifecycle with folder, and the three commands written on one line each (create: [sbx, env, create, --force]). Remove milo-2 and save.
  • Steps 1 to 8 behave as described.

7. In French

  1. In Settings, set ui.language: fr and save.
  2. The assistant shows "Recréer la sandbox si elle a disparu (facultatif)" and "Choisir un sbxenv.yaml…". Milo's header shows ■ Arrêter la sandbox and 🗑 Supprimer la sandbox, and the confirmation is in French.
  3. Set ui.language: en back if you wish.
  • Steps 1 to 3 behave as described.

If something differs

Symptom Likely cause What to do
the sandboxes cannot be listed (sbx ls): … sbx not found, or its daemon does not answer which sbx, then sbx ls in the Terminal
Creation fails with a question from sbx in the log the command waits for an answer: it gets no input add --force to the command
Nothing happens when the file is dropped it was dropped outside the dashed area, or the environment is not In an sbx sandbox drop it on the area; note the macOS version in the issue
Starting stays on starting for long sbx env create is pulling the kits follow the Log tab

Close the issue

If everything behaves as described, close issue #47 (or ask the assistant to). Otherwise, comment on it with what differs.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# How to test issue #47 on macOS (recreating an sbx sandbox)

This guide checks on a Mac what issue #47 brings: Sidekicks recreates an agent's sbx sandbox when it no longer exists, stops or removes it from the Agents panel, and the "Add an agent" assistant fills itself in when an `sbxenv.yaml` is dropped on it. It assumes the Mac is set up for [milestone M4](test-milestone-m4-on-macos.md), `sbx` is installed and Milo's kit is reachable (`agents/milo/sbxenv.yaml`). Allow 30 minutes, plus the time to create a sandbox (pulling the kits). The labels quoted are those of the interface in English, its default language.

Keep a macOS Terminal window open at the root of the repository.

## 0. Prepare

```bash
make check              # expected: 0 issues, Tests 89 passed, 15 passed, licence headers ok
sbx ls                  # sbx answers; milo-sbx may exist or not
make dev
```

- [ ] `make check` passes and `sbx ls` answers.

## 1. Declare the commands in Settings

1. In **Settings**, declare Milo with its `lifecycle` (replace the `milo` entry if there is one), then save:

   ```yaml
     - name: milo
       title: Milo (sbx)
       icon: "🦊"
       command: sbx
       args: [exec, -i, milo-sbx, mm, -acp]
       workspace: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo/workspace
       runtime:
         type: sbx
         sandbox: milo-sbx
         lifecycle:
           folder: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo
           create: [sbx, env, create, --force]
           stop: [sbx, stop, milo-sbx]
           remove: [sbx, env, rm, --force]
   ```

2. Typing under `lifecycle:`, completion offers `folder`, `create`, `stop`, `remove`.
3. Replace `create` with `crate`: the editor reports an unknown key on its line and suggests `create`. Put `create` back and save.
4. Give a local agent `runtime: {type: local, lifecycle: {create: [sbx, env, create]}}`: saving is refused, with a problem on `lifecycle`. Remove it.

- [ ] Steps 1 to 4 behave as described.

## 2. A missing sandbox is recreated

1. In the macOS Terminal, remove the sandbox if it exists, then check:

   ```bash
   sbx rm milo-sbx --force; sbx ls -q
   ```

   `milo-sbx` is no longer listed.

2. In **Agents**, click **📂** next to Milo, open the **Log** tab, then **▶ Start**.
3. The state stays on starting during the creation. The log shows, in order:
   - `sandbox: sandbox milo-sbx not found: creating it`
   - `sandbox: $ sbx env create --force`
   - the output of `sbx env create`, line by line, prefixed with `sandbox: `
4. The agent becomes ready. `sbx ls -q` lists `milo-sbx` again.
5. **💬 Conversation**: write to Milo, it answers from the sandbox.

- [ ] Steps 1 to 5 behave as described.

## 3. A stopped sandbox is not recreated

1. **■ Stop** on Milo, then in the macOS Terminal: `sbx stop milo-sbx`.
2. **▶ Start**: the agent starts, and the log holds **no** new `not found: creating it` line (`sbx exec` starts a stopped sandbox by itself).

- [ ] Steps 1 and 2 behave as described.

## 4. Stop and remove from the Agents panel

1. Milo's header shows **■ Stop the sandbox** and **🗑 Remove the sandbox**. The other (local) agents do not.
2. With the agent started, click **■ Stop the sandbox**: the agent becomes stopped, the log shows `sandbox: $ sbx stop milo-sbx` and sbx's output. `sbx ls` shows `milo-sbx` stopped.
3. Click **🗑 Remove the sandbox**: a box asks "Remove the sandbox of Milo (sbx)? …". Click **Cancel**: nothing happens and `sbx ls -q` still lists `milo-sbx`.
4. Again, and click **Remove**: the log shows `sandbox: $ sbx env rm --force`. `sbx ls -q` no longer lists `milo-sbx`.
5. **▶ Start**: the sandbox is recreated as in section 2.
6. In **Settings**, remove `stop:` and save: only **🗑 Remove the sandbox** is left. Put `stop:` back.

- [ ] Steps 1 to 6 behave as described.

## 5. Errors are readable

1. **■ Stop** on Milo. In **Settings**, replace `sandbox: milo-sbx` with `sandbox: milo-typo` (keep `args` as it is) and save.
2. **▶ Start**: `milo-typo` does not exist, the create command runs, then the agent goes to **error**. Depending on sbx's state, the reason is either the failure of `sbx env create` (the `milo-sbx` sandbox already exists) or `the create command ended but there is no sandbox milo-typo: …`. The log shows sbx's output.
3. Put `sandbox: milo-sbx` back. Replace `folder:` with a folder that does not exist, save, remove the sandbox (`sbx rm milo-sbx --force`), then **▶ Start**: the agent goes to error, with a reason that names the `create` command. Put the right `folder:` back.

- [ ] Steps 1 to 3 behave as described.

## 6. The assistant and dropping an sbxenv.yaml

1. Open the assistant (**⇧⌘N**). With **On this computer** or **In a Docker container**, no "Recreate the sandbox…" area shows. Choose **In an sbx sandbox**: the area shows, with a dashed border.
2. From the Finder, drag `agents/milo/sbxenv.yaml` over the area: its border takes the accent colour. Drop it:
   - **Sandbox name**: `milo-sbx`;
   - **Agent's folder**: `…/agents/milo/workspace` (if it was empty);
   - **Folder the commands run in**: `…/agents/milo`;
   - the commands `sbx env create --force`, `sbx stop milo-sbx`, `sbx env rm --force`;
   - the message "Filled from …/sbxenv.yaml. You can still change every field."
3. Change a command by hand: the field stays editable.
4. Drop the same file **elsewhere** in the window (outside the area): nothing changes, and the window does not navigate to the file.
5. Drop `agents/milo/workspace/agent.yaml` on the area: "This file cannot be used: not an sbx environment file (sbxenv.yaml)", and the fields do not change.
6. In the macOS Terminal: `cp agents/milo/sbxenv.yaml "/tmp/dev env.yaml"`. Click **Choose an sbxenv.yaml…** and pick `/tmp/dev env.yaml`: the commands become `sbx env create "dev env.yaml" --force` and `sbx env rm "dev env.yaml" --force`, and the folder `/tmp`.
7. Drop `agents/milo/sbxenv.yaml` again, then fill in **Name shown** `Milo 2`, **Program** `mm`, **Arguments** `-acp`. Click **Add the agent**.
8. In **Settings**, the `milo-2` entry holds `runtime.lifecycle` with `folder`, and the three commands written on one line each (`create: [sbx, env, create, --force]`). Remove `milo-2` and save.

- [ ] Steps 1 to 8 behave as described.

## 7. In French

1. In **Settings**, set `ui.language: fr` and save.
2. The assistant shows "Recréer la sandbox si elle a disparu (facultatif)" and "Choisir un sbxenv.yaml…". Milo's header shows **■ Arrêter la sandbox** and **🗑 Supprimer la sandbox**, and the confirmation is in French.
3. Set `ui.language: en` back if you wish.

- [ ] Steps 1 to 3 behave as described.

## If something differs

| Symptom | Likely cause | What to do |
| --- | --- | --- |
| `the sandboxes cannot be listed (sbx ls): …` | sbx not found, or its daemon does not answer | `which sbx`, then `sbx ls` in the Terminal |
| Creation fails with a question from sbx in the log | the command waits for an answer: it gets no input | add `--force` to the command |
| Nothing happens when the file is dropped | it was dropped outside the dashed area, or the environment is not **In an sbx sandbox** | drop it on the area; note the macOS version in the issue |
| Starting stays on starting for long | `sbx env create` is pulling the kits | follow the **Log** tab |

## Close the issue

If everything behaves as described, close issue #47 (or ask the assistant to). Otherwise, comment on it with what differs.