test: add comprehensive corruption validity tests for uselesskey-core-negative#173
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ 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. ⚙️ 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 |
c1e595c to
d9550ad
Compare
…-negative Add 37 integration tests in corruption_validity.rs covering: - All CorruptPem variants produce structurally invalid PEM (validated by checking header/footer mismatch, bad base64 chars, blank lines) - Truncated DER outputs are exact byte-prefixes of the original - flip_byte is involutory (double-flip restores original) with XOR 0x01 - Corruption works across all common PEM label types (RSA, EC, CERT, etc.) - Deterministic corruption is isolated per-variant (no cross-talk) - Deterministic stability verified across 1000 repeated calls - CorruptPem::Truncate operates on chars, not bytes (Unicode safety) - Each variant preserves untouched PEM sections (header/body/footer) - DER corruption never exceeds original length - All five PEM and all three DER deterministic arms are reachable - Edge cases: zero/exact/beyond truncation, single-byte DER, two-byte DER Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d9550ad to
ee277bd
Compare
Summary
Add 37 integration tests in crates/uselesskey-core-negative/tests/corruption_validity.rs that validate the structural correctness of negative fixtures produced by this facade crate.
What's tested
Validation