WIP: diffguard-core/sensor.rs: add #[must_use] to render_sensor_report()#618
WIP: diffguard-core/sensor.rs: add #[must_use] to render_sensor_report()#618EffortlessSteven wants to merge 7 commits intomainfrom
Conversation
- safe_slice: document bounds clamping guarantees that make direct indexing valid - byte_to_column: document byte index to column conversion and why direct slicing is safe
Work item: work-7bd76a04
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 21 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- render_sensor_report: explain #[must_use] as R2 Library Contract requirement preventing silent sensor data loss; document return value - render_sensor_json: clarify it's a convenience wrapper around render_sensor_report with pretty-printed JSON output; document errors - tags_matched conditional: explain why we omit when empty (clean payload)
Green Test Builder Findings — work-7bd76a04Edge Cases Tested
What the Implementation Handles Well
Remaining Gaps (Knowingly Not Covered)
Surprises or Friction
Test Results Summary |
Remove unused format arguments that prevented compilation. Fix unused variable warnings by prefixing with underscore. Note: These green tests are for work-d4a75f70 scope and will fail at runtime until work-d4a75f70 features are implemented in diffguard.toml.example (tags and test_cases blocks).
Diff Review — work-7bd76a04Scope Assessment: SUSPICIOUSFiles Changed
Suspicious Files1.
|
Code Review: PR #618 — add #[must_use] to render_sensor_report()What's good
One concernMultiple PRs are modifying PRs #617 and #618 appear to both be targeting The Test and xtask ci failures in this PR likely stem from the same partial-work issue as PR #617 — the branch may not be up to date with the latest main, or there's a conflict in the test file from PR #617's Run this locally before expecting CI greencargo test -p diffguard-core
cargo clippy -p diffguard-core
cargo xtask ciThe test failures are likely transient based on the partial-work bundling issue. |
Closes #534
Summary
Add attribute to in . This prevents silent sensor data loss if callers discard the returned .
ADR
Specs
What Changed
Test Results
Friction Encountered
Notes