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:
@@ -190,15 +190,30 @@ class CaptureSettings:
|
||||
duration: float
|
||||
out_dir: Path
|
||||
status_interval: float
|
||||
command: str | None = None
|
||||
command_interval: float = 0.0
|
||||
|
||||
|
||||
def _pump(port: SerialPort, writer: CaptureWriter, settings: CaptureSettings) -> None:
|
||||
deadline = time.monotonic() + settings.duration
|
||||
next_status = time.monotonic() + settings.status_interval
|
||||
command_bytes = (
|
||||
settings.command.encode("ascii") + b"\r\n" if settings.command is not None else None
|
||||
)
|
||||
next_command = (
|
||||
time.monotonic() + settings.command_interval if command_bytes is not None else None
|
||||
)
|
||||
while time.monotonic() < deadline:
|
||||
if time.monotonic() >= next_status:
|
||||
port.write(STATUS_COMMAND)
|
||||
next_status += settings.status_interval
|
||||
if (
|
||||
command_bytes is not None
|
||||
and next_command is not None
|
||||
and time.monotonic() >= next_command
|
||||
):
|
||||
port.write(command_bytes)
|
||||
next_command += settings.command_interval
|
||||
line = port.readline()
|
||||
if line:
|
||||
writer.process_line(line.decode("utf-8", errors="replace"))
|
||||
@@ -238,7 +253,19 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
default=120.0,
|
||||
help="seconds between status --json polls (default: %(default)s)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--command",
|
||||
help="extra console command sent periodically during the soak (e.g. 'wifi reconnect')",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--command-interval",
|
||||
type=float,
|
||||
default=0.0,
|
||||
help="seconds between --command sends; required and >0 when --command is set",
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
if args.command is not None and args.command_interval <= 0:
|
||||
parser.error("--command requires --command-interval > 0")
|
||||
|
||||
settings = CaptureSettings(
|
||||
port=args.port,
|
||||
@@ -246,6 +273,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
duration=args.duration,
|
||||
out_dir=args.out,
|
||||
status_interval=args.status_interval,
|
||||
command=args.command,
|
||||
command_interval=args.command_interval,
|
||||
)
|
||||
try:
|
||||
manifest_path = run_capture(settings, load_serial())
|
||||
|
||||
Reference in New Issue
Block a user