# Plan 4 C1 post-merge smoke test — 2026-04-14

**Result:** 5/5 gates PASS against RTX 5080 + Qwen2.5-14B-Instruct Q4_K_M via Cloudflare tunnel.

**Branch:** `main` at `59b6c1f` (PR #108 — Plan 4 C1 merged).

**Protocol:** [session_id_smoke_rerun.md](../protocols/session_id_smoke_rerun.md) extended with gate 5 (`maxim peer list-nodes`).

**Trace archives:**
- [c1_smoke_bench_run1_20260414.jsonl](c1_smoke_bench_run1_20260414.jsonl)
- [c1_smoke_bench_run2_20260414.jsonl](c1_smoke_bench_run2_20260414.jsonl)
- [c1_smoke_sim_20260414.jsonl](c1_smoke_sim_20260414.jsonl)

## Pre-flight health gate

```
time curl ... https://maxim.dennyschaedig.com/v1/chat/completions
real   0.857s
http_code=200
content: "Hi there! How can I assist you"
```

PASS — sub-second round-trip, healthy chat endpoint.

## Gate 1 — Back-to-back bench session_id distinction

```
Run 1 session_id: bench_20260414_161811
Run 2 session_id: bench_20260414_161819
```

| Check | Result |
|---|---|
| Distinct session_ids (`SID1 != SID2`) | ✓ PASS |
| Run 1 shape matches `bench_YYYYMMDD_HHMMSS` | ✓ PASS |
| Run 2 shape matches `bench_YYYYMMDD_HHMMSS` | ✓ PASS |
| Run 1 zero null session_id on `peer_backend_call` events | ✓ PASS |
| Run 2 zero null session_id on `peer_backend_call` events | ✓ PASS |

## Gate 2 — Real sim end-to-end coverage

Sim: `maxim --sim "just say hello and call finish_simulation" --seed 42 --sim-max-turns 3`

Wall-clock: 30.1 s, 3 turns, `finish=max_turns`, exit 0.

```
Total peer_backend events: 11
  null agent_id:   0
  null session_id: 0
  null request_id: 0
```

| Check | Result |
|---|---|
| Events captured (`TOTAL > 0`) | ✓ PASS (11) |
| Zero null agent_id | ✓ PASS |
| Zero null session_id | ✓ PASS |
| Zero null request_id | ✓ PASS |
| Single session_id across sim | ✓ PASS |

Session_id: `20260414_161949`

## Gate 3 — Report / JSONL / report.json triple-match

```
JSONL session_id: 20260414_161949
Report dir: ~/.maxim/sim_reports/20260414_161949
report.json.session_id: 20260414_161949
```

| Check | Result |
|---|---|
| Report dir exists at expected path | ✓ PASS |
| `report.json.session_id` equals JSONL session_id | ✓ PASS |
| `report.json` present | ✓ PASS |
| `actions.jsonl` present | ✓ PASS |
| `aut_hippocampus.json` present | ✓ PASS |
| `aut_nac.json` present | ✓ PASS |

## Gate 4 — Doctor sanity

```
━━━ Environment ━━━
  ✓ Platform: macOS 15.7.3
  ✓ Architecture: arm64
  ⚠ GPU / CUDA: No CUDA device available — inference will be CPU-only  [expected on peer]
  ✓ LLM Tiers
  ✓ LLM Tier headroom
  ✓ Disk space
  ✓ RAM
  ✓ Storage footprint
  ✓ MAXIM_ROLE: MAXIM_ROLE=peer

━━━ Peer Connectivity ━━━
  ✓ Remote URL: maxim.dennyschaedig.com reachable
  ✓ Peer API key
  ✓ Peer auth: authenticated successfully
  ✓ Remote leader probe: 195 ms
  ✓ --llm vs peer config
  ✓ Remote model: Qwen2.5-14B-Instruct.Q4_K_M.gguf
  ✓ Peer latency: p50=181 ms, p95=384 ms (5/5 probes)

━━━ Mesh Topology ━━━
  ✓ Node leader: reachable (leader, https://maxim.dennyschaedig.com/v1) [390ms]
```

| Check | Result |
|---|---|
| Environment all green (GPU ⚠ expected) | ✓ PASS |
| Peer Connectivity all ✓ | ✓ PASS |
| 5/5 latency probes succeeded | ✓ PASS |
| **Mesh Topology section populated via C1 `check_mesh_nodes`** | ✓ PASS (new in C1) |

## Gate 5 — `maxim peer list-nodes` live (new in C1)

The protocol's gate 5 specifically validates that `maxim peer list-nodes` works end-to-end against the live leader, matching the JSON schema shape from `maxim doctor --json`.

**Table output:**
```
━━━ Mesh: 1 node(s), self=leader ━━━
  ✓ leader  leader  https://maxim.dennyschaedig.com/v1 (self)
      → reachable (stage2 HTTP 200) [507ms]
```

**JSON output:**
```json
{
  "self": "leader",
  "protocol_version": 1,
  "nodes": [
    {
      "name": "leader",
      "url": "https://maxim.dennyschaedig.com/v1",
      "role": "leader",
      "status": "ok",
      "message": "reachable (stage2 HTTP 200) [219ms]",
      "fix": null,
      "latency_ms": 218.9
    }
  ],
  "worst_status": "ok"
}
```

| Check | Result |
|---|---|
| Table output shows 1 node (synthesized from peer.yml fallback) | ✓ PASS |
| Self marked with `(self)` | ✓ PASS |
| Stage-2 probe completed (HTTP 200) | ✓ PASS |
| JSON `worst_status == "ok"` | ✓ PASS |
| JSON includes `latency_ms` (218.9 ms) | ✓ PASS |
| JSON shape matches `maxim doctor --json` schema | ✓ PASS |
| Zero behavior change for peer.yml-only users (fallback works) | ✓ PASS |
| Exit code 0 | ✓ PASS |

## Summary

| Gate | Name | Result |
|---|---|---|
| 1 | Bench per-run session_id distinction | ✓ PASS |
| 2 | Sim end-to-end `agent_id` + `session_id` + `request_id` coverage | ✓ PASS |
| 3 | Report directory / JSONL / report.json triple-match | ✓ PASS |
| 4 | Doctor peer connectivity + C1 Mesh Topology section | ✓ PASS |
| 5 | `maxim peer list-nodes` live + `--json` schema match (C1 new) | ✓ PASS |

**5/5 PASS.** Plan 4 C1 validated end-to-end on main at commit `59b6c1f`. The peer.yml → synthesized one-node mesh fallback path works in production without any operator changes. Zero behavior regressions vs the pre-C1 baseline captured in [session_id_smoke_20260414.md](session_id_smoke_20260414.md).

**Wall-clock:** ~90 seconds total (pre-flight + 2× bench + sim + doctor + list-nodes).

## Notes

- **`role_divergence` WARNING at the top of doctor output** is pre-existing and still active post-C1. Filed against the Plan 4 C2/C3 followup list per the protocol's pitfall #4.
- **Mesh Topology section shows up automatically** in `maxim doctor` now that C1 shipped `check_mesh_nodes`. This was NOT in the pre-C1 smoke baseline — it's a net-new surface that's now part of the standard doctor output when `mesh.yml` OR `peer.yml` exists. No regression: the section is cleanly suppressed when neither config is present (tested via `TestCheckMeshNodes::test_no_mesh_yml_returns_empty_list`).
- **Latency variance between gate 4 and gate 5**: doctor's Mesh Topology probe showed 390ms; list-nodes showed 507ms/219ms across two calls. All within normal stage-2 variance (stage-1 liveness + stage-2 chat round-trip through Cloudflare).
- **Gate 5 exercises the `peer.yml` → synthesized one-node mesh fallback path** — no `mesh.yml` exists on this machine. Confirms the zero-breaking-change guarantee for existing users.
