Appearance
Verify
CLAUDE.md "END TO END TESTING": HTTP 200 is not proof. A runtime that says it's live may still be unable to answer real requests. Verification means proving the package's primary surface actually works.
Three verification depths
| Depth | Command | What it proves |
|---|---|---|
| 1. Bootstrap | mx run . --check | The factory loaded and started without throwing |
| 2. Bus reachability | hivecast invoke <mount> <op> '{}' | An actor at the expected mount answers a known op |
| 3. End-to-end | Browser flow / Playwright / prove-*.ts | The full user-visible surface works |
1. Bootstrap-only with --check
bash
mx run . --env dev --checkSource: packages/mx-cli/src/commands/run.ts:451-464. The runner:
- Loads the manifest, environment, and factory.
- Calls the factory.
- Immediately calls
shutdownAll. - Prints a "Validated bootstrap" line (or JSON if
--json).
This catches "the factory throws on import" or "the factory fails to mount its actors". It does not catch ops-handler bugs, config errors that surface only on the first request, or wire-format issues with peers.
2. Bus reachability with hivecast invoke
bash
hivecast invoke system.runtimes runtimes.list '{"limit":5}' \
--home /tmp/matrix-homeSource: packages/host-service/src/cli.ts:254-265. The CLI constructs an envelope and sends it to the named mount. A response proves:
- The mount is registered.
- The actor is processing inbox messages.
- The op is recognized and returns within the default 5s timeout.
Use this to verify domain ops (e.g. hivecast invoke chat conversation.list '{}') once the runtime is up.
3. End-to-end smoke
For browser packages, browse the gateway:
bash
curl -I http://127.0.0.1:3100/apps/<appName>/
# 200 is necessary but not sufficientThen run a real browser. CLAUDE.md "feedback_end_to_end_testing": log in as a user, navigate to the app, watch the JS console, and confirm there are no NATS permission errors. HTTP 200 alone has historically been a misleading signal because the bootstrap can silently fail to connect.
For full reproducibility, use the existing proof scripts:
bash
node projects/matrix-3/scripts/prove-fresh-device-link.ts \
--route-key codex-proof-$(date -u +%Y%m%d-%H%M) \
--cloud https://hivecast.aiThese scripts exercise specific lifecycle pathways (device link, package up/down) and exit non-zero on any deviation. They are the canonical "did this change break a known good flow?" check.
Verification before commit
CLAUDE.md Rule 8 lists the steps that must precede a commit to master:
- The change is internally complete.
- The relevant package tests pass locally.
- You have verified the change does what it should — actual behavior check, not just "compiles". For UI changes that means loading the page; for actor changes that means an
invokeagainst a running runtime. git fetch --allfirst, then push that exact verified HEAD.
The mapping to verification depths:
- For build-only changes: depth 1 (
mx run . --check). - For new/changed actor ops: depth 2 (
hivecast invoke). - For UI or end-to-end behavior: depth 3 (browser/Playwright proof script).
Common verification mistakes
| Mistake | Why it lies |
|---|---|
Running --check instead of full bootstrap | The factory may run fine but its actors might not handle real traffic |
Reading /healthz and stopping there | /healthz only confirms the Host is up; runtimes may be down |
Running mx invoke from a stale shell whose env points to the wrong Host home | You'll talk to the wrong Host; pass --home <host-home> explicitly |
| Forgetting to rebuild before verifying | Tests use dist/; stale builds give false signals |
| Treating a green Playwright run with no NATS load as proof | Some bugs surface only when actors collaborate; pair with hivecast invoke |
See also
- Running → Health
- Running → Logs
- Running → hivecast up
- Local Development → Test
- Deployment Profiles → Verification
Source:
projects/matrix-3/packages/mx-cli/src/commands/run.tsimplements--check;packages/host-service/src/cli.ts:254-265implementsinvoke; proof scripts live underprojects/matrix-3/scripts/.