docs(evidence): add M1 soak and TF transition results (#3)

## M1 soak evidence (1h) + TF/KEY assist windows

**Manifest verdict: FAIL — one criterion.** Console `wifi reconnect`
never returns to CONNECTED (0/5 soak cycles + 0/1 controlled repro).
Root cause: `wifi_service.cc reconnect()` calls `esp_wifi_connect()`
while still associated; IDF v6 rejects it (`sta is connected, disconnect
before connecting to new ap`), no disconnect event fires, so the
event-driven auto-reconnect never engages. Boot auto-connect and the
portal path are unaffected (`connect_stored` disconnects first). Fix
tracked as a follow-up task.

### Soak metrics (3600s, run m1-20260831T021427Z)
| criterion | result |
| --- | --- |
| JSONL count 360±10 | 358 PASS |
| sequence strictly monotonic | 25..384 PASS |
| status:FAILED lines | 0 PASS |
| reset_reason constant | 11 everywhere PASS |
| tf state | READY all samples PASS |
| wifi reconnect → CONNECTED | 0/5 **FAIL** |
| internal_free decline <15% | N/A (heap not instrumented) |

### Assist windows
- W1 KEY ≥3s portal hold: PASS (AP up, auto-recovery to CONNECTED ≤120s)
- W1 short/long: +2/+2 exact, no spurious (via retry window) PASS
- W2 TF: 2 pull→insert cycles, 4/4 transitions PASS
- W3 absent-boot: classified ≤0.9s, DEGRADED never FAILED, logging
resumed PASS

### Tooling
`frame-m1-capture` gains `--command`/`--command-interval` (periodic
`wifi reconnect`) with pytest coverage. Gates:
ruff/pyright/pytest/frame-partitions/frame-evidence/frame-doc-links/frame-sbom
all green locally.

Co-authored-by: ania-lain <[email protected]>
This commit is contained in:
Lain
2026-08-31 11:33:03 +08:00
committed by GitHub
co-authored by lain
parent d73cadbcd6
commit b6ed3234a1
45 changed files with 12103 additions and 0 deletions
+45
View File
@@ -152,6 +152,51 @@ def test_run_capture_collects_artifacts_and_polls_status(tmp_path: Path) -> None
assert (tmp_path / "run" / "status.json").read_text(encoding="utf-8") == f"{STATUS_LINE}\n"
def test_run_capture_sends_periodic_command(tmp_path: Path) -> None:
port_obj = FakeSerialPort([])
settings = CaptureSettings(
port="/dev/fake",
baud=115200,
duration=0.05,
out_dir=tmp_path / "run",
status_interval=0.01,
command="wifi reconnect",
command_interval=0.01,
)
def open_port(port: str, baudrate: int, timeout: float) -> FakeSerialPort:
return port_obj
run_capture(settings, open_port)
assert port_obj.written.count(b"wifi reconnect\r\n") >= 1
def test_run_capture_without_command_sends_only_status(tmp_path: Path) -> None:
port_obj = FakeSerialPort([])
settings = CaptureSettings(
port="/dev/fake",
baud=115200,
duration=0.05,
out_dir=tmp_path / "run",
status_interval=0.01,
)
def open_port(port: str, baudrate: int, timeout: float) -> FakeSerialPort:
return port_obj
run_capture(settings, open_port)
assert port_obj.written
assert all(chunk == b"status --json\r\n" for chunk in port_obj.written)
def test_main_requires_command_interval_with_command(tmp_path: Path) -> None:
with pytest.raises(SystemExit) as excinfo:
main(["--duration", "1", "--out", str(tmp_path), "--command", "wifi reconnect"])
assert excinfo.value.code == 2
def test_main_requires_duration_and_out(tmp_path: Path) -> None:
with pytest.raises(SystemExit) as excinfo:
main(["--out", str(tmp_path)])