Files
boxmaker/docs/plans/M2b/10-verify-device.md
T
kyleandClaude Fable 5.1 e156975649 Add M2b plan: ten tasks, tests, recordings and the first system prompt
The tasks build the agent loop on M2a's client: channel messages and
the usage record in proto, four config tables, the tool port and
registry with find_tool and call_tool, the baseline and replay, the
session store, the turn loop with its limits and the append-only
property test, the channel server, loopd serve, bxctl chat, and the
device checks including a four-turn conversation with a restart.

Checked against a private reference implementation: the gate passes
after every task in order, the new suites pass under CPU load, and the
reference passes make verify-device on straylight with no cache loss.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 17:19:02 -07:00

56 lines
2.2 KiB
Markdown

# 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.