test(cli): move tests/ out of tools/, separate marmot vs dm

`tools/` is for libraries (arti-build); shell-based interop harnesses
that drive the `amy` binary belong with the CLI module. New layout:

  cli/tests/
  ├── lib.sh                       # shared logging + result tracking
  ├── headless/helpers.sh          # shared amy_a / amy_json / assertions
  ├── marmot/                      # MLS group-messaging interop (vs whitenoise-rs)
  │   ├── marmot-interop.sh
  │   ├── marmot-interop-headless.sh
  │   ├── setup.sh
  │   ├── tests-create.sh
  │   ├── tests-manage.sh
  │   ├── tests-extras.sh
  │   └── patches/
  └── dm/                          # NIP-17 DM interop (amy ↔ amy)
      ├── dm-interop-headless.sh
      ├── setup.sh
      └── tests-dm.sh

Per-suite changes:
- Each suite owns its own setup.sh; previously the Marmot setup was at
  headless/setup.sh and the DM setup at headless/setup-dm.sh, which
  implied shared infra they don't actually share.
- `cli/tests/lib.sh` and `cli/tests/headless/helpers.sh` are the only
  shared bits across suites.
- The DM harness still reuses Marmot's `start_local_relay` /
  `stop_local_relay` (sourced via `../marmot/setup.sh`) — same relay
  binary, no duplication.
- All sourcing paths updated; REPO_ROOT now climbs three levels (was
  two when the harness lived under `tools/`); patches/ is now a sibling
  of marmot/setup.sh rather than under marmot/headless/.
- `.gitignore` updated to cover both suites' state dirs.

cli/ROADMAP.md and cli/tests/README.md updated to point at the new paths.
No behavioural change — every test runs the same code; only the file
layout and source paths moved.
This commit is contained in:
Claude
2026-04-23 20:37:22 +00:00
parent 112801ba82
commit b0698e0a66
19 changed files with 87 additions and 59 deletions
+5 -5
View File
@@ -95,11 +95,11 @@ move anything, re-audit — you're probably duplicating logic.
8. **Distribution** — Homebrew + Scoop + `.deb` in the same release
pipeline as desktop. Plan: `cli/plans/2026-04-21-cli-distribution.md`.
9. **Test suite** — end-to-end against a local relay. Marmot interop is
covered by `tools/marmot-interop/marmot-interop-headless.sh`; NIP-17
DM interop between two `amy` clients is covered by
`tools/marmot-interop/dm-interop-headless.sh` (text + file + strict
10050 + fallback + cursor-advance). Neither runs in CI yet (both
need Rust + ~3 min cold relay build).
covered by `cli/tests/marmot/marmot-interop-headless.sh`; NIP-17 DM
interop between two `amy` clients is covered by
`cli/tests/dm/dm-interop-headless.sh` (text + file + strict 10050 +
fallback + cursor-advance). Neither runs in CI yet (both need Rust +
~3 min cold relay build).
10. **Everything else in the matrix.**
---