| name | e2e |
| description | Run end-to-end smoke tests for the Mycelium stack. Verifies install, memory, search, and aligner-mediated coordination to consensus. Use when validating a release, after a deploy, or when something feels broken. |
| argument-hint | [--full | --quick] |
End-to-End Testing
Run structured smoke tests against the live Mycelium stack. Tests are cumulative — each phase depends on the previous one passing.
Arguments
--quick — Stack health + memory CRUD + search only (< 1 min)
--full — Quick + aligner-mediated negotiation to consensus (~ 3 min)
- No argument — defaults to
--full
Phase 1: Stack Health
Verify all services are running and healthy.
curl -sf http://localhost:8000/health | python3 -m json.tool
docker ps --format "table {{.Names}}\t{{.Status}}" | grep -E "mycelium|ioc"
curl -sf http://localhost:9000/health
docker inspect ioc-cfn-svc --format '{{.State.Health.Status}}'
Fail criteria: Any service unhealthy → stop and diagnose. Do not proceed.
Phase 2: Memory CRUD + Search
Test the core memory pipeline: write, read, list, search, delete.
mycelium room create e2e-test-room --trigger threshold:10
mycelium room use e2e-test-room
mycelium memory set decisions/test-db "Chose Postgres for reliability" -H e2e-agent
mycelium memory set decisions/test-cache "Redis for session caching" -H e2e-agent
mycelium memory set failed/test-sqlite "SQLite can't handle concurrent writes" -H e2e-agent
mycelium memory set status/test-deploy "Staging deploy in progress" -H e2e-agent
mycelium memory get decisions/test-db
mycelium memory ls
mycelium memory ls decisions/
mycelium memory search "what database did we pick"
mycelium memory search "what failed"
mycelium memory rm decisions/test-cache --force
mycelium memory ls
ls ~/.mycelium/rooms/e2e-test-room/decisions/
cat ~/.mycelium/rooms/e2e-test-room/decisions/test-db.md
Fail criteria: Any write/read/search fails → embedding or DB issue.
Phase 3: CLI Negotiation
Test the full coordination pipeline: post positions → summon the aligner → await → respond → consensus → plan.
Coordination is the resident-runtime protocol: each participant is a live caller
that loops await → reason → respond. The aligner (a backend engine) runs
a real NEGMAS negotiation, @-addressing one agent at a time, and owns
termination — it stops the instant the agents agree, then compiles the consensus
into plan/tasks.md. There is no daemon and no cold-spawn: an @-mention to a
non-resident handle just waits on the durable transcript cursor until someone
awaits. For this smoke test, the operator plays each agent's turn by hand.
mycelium engine create aligner --kind aligner --room e2e-test-room
mycelium respond --room e2e-test-room --handle agent-alpha "Prioritize performance"
mycelium respond --room e2e-test-room --handle agent-beta "Prioritize developer experience"
mycelium engine invoke aligner "converge on the priority tradeoff" -r e2e-test-room
mycelium await --room e2e-test-room --handle agent-alpha --json
mycelium respond --room e2e-test-room --handle agent-alpha "I can accept perf caps if DX tooling ships too"
mycelium await --room e2e-test-room --handle agent-beta --json
mycelium respond --room e2e-test-room --handle agent-beta "works if we keep the fast path"
mycelium plan tasks --room e2e-test-room
Fail criteria:
await never returns after the summon → aligner not registered, or LLM unavailable (mycelium status → llm)
- Aligner loops to a step cap instead of stopping on agreement → NEGMAS termination regression (it must stop at unanimity, never run out the cap)
- No
plan/tasks.md after convergence → plan compiler outage; check backend logs (fail-soft should still emit the raw issue=value agreement)
- An unreadable reply produces phantom convergence → interpretation regression (an unreadable proposer must hold its own last line, never the standing offer)
Phase 4: Second episode (same room)
Verify a second negotiation can run in a room after the first converges. A room
is persistent; each summon opens a fresh, independent episode.
mycelium respond --room e2e-test-room --handle agent-gamma "Ship fast"
mycelium respond --room e2e-test-room --handle agent-delta "Ship safe"
mycelium engine invoke aligner "converge on the ship-speed tradeoff" -r e2e-test-room
mycelium plan tasks --room e2e-test-room
Fail criteria:
- Second summon reuses the first episode's transcript slice → episode isolation regression
- Aligner sees the prior episode's positions → episode scoping leaked across summons
Cleanup
curl -s -X DELETE http://localhost:8000/api/rooms/e2e-test-room
Interpreting Failures
| Symptom | Likely cause | Check |
|---|
| Backend returns 500 on memory write | Embedding model not loaded | docker logs mycelium-backend | grep embed |
| Search returns empty | Embeddings are null (wrote with --no-embed) | Reindex: mycelium memory reindex |
await never returns after a summon | aligner not registered or LLM down | mycelium engine ls -r <room>; mycelium status → llm |
| Aligner never stops (runs to the cap) | NEGMAS termination regression | it must stop at unanimity, never run out the step cap |
No plan/tasks.md after convergence | plan compiler outage | backend logs; fail-soft emits the raw issue=value agreement |
| Phantom convergence on an unreadable reply | interpretation regression | proposer must hold its own last line, never the standing offer |