Repository navigation
fix(signal): surface daemon errors split across output chunks - #104152
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 1:13 AM ET / 05:13 UTC. Summary PR surface: Source +4, Tests +24. Total +28 across 2 files. Reproducibility: yes. Current-main source clearly classifies child-process chunks independently, and the focused test plus real-daemon transcript demonstrate the split-line failure and corrected result. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the plugin-owned complete-line framing for both Signal daemon streams, retaining the focused regression and real-daemon evidence while leaving classification, lifecycle, configuration, and delivery contracts unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source clearly classifies child-process chunks independently, and the focused test plus real-daemon transcript demonstrate the split-line failure and corrected result. Is this the best way to solve the issue? Yes. Complete-line framing at the plugin-owned child stdout/stderr boundary is the narrowest maintainable solution; changing severity policy or daemon lifecycle would address the wrong layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a6bdc8092bf2. Label changesLabel justifications:
Evidence reviewedPR surface: Source +4, Tests +24. Total +28 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9ea9142 to
9c54b45
Compare
|
Land-ready maintainer proof for exact head
Provenance: the per-chunk classification behavior traces to |
|
Merged via squash.
|
…aw#104152) * fix(signal): preserve daemon log lines across chunks * test(signal): cover split utf-8 daemon output --------- Co-authored-by: Peter Steinberger <[email protected]>
* fix(signal): preserve daemon log lines across chunks * test(signal): cover split utf-8 daemon output --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit bf642ef)
What Problem This Solves
Fixes Signal daemon diagnostics being classified from arbitrary stdout/stderr chunks instead of complete text lines. A real error such as
ERRORorFailed to initialize HTTP Servercould be split across pipe reads and emitted as ordinary fragments; a multibyte UTF-8 character split at the same boundary could also be corrupted.Why This Change Was Made
The shared Signal daemon output boundary now delegates UTF-8 decoding, line framing, CRLF/LF handling, and the final unterminated line to Node's
readlineinterface before applying the existing severity classifier. This is the narrow owner-boundary fix for both stdout and stderr and leaves daemon lifecycle, configuration, and channel delivery unchanged.Maintainer refactor:
ERRORtoken;User Impact
Signal operators get one correctly classified daemon diagnostic even when the operating system splits a line or UTF-8 code point across reads. Routine warnings remain logs; error-like lines still update error state.
Evidence
9c54b4515123ba0459bf058a8ba16a458553cacb.tbx_01kxbxzfw904j2hn0nfnt48ndg: focused unit suite passed 5/5; officialsignal-cli 0.14.5live fault run passed with stderr relayed in at most two-byte writes.signal-cli: Failed to initialize HTTP Servererror record, zero ordinary fragments.tbx_01kxby4m86gdtr7zmeht8ff2g4: focused suite passed 5/5; conflict, attribution, extension-boundary, dependency-pin, duplicate-target, and format gates passed.plugin-sdk-api-baseline.sha256changed-gate failure is unrelated moving-main drift: this PR changes only two Signal-private files and no Plugin SDK/API inputs.Best-Fix Judgment
Best bounded fix. A custom chunk buffer would need to reimplement UTF-8 decoding, CRLF handling, and final-line flushing; changing severity policy would address the wrong layer. One
readlineinterface per child stream gives the existing classifier the complete lines it already expects.Provenance: the per-chunk classification behavior traces to
eefbf3dc5a995ea6a1a3eb66f90a5f76dbff3ae7(2026-02-22) and was carried into the Signal plugin boundary by #45531; it has shipped since v2026.3.22.AI-assisted: yes. Maintainer review covered the complete daemon module, both child streams, classifier policy, process lifecycle, adjacent tests, Signal docs, Node's installed
readlineimplementation contract, current main, shipped tags, realsignal-cli, and fresh autoreview.