diag(tab5): capture first NVS and session-load failures - #44
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 1:54 AM ET / 05:54 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds numeric flash-storage and saved-session diagnostics, an opt-in Tab5 SDK patch, firmware provenance records, and regression coverage. Merge readiness✅ Ready for maintainer review Keep open as a useful landing candidate: current main lacks these diagnostics, the prior host-harness defect is fixed, and the maintainer explicitly accepted the bounded validation. No remaining actionable patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherESP device firmware loads saved Gateway sessions from nonvolatile storage during startup and reconnect. These diagnostics expose storage failures before existing normalization and recovery, while packaging records the exact patched SDK. flowchart TD
A[Startup or saved reconnect] --> B[Session loader]
B --> C[NVS flash operations]
C --> D[First failure capture]
B --> E[Session outcome diagnostics]
D --> F[Numeric console records]
E --> F
B --> G[Existing session recovery and connection]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the instrumentation temporary and observational, preserve exact SDK provenance, and retire the diagnostic mode once the underlying failure is identified and qualified. Do we have a high-confidence way to reproduce the issue? Not applicable to this diagnostic-only change: the underlying field session-loss cause remains unestablished, and this review did not execute firmware. Is this the best way to solve the issue? Yes. Numeric observations before normalization preserve existing behavior, and the explicit SDK mode extends the established provenance mechanism without a competing recovery path. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 9b46a78f838d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Problem
Saved-session absence can follow several different NVS outcomes. Existing
normalization and clearing paths do not expose the first underlying failure.
The cause remains unknown; this is diagnostic instrumentation, not a repair.
Stacked on #43, base
fix/tab5-psram-allocation-policyatd4aae3f2f07f7d2f8a59b9df1b73c63849df6edd.Changes
NVSPartition methods capture one failing result per boot, including existing
alignment rejection, using a lock-free internal-RAM claim and heap-free ROM
output after the operation returns.
normalization or clearing; record the clear result separately. Observe cached
and fresh session presence during saved reconnect, and initial NVS init errors
before the existing recovery path.
clearing/recovery policy, and connection behavior. No retries, tasks, commands,
persistent fields, or recovery fixes are added.
362a1776ec212788fda95f75b733bfdde3a0c394, the existing SPM patchbytes, allocation cutoff 1024, reserve 32768, and other configuration unchanged.
This is ESP-IDF plus two tracked patches, not pristine ESP-IDF.
Firmware provenance records both patches and whole-source hashes; the separate
symbol artifact copies the same manifest.
New diagnostic records contain only fixed labels and numeric fields, without
keys, lengths, offsets, URLs, IDs, tokens, or payloads. They are unprefixed ROM
lines; consumers must capture them before normal I/W/E filtering. Output can
interleave, and missing records do not establish healthy NVS. SDK instrumentation
is Tab5-only; session/init observations are in the existing shared components.
Validation
12 SDK helper tests passed: exact-base/delta verification, refusal, and idempotence.
14 packaging tests passed; the local YAML-reader case is skipped and remains
exercised inside the existing IDF CI environment.
Host diagnostic tests passed against the actual patched SDK methods and actual
session loader: original returns, alignment without I/O, concurrent single
capture, missing/empty/unsupported/malformed sessions, clear failure, and
synthetic canary non-disclosure.
Added one cached-session retention regression to the existing target Unity
suite. Target tests are built by CI, not executed here.
Actionlint and
git diff --checkpassed. Fresh independent scoped reviewthrough P2 reported no actionable findings.
CI run 34247823770, attempt 1
passed all five build jobs at head
c6d56b5dfa8718f5b7822919d0459824bf857336, including the component test appand Waveshare host lifecycle/UI checks.
The follow-up commit changes only three test files: mutable session fixture
arrays and a format-checked host ROM-output shim. These correct the two initial
CI failures without changing production code, SDK patches, or configuration.
Focused review found no actionable issues. Full lifecycle execution was
unavailable locally because managed dependencies were absent; CI ran it.
The earlier head
71febcbea6d88fb51e63720489e8267beff1e326produced test-mergeimage
3d22ae8616a34b670a5c947e25e9838caf8292ddinrun 34233725476.
Its Tab5 archive (artifact
10059256231, SHA25617a2e5818161a7e24d41b98487d5d7399b3d5f191c9993e3251882d0273d2775)was checked against the API digest, all 11 file checksums, source-parent
linkage, four image offsets, unchanged configuration, and both exact SDK
patch records. Its flash ranges exclude NVS. The four images were subsequently
flashed and readback-verified on M5Stack Tab5.
That is historical-image evidence, not a claim that the latest tests-only head
was flashed. A subsequent SDIO receive-buffer assertion remains unresolved;
this diagnostic PR does not claim to repair it or qualify a complete Talk flow.
No JTAG or release was performed during that verification.
Maintainer Disposition
On September 12, 2026, accept this bounded diagnostic change using its existing
source review, host regression tests, exact-head native builds, and the
historical-image evidence above. Target Unity fixtures were compiled, not
executed. First-failure instrumentation does not establish healthy NVS when no
record is observed, and this PR does not repair session loss or qualify voice.
The exact SDK refusal policy remains intact. Land with a merge commit and
retain the signed source objects; no release or new hardware test is implied.