test(axis): expand blackbox unit test coverage#294
Conversation
Adds 19 new tests to crates/flight-axis/src/blackbox.rs covering previously untested public surface: Default impl, set_enabled buffer clearing, clear_buffer (no-flush), flush on empty, ConflictCleared / PreFaultCapture / CapabilityModeChanged / OutputClamped events across all CapabilityMode variants, resolution failure path, disabled-mode event suppression for every annotate_* method, set_max_buffer_size flush thresholds, ConflictMetadata -> ConflictData conversion, and ResolutionDetails::new defaults and with_metrics behavior. All tests are test-only allocations (non-RT) and ADR-004 compliant.
|
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
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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 (1)
✨ 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 |
Summary
Expands unit-test coverage of
crates/flight-axis/src/blackbox.rs. Before this PR the 705-LOC blackbox/annotation module had only 7 inline tests.Adds 19 new
#[test]functions (7 → 26 inblackbox::tests) covering:Defaultimplset_enabled(false)buffer clearingclear_bufferno-flush semanticsflush()empty-buffer no-opConflictCleared,PreFaultCapture,CapabilityModeChanged,OutputClampedCapabilityModevariants (Full / Demo / Kid)annotate_*methodset_max_buffer_sizeflush thresholds (at / under / exact boundary)From<&ConflictMetadata>conversionResolutionDetails::new/with_metricssemantics including round-trip clearingAll tests run on the non-RT harness thread. Allocations are explicit and ADR-004 compliant (test code is not RT). No production code modified.
Test plan
cargo test -p flight-axis— 745 unit + 25 doctests + 7 integration suites, 0 failurescargo fmt -- --checkandcargo clippyclean onblackbox.rsGenerated by Claude Code