Skip to content

docs(monitor-input): NUL/CR-only follow-up (code comment + README + downstream NUL issue) - #441

Merged
fcostaoliveira merged 2 commits into
masterfrom
docs/monitor-input-nul-cr-followup
Jun 2, 2026
Merged

fcostaoliveira merged 2 commits into
masterfrom
docs/monitor-input-nul-cr-followup

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Jun 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an inline memchr code comment in config_types.cpp explaining why byte-count search replaced strchr (NUL bytes in the metadata prefix don't terminate the search early).
  • Adds README paragraphs documenting the 2.4 capability changes: binary payloads are now preserved end-to-end inside monitor_command_list, and CR-only line endings (classic Mac / some Windows exporters) now parse correctly.
  • Adds code comments near arbitrary_command::arbitrary_command(const char *cmd) and inside split_command_to_args flagging that downstream .c_str() still re-truncates embedded NUL bytes — the load-from-file fix from PR fix(monitor-input): preserve byte count past NUL; handle CR-only line endings #434 preserves NULs in std::string, but command dispatch re-truncates. This is tracked as a separate follow-up.

Follow-up issue

Full end-to-end binary blob support is tracked in: #439

Test plan

🤖 Generated with Claude Code


Note

Low Risk
Comment and README-only changes; no runtime logic modified.

Overview
Documents 2.4 monitor-input behavior in the README: binary payloads are kept through monitor_command_list, CR-only (\r) line endings parse correctly, and replay still truncates at embedded NUL when commands go through arbitrary_command(const char *) / .c_str() — called out as follow-up #439.

Adds matching inline comments in config_types.cpp at the arbitrary_command ctor, split_command_to_args, and the memchr quote search (why byte-count search avoids stopping on NUL in the MONITOR metadata prefix).

Reviewed by Cursor Bugbot for commit cada2da. Bugbot is set up for automated code reviews on this repo. Configure here.

Follow-up to PR #434: add an inline comment explaining the memchr
choice, README paragraphs documenting the 2.4 capability changes
(binary payloads preserved, CR-only line endings supported), and a
code comment near the arbitrary_command ctor flagging that downstream
c_str() still truncates at embedded NULs (filed as separate
follow-up issue for the load-bearing fix).

Refs: 2.4 review #38 (Review 14 R3 + R6).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@jit-ci

jit-ci Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Reviewers caught that the README's "preserved end-to-end" wording
overstated the fix -- the code comments in the same PR document that
downstream c_str() re-truncates at the first NUL. Re-worded the
README to match the actual scope (loader preserves; dispatch
re-truncates, tracked as #439). Also trimmed the verbose ctor comment.

Refs: PR #441 reviewers R1+R4+R6.
@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

R1+R4+R6 feedback addressed in cada2da: README wording corrected and wrapped in a 2.4 callout; ctor comment trimmed.

@fcostaoliveira
fcostaoliveira merged commit b24f4f4 into master Jun 2, 2026
94 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant