Skip to content

test(axis): expand blackbox unit test coverage#294

Draft
EffortlessSteven wants to merge 1 commit into
mainfrom
claude/coverage/axis-blackbox-tests
Draft

test(axis): expand blackbox unit test coverage#294
EffortlessSteven wants to merge 1 commit into
mainfrom
claude/coverage/axis-blackbox-tests

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

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 in blackbox::tests) covering:

  • Default impl
  • set_enabled(false) buffer clearing
  • clear_buffer no-flush semantics
  • flush() empty-buffer no-op
  • Each previously uncovered event variant: ConflictCleared, PreFaultCapture, CapabilityModeChanged, OutputClamped
  • All three CapabilityMode variants (Full / Demo / Kid)
  • Resolution failure path
  • Disabled-mode suppression for every annotate_* method
  • set_max_buffer_size flush thresholds (at / under / exact boundary)
  • From<&ConflictMetadata> conversion
  • ResolutionDetails::new / with_metrics semantics including round-trip clearing

All 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 failures
  • cargo fmt -- --check and cargo clippy clean on blackbox.rs

Generated by Claude Code

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.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 18 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 36a243d2-4730-446d-83b0-c20a2ee5c897

📥 Commits

Reviewing files that changed from the base of the PR and between 7d026c3 and d55de57.

📒 Files selected for processing (1)
  • crates/flight-axis/src/blackbox.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/coverage/axis-blackbox-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants