docs(evidence): complete M1-008 artifacts and draft owner pass record (#9)
## Summary
Completes the remaining M1-008 evidence gaps and drafts the owner pass
record (requirement **M1-008**; heap/stack instrumentation also closes
the M1-006 soak heap-integrity note "internal_free not evaluable").
### Firmware: `metrics` console command (console_service.{cc,hh})
- Machine-parseable `heap internal|psram free=<u> largest=<u>
min_ever=<u>` (heap_caps 8-bit pools) and `task <name>
stack_hwm_bytes=<u>` per FreeRTOS task via `uxTaskGetSystemState` (all
tasks: frame-sd/board/display/prov-mon/console_repl/IDLE/ipc/Tmr
Svc/esp_timer/wifi/tcpip/sys_evt).
- ESP-IDF Xtensa reports the high-water mark directly in bytes
(`StackType_t` = uint8_t), so the unit is documented in the field name
itself.
- Companion one-line sdkconfig change:
`CONFIG_FREERTOS_USE_TRACE_FACILITY=y` (required for
`uxTaskGetSystemState`; necessary build-config companion to the mandated
API).
- No JSONL/display/snapshot changes; no new files; partitions untouched;
clang-format 18.1.8 clean; build 0 warnings.
### Evidence (poc/evidence/m1-20260831/)
- `build/m1_frame_m1_hardware.map` — linker map of the instrumented
build (binary sha256 a0e937ba… pinned in the manifest note).
- `build/m1_size_components.txt` — `idf.py size` summary + `idf.py
size-components` breakdown.
- `build/m1_metrics_samples.txt` — three on-device samples (t≈14 s
boot-ish / post-selftest / post-60 s-idle) + selftest + status --json.
Highlights: internal heap min_ever 123295 B (largest block 53248 B),
PSRAM min_ever 8362016 B, smallest task stack HWM ipc0 552 B,
console_repl 2652 B free of 6144 B, idle drift ~36 B/min.
- `M1-PASS-RECORD.md` — completeness table for every M1-008 artifact
(path+sha256), M1-001..007 one-line acceptance summary, known
limitations; **ships PENDING owner confirmation, does not record Pass**.
- manifest.json: 3 artifact entries (+notes); .gitignore: re-include
`poc/evidence/**/build/` (map/size/metrics), same mechanism as the
existing `!poc/evidence/**/*.log`.
## Requirement refs
- M1-008 (pass-record artifacts: linker map, size-components, heap/stack
metrics, owner record draft)
- M1-006 (heap-integrity: heap free/largest/min-ever + per-task stack
HWM now instrumented)
## Gates
Build 0 warnings (clean rebuild, evidence-logged); ruff format/check,
pyright (0 errors), pytest 31 passed 1 skipped, frame-evidence validated
(1 manifest, 47 artifacts).
Co-authored-by: ania-lain <[email protected]>
This commit is contained in:
@@ -265,7 +265,25 @@
|
||||
"name": "verify.log",
|
||||
"uri": "raw-history/verify.log",
|
||||
"sha256": "1233c14e783e2ef66ae2923d21de81309facd3783c4f91f7df93fcc62abff245"
|
||||
},
|
||||
{
|
||||
"name": "m1_frame_m1_hardware.map",
|
||||
"uri": "build/m1_frame_m1_hardware.map",
|
||||
"sha256": "a5d01bfa35c0def56d350aaf8c203d8d4bca13372ee83c4aa0aa43d094cf43fb",
|
||||
"note": "GNU ld linker map (frame_m1_hardware.elf) from the instrumented M1-008 build that adds the `metrics` console command and CONFIG_FREERTOS_USE_TRACE_FACILITY=y. Provenance: built 2026-08-31 from the working tree on main@61a0167 (identical tree merged via PR evidence/m1-008-final), ESP-IDF v6.0.2, xtensa-esp-elf gcc-15.2.0, esp32s3 preset default. Companion binary frame_m1_hardware.bin sha256 a0e937ba7e4a0bd51b9c74f6e6ed25acb8fc42d78087da2ed2810085a3f2c4bc (stays out of the repository); generated sdkconfig sha256 083523994a42cc07910e9d585a31fb1d464fb8f89fc0695dc0ad7ab0cbbc41bc."
|
||||
},
|
||||
{
|
||||
"name": "m1_size_components.txt",
|
||||
"uri": "build/m1_size_components.txt",
|
||||
"sha256": "85281cdf6aa2ae986e3eeb89832c03caf6b6583880487c3ea124e0924adeb64d",
|
||||
"note": "`idf.py -B build/default size` (memory-type usage summary: total image 1396551 bytes, DIRAM 199149/341760 bytes = 58.27%, IRAM 16384/16384) followed by `idf.py size-components` (per-archive RAM/flash breakdown incl. managed components espressif__cjson / joltwallet__littlefs / lvgl__lvgl). Same build and provenance as m1_frame_m1_hardware.map."
|
||||
},
|
||||
{
|
||||
"name": "m1_metrics_samples.txt",
|
||||
"uri": "build/m1_metrics_samples.txt",
|
||||
"sha256": "cf7e4c280250111876693276a5deb3ca3ceb256c91f3faccf73913bf4613a257",
|
||||
"note": "On-device heap/stack metrics from the flashed instrumented build (bin sha256 a0e937ba7e4a0bd51b9c74f6e6ed25acb8fc42d78087da2ed2810085a3f2c4bc; device-reported elf_sha256 b416084a653871bf537a4b484bb0c85378b2bd608547b31afbbe26770288c4c7, image_sha256 81292cb968343b8b672f59fc4dacad7b3c2e6d9d337d5b804b4d90571028526a). Captured 2026-08-31T10:02:52Z over USB Serial/JTAG @115200 with an explicit RTS hard reset at t=0; three `metrics` samples (t~14s boot-ish, after `selftest`, after 60s idle) plus the selftest and `status --json` rounds. Highlights: heap internal min_ever=123295 B (free 128627 B / largest block 53248 B at t~94s), PSRAM min_ever=8362016 B (free 8362764 B); smallest per-task stack high-water mark ipc0=552 B; console_repl 2652 B free of its 6144 B stack after selftest; idle drift ~36 B/min with stable min_ever. Closes the soak's internal_free N/A gap (heap/stack now instrumented per M1-006 heap-integrity note)."
|
||||
}
|
||||
],
|
||||
"notes": "1h serial soak plus on-device TF/KEY assist windows on the final hardened firmware (tree of d73cadb; dirty=tools/tests collector additions only, poc/ untouched). VERDICT PASS after remediation of the soak's single failing criterion: console 'wifi reconnect' never returned to CONNECTED (0/5 soak cycles + 0/1 controlled reproduction; root cause: wifi_service.cc reconnect() called esp_wifi_connect() while still associated - IDF v6 rejects that, no STA_DISCONNECTED event fired, the event-driven retry never engaged; connect_stored/boot/portal paths were unaffected). FAIL at soak, fixed by commit d0842768658a8f47490bc87a6081f8a4ef1fe4d0 (reconnect() now disconnects first; the WIFI_EVENT_STA_DISCONNECTED handler drives the retry, direct connect only when already idle), re-verified on-device 3/3 cycles + boot - PASS ([PASS-fix-cycle-1..3] CONNECTED again in ~10s with the same IP restored, telemetry CONNECTED->DISCONNECTED->CONNECTED proving the handler path; [PASS-fix-boot] auto-connect GOT_IP, JSONL ap_setup:false, tf_logging:true). Original soak data unchanged. All other soak criteria PASS: 358 JSONL lines (360 +/-10), sequence 25..384 strictly monotonic, zero status:FAILED lines, reset_reason=11 constant across all samples, uptime monotonic (no reboot), tf=READY throughout, no spurious key presses. internal_free memory-decline criterion: N/A - firmware exposes no heap field in either JSON stream (telemetry or status --json); not instrumented, follow-up candidate. Assist windows: W1 KEY >=3s portal hold PASS (AP up observed, auto-recovery to CONNECTED within 120s without console help); W1 short/long presses completed via W2 retry: exactly +2/+2, no spurious; W2 TF: 2 pull->insert cycles, 4/4 transitions ABSENT+tf_logging false / READY+resume, logging_error=0; W3 absent-boot: TF-absent classified <=0.9s device time (W(835) frame-sd probe failed), health DEGRADED never FAILED, alive >30s, no telemetry while card out, reinsert resumed logging. TF same-file append judged behaviorally: sequence continuity across W2 pull/reinsert cycles and resumed logging across the W3 reboot with logging_error=0; direct TF line counts are not observable over UART (no fs listing command). Watch items: rtc_valid=false in all soak status samples after a transient PCF85063 ESP_ERR_INVALID_CRC during an earlier USB glitch (was true at session start); boot-moment telemetry status:FAILED artifact (T10-known) absent here because the capture attached mid-boot. Deviation: status responses artifact committed as status.ndjson (frame-evidence discovers every *.json under poc/evidence and NDJSON is not a manifest); soak raw directory kept outside poc/evidence because the collector's status.json artifact would be discovered by frame-evidence as an invalid manifest; curated copies are committed here instead. raw-history/ archives all /tmp/opencode/m1-verify serial captures from T4-T11 and this task."
|
||||
"notes": "1h serial soak plus on-device TF/KEY assist windows on the final hardened firmware (tree of d73cadb; dirty=tools/tests collector additions only, poc/ untouched). VERDICT PASS after remediation of the soak's single failing criterion: console 'wifi reconnect' never returned to CONNECTED (0/5 soak cycles + 0/1 controlled reproduction; root cause: wifi_service.cc reconnect() called esp_wifi_connect() while still associated - IDF v6 rejects that, no STA_DISCONNECTED event fired, the event-driven retry never engaged; connect_stored/boot/portal paths were unaffected). FAIL at soak, fixed by commit d0842768658a8f47490bc87a6081f8a4ef1fe4d0 (reconnect() now disconnects first; the WIFI_EVENT_STA_DISCONNECTED handler drives the retry, direct connect only when already idle), re-verified on-device 3/3 cycles + boot - PASS ([PASS-fix-cycle-1..3] CONNECTED again in ~10s with the same IP restored, telemetry CONNECTED->DISCONNECTED->CONNECTED proving the handler path; [PASS-fix-boot] auto-connect GOT_IP, JSONL ap_setup:false, tf_logging:true). Original soak data unchanged. All other soak criteria PASS: 358 JSONL lines (360 +/-10), sequence 25..384 strictly monotonic, zero status:FAILED lines, reset_reason=11 constant across all samples, uptime monotonic (no reboot), tf=READY throughout, no spurious key presses. internal_free memory-decline criterion: N/A - firmware exposes no heap field in either JSON stream (telemetry or status --json); not instrumented, follow-up candidate. Assist windows: W1 KEY >=3s portal hold PASS (AP up observed, auto-recovery to CONNECTED within 120s without console help); W1 short/long presses completed via W2 retry: exactly +2/+2, no spurious; W2 TF: 2 pull->insert cycles, 4/4 transitions ABSENT+tf_logging false / READY+resume, logging_error=0; W3 absent-boot: TF-absent classified <=0.9s device time (W(835) frame-sd probe failed), health DEGRADED never FAILED, alive >30s, no telemetry while card out, reinsert resumed logging. TF same-file append judged behaviorally: sequence continuity across W2 pull/reinsert cycles and resumed logging across the W3 reboot with logging_error=0; direct TF line counts are not observable over UART (no fs listing command). Watch items: rtc_valid=false in all soak status samples after a transient PCF85063 ESP_ERR_INVALID_CRC during an earlier USB glitch (was true at session start); boot-moment telemetry status:FAILED artifact (T10-known) absent here because the capture attached mid-boot. Deviation: status responses artifact committed as status.ndjson (frame-evidence discovers every *.json under poc/evidence and NDJSON is not a manifest); soak raw directory kept outside poc/evidence because the collector's status.json artifact would be discovered by frame-evidence as an invalid manifest; curated copies are committed here instead. raw-history/ archives all /tmp/opencode/m1-verify serial captures from T4-T11 and this task. M1-008 final evidence (2026-08-31): linker map, idf.py size/size-components, and on-device heap/stack metrics (three samples incl. post-60s-idle) archived under build/; firmware gained a `metrics` console command (machine-parseable heap internal/psram free/largest/min_ever + per-task stack_hwm_bytes via uxTaskGetSystemState; ESP-IDF xtensa reports the high-water mark directly in bytes since StackType_t=uint8_t). Owner pass record drafted at M1-PASS-RECORD.md, PENDING owner confirmation."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user