chore: add handshake stage diagnostics - #40
Conversation
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 12:46 AM ET / 04:46 UTC (Revision 6). ClawSweeper reviewWhat this changesAdds role-scoped ESP32 connection-stage logs and a five-scenario Unity case covering diagnostic content, cleanup ordering, and connection outcomes. Merge readiness✅ Ready for maintainer review Ready for ordinary maintainer review with no actionable findings. The diagnostics remain absent from main, and the September 12 maintainer disposition resolves the previous request to execute the Unity case or explicitly accept compilation-only validation. Priority: P3 Review scores
Verification
How this fits togetherThe ESP32 node component receives Gateway connection responses over WebSocket, validates them, and persists reconnect sessions. These diagnostics expose progress through that process before the application receives a connected or failed event. flowchart TD
A[Gateway response] --> B[Response correlation]
B --> C[Hello validation]
C --> D[Role session persistence]
D --> E[Application connection event]
B --> F[Stage diagnostics]
C --> F
D --> F
C --> G[Failure cleanup]
G --> E
G --> F
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the bounded stage diagnostics while keeping root-cause and physical-device qualification claims separate. Do we have a high-confidence way to reproduce the issue? Not applicable to the instrumentation itself; the underlying missing-operator-session failure remains unexplained, and the new Unity case has compiled but has not run. Is this the best way to solve the issue? Yes. Instrumenting the existing boundaries is a narrow way to distinguish failure stages without introducing retries, storage-policy changes, or competing connection logic. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 407dc9e59d35. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Problem
A connection can stop between authentication submission, hello validation and session persistence without a role-scoped diagnostic identifying the boundary. The cause of the observed missing operator session is not yet known.
Changes
store_attempted=0, not a successful store.Production changes are confined to
esp_openclaw_node_runtime.candesp_openclaw_node_protocol.c. No public API, extra NVS reads, retries, timers, acceptance rules or storage-policy changes.Dependency
Depends on the now-landed #39.
The original diagnostic delta, based on
c7c7a0c8cb2178ceba41af03e4b3a8c10f3b6f8a,is preserved. The PR now targets main with the reviewed UI and firmware-provenance
changes inherited, not duplicated.
Original Validation
git diff --checkpassed.Firmware Artifact
10039648607was downloaded and verified: 2893649 bytes, SHA-256ce103b02f1d73f088fff3cd52a2d02142d0239b2663c554fa5bc503d8b0f548f, matching the GitHub API artifact digest.0x2000,0x8000,0x10000and0x810000; sizes, hashes and non-overlap within 16 MiB were verified.fe1938e2be977651ad185b6b91fc47283f85bc3bhas parentsc7c7a0c8cb2178ceba41af03e4b3a8c10f3b6f8aand PR head27cbf3dde7174fe37c1c3e06bf66062d815dd117. Its Git tree equals the PR head's tree.362a1776ec212788fda95f75b733bfdde3a0c394, build revisionv5.5.5-648-g362a1776ec2, with esptool4.12.0. This matches the prior Tab5 build; it is not pristine releasev5.5.5, and CI still inherits the moving SDK lane.Limits
This is diagnostic instrumentation, not a repair or proof of root cause. No device, Gateway, provider or credential access was performed for this change. Physical flashing and the next bounded connection trace belong to separate validation.
The credential-free claim applies only to the new
connect_diagrecords. Existing logs are not globally redacted; raw serial output must not be treated as safe to publish. Added logging can affect timing, and a successful later connection alone would not prove a fix.Landing Preparation
Signed head
905aa25ebca4cbfeaf01541b2ef0452ac138205dreconciles the originaldiagnostics onto main
407dc9e59d351cdbc084e66be82bec675d7fcf07while retainingthe original signed diagnostic and node-home repair ancestry. The complete
tree is exactly that main plus the original diagnostic delta; no new
diagnostic behavior was introduced. All five builds and CodeQL passed at this
head in CI run 34505634202.
Maintainer disposition on September 12, 2026: accept the reviewed
instrumentation with compilation-only validation of the target Unity case.
That case has not been executed; this is not a claim that its runtime assertions
passed. The source review, exact-head builds and full-tree/parent checks support
landing this bounded diagnostic change independently of unresolved voice
qualification. Landing uses a merge commit and retains the original signed
commit objects.