feat: raise the message cap to fit the grown record - #40
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe compile-time SolidSyslog message cap increases from 256U to 512U. README stage and cost-table entries, along with cap-rise measurements, baseline checks, and self-check output, are updated to match. ChangesSyslog message cap update
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/config/solid_syslog_tunables.h`:
- Around line 7-10: Update the comment above SOLIDSYSLOG_MAX_MESSAGE_SIZE to
avoid claiming RFC 5424 interoperability for 512 bytes; explicitly describe the
cap as applying to the bundled collector, or change the constant to the minimum
standards-supported receiver size if it is intended as a general
interoperability limit.
In `@README.md`:
- Around line 19-24: Update the “Larger cap” cost description in the README to
say the cost is primarily RAM, reflecting the reported Flash increase as well as
the RAM increase. Leave the generated cost table and its markers unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fb6fd628-adac-4972-8f74-cd105d593980
⛔ Files ignored due to path filters (2)
measurements/cap-rise.csvis excluded by!**/*.csvmeasurements/stages.tsvis excluded by!**/*.tsv
📒 Files selected for processing (3)
README.mdapp/config/solid_syslog_tunables.hrun-report.md
Three SD-ELEMENTs put the record at 245 bytes, but sequenceId and sysUpTime are both 32-bit counters: at full width the same record is 261 bytes, past the 256-byte cap and into truncation. The cap doubles to 512. Flash +11,980 B (+8 on the previous stage) RAM +9,440 B (+2,304) Log stack +704 B (+256) Service +992 B (+256) The cap is the largest single demand the formatter makes of whichever task calls it, so both stacks rise by exactly the difference — 568 to 824 on the log task, 788 to 1,044 on the service task. Both seams were sized at 2 KiB when the send moved, so they absorb it and no RAM moves with them. The RAM that does move accounts for itself exactly. The ring is eight records at the cap plus a two-byte length prefix each, so it grows 2,048. The store keeps one record buffer of cap plus integrity trailer plus framing, so it grows 256. That is the whole 2,304. The store is otherwise unaffected. SOLIDSYSLOG_FILE_DEFAULT_BLOCK_SIZE must hold one worst-case record — cap plus integrity trailer plus five framing bytes, 549 here — and at 8192 it has room to spare. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bb51efb to
3746c59
Compare
Pull request
What this stage adds
Three SD-ELEMENTs put the record at 245 bytes, but sequenceId and sysUpTime are
both 32-bit counters: at full width the same record is 261 bytes, past the 256-byte
cap and into truncation. The cap doubles to 512.
Flash +11,980 B (+8 on the previous stage)
RAM +9,440 B (+2,304)
Log stack +704 B (+256)
Service +992 B (+256)
The cap is the largest single demand the formatter makes of whichever task calls
it, so both stacks rise by exactly the difference — 568 to 824 on the log task, 788
to 1,044 on the service task. Both seams were sized at 2 KiB when the send moved,
so they absorb it and no RAM moves with them.
The RAM that does move accounts for itself exactly. The ring is eight records at
the cap plus a two-byte length prefix each, so it grows 2,048. The store keeps one
record buffer of cap plus integrity trailer plus framing, so it grows 256. That is
the whole 2,304.
The store is otherwise unaffected. SOLIDSYSLOG_FILE_DEFAULT_BLOCK_SIZE must hold
one worst-case record — cap plus integrity trailer plus five framing bytes, 549
here — and at 8192 it has room to spare.
Files
Checklist
measurements/cap-rise.csvcommitted.measurements/stages.tsv.python3 scripts/gen-cost-table.py../run.shgreen (build + QEMU + baseline self-check) —run-report.mdcommitted.Context for review: 13 of 21 sequential single-commit PRs replaying the integration on top of the Baseline root. Each lands green and reviewed before the next is built on it, because a change to an early commit would force every commit above it to be re-run and re-measured.
Summary by CodeRabbit
New Features
Documentation