fix(room): keep diagnostic header in one stdio call - #55
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:56 PM ET / 16:56 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR prints the room node’s diagnostic header in one stdio call and adds regression coverage for unchanged output and competing console records. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped repair absent from current main. No actionable defects remain in the introduced diff; the previous compatibility concern belongs to the now-merged predecessor. Priority: P3 Review scores
Verification
How this fits togetherThe room node’s local USB console reads runtime, audio, and speaker-test snapshots. Its status command turns those snapshots into diagnostic lines for operators. flowchart TD
A[USB console command] --> B[Read diagnostic snapshots]
B --> C{Tone error present}
C -->|Yes| D[Include error label]
C -->|No| E[Omit error suffix]
D --> F[Print complete header once]
E --> F
F --> G[Print remaining status lines]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the byte-preserving single-call header and focused framing regression, with hardware and full-media qualification remaining separate. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main leaves a scheduling opportunity between header print calls, and the fixture exercises that exact schedule. This review did not execute tests or reproduce the historical device observation. Is this the best way to solve the issue? Yes. Combining the existing format into one call removes the identified inter-call gap without changing output bytes, adding locks, or introducing another diagnostic path. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 6a1dac665311. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(room): keep diagnostic header in one stdio call This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Problem
The native
diagnostics statusheader uses twoprintfcalls, or three when atone error is present. Another normal stdout writer can emit a record between
the header prefix, optional error label, and counters.
A recent device observation did not retain its raw header or phase. This
source-level framing repair does not establish that observation's cause.
Stacked on #54.
Changes
printf, preserving its exact text,conditional error suffix, frame counters, and newline.
error/noneand error labels containing spaces. Query the errorname only when the tone state is
error.locks, buffers, timeouts, parsers, and all media behavior unchanged.
synthetic snapshots and a deterministic competing normal-stdio writer.
No production test API or new test runner.
Validation
fails both intact-header assertions when a competing record is scheduled
after its first completed print call.
warnings-as-errors, including exact normal/error output and the same
competing-writer schedule. Queue and unsupported-boundary checks also pass.
git diff --checkpasses. Existing CI already executes the lifecycle suite.issues in the frozen five-file change.
CI run 34545231042,
attempt 1, for signed head
6ccdee816823fae7c583735487e5d30279d90f54.The Waveshare job executes the lifecycle suite, including the new console
cases. The synthetic merge has the intended base/head parents and the same
source tree as that head.
Limits
The fixture uses real stdio calls on a temporary stream with a deterministic
between-call schedule, not hardware concurrency. One header call does not make
the multi-line report atomic or protect it from ROM output that bypasses the
stdio locking path.
The historical
b105candidate was subsequently flashed with four writes andindependent readbacks passing. Boot and one complete idle-status response were
observed. This is not physical concurrency proof or attribution of the earlier
lost header. Voice remains unqualified.
Landing
Accept the single-header repair and deterministic byte/contention regression.
Land after #54 with a merge
commit. The reviewed context resolution preserves both the inherited logging
privacy tests and every original console test; it does not change production
behavior or weaken the prior repair. The complete expected tree and refreshed
exact-head native CI remain required. No release or full media qualification
is authorized.
Accept the inherited full-write result contract, including existing failure
handling for zero and short SDK writes. The owner has released the source
landing hold for this independently reviewed subset. Fresh/upgraded-device
qualification of the cumulative image remains separate and is not claimed.
Signed integration head
fe8e2fbba12dcd639ef8160f38174a2cc19f90b3preserves the reviewed full tree
9b46cbd0dda89dbd33943e7a57e2bec252a060ac. All five native jobs andCodeQL passed for this head in
CI run 34705924236.
This includes the combined logging-privacy and console-header lifecycle
regressions; it is not a fresh hardware run.
GitHub retained an older synthetic-merge parent after the predecessor landed.
Signed ancestry-only head
e98fc38f32b9b350239dfcfdf5b6a5063f7c4f84merges current main without changing any source bytes or the expected tree.
All five native jobs passed again in
CI run 34706550831;
the final merge requires the fresh main/head parents.