# M2b task 10: verification on the real server **Branch:** `m2b` (run `git switch m2b`; `git status --short` must be empty, otherwise stop) **Commit subject:** `Extend on-device verification to the agent loop` ## Goal Run the whole loop against straylight: the token budget of the real baseline, and a four-turn conversation through `loopd serve` and `bxctl chat` with a `loopd` restart in the middle. You write no library code. **If a check fails, that is a finding. Do not change a test or a limit.** ## Files - Copy: `crates/loopd/tests/device.rs` (replaces the M2a one; the four M2a checks are still in it), `Makefile` (only `verify-device` changes: it now also passes `BOXMAKER_BXCTL`), and `config/system.md` (the first system prompt; the device test reads it from the repository) - Modify: `docs/implementer-log.md` ## Steps - [ ] **1. Copy.** ```sh git switch m2b cp docs/plans/M2b/files/crates/loopd/tests/device.rs crates/loopd/tests/ cp docs/plans/M2b/files/Makefile Makefile mkdir -p config && cp docs/plans/M2b/files/config/system.md config/ git diff --stat Makefile ``` - [ ] **2. The ordinary gate ignores the new tests.** `make gate`. Expected last line: `gate: ok`, and for `device`: `0 passed; 0 failed; 6 ignored`. - [ ] **3. The server can be reached.** `curl -s http://straylight:11434/health`. Expected: `{"status":"ok"}`. If not, stop and report. - [ ] **4. Run the device checks.** `make verify-device`. Expected: `6 passed` and `verify-device: ok`, in about a minute. The baseline token count is printed; write it in your log row. - [ ] **5. If a check failed**, run it alone with `--nocapture` (see the M2a task 13 for the command) and put its name and message in your log row with status `stopped`. - [ ] **6. Log and commit.** ```sh git add Makefile config crates/loopd/tests/device.rs docs/implementer-log.md git commit ``` ## Done when - `make gate` prints `gate: ok` and `make verify-device` prints `verify-device: ok`. - `cmp Makefile docs/plans/M2b/files/Makefile` and `cmp config/system.md docs/plans/M2b/files/config/system.md` print nothing. - `git log --oneline master..m2b` shows one commit per task. ## Stop and report if - The server cannot be reached, or any device check fails twice.