test(audit): add coverage for audit log recording and pagination (#747) - #1
Closed
sammajayi wants to merge 1 commit into
Closed
test(audit): add coverage for audit log recording and pagination (#747)#1sammajayi wants to merge 1 commit into
sammajayi wants to merge 1 commit into
Conversation
- Add #[cfg(test)] module with 24 tests covering all 13 AuditAction variants - Verify get_recent pagination boundaries (empty log, zero n, n > len, exact n, oldest-first slicing) - Assert append-only invariant: length grows monotonically, no overwrites, order preserved across grants - Test metadata correctness: grant_id, timestamp, ledger_sequence, actor tracking - Test log_length consistency with get_log Closes PhasoraLabs#747
sammajayi
force-pushed
the
test/issue-86-audit-coverage
branch
from
July 26, 2026 16:43
6f6308a to
9edb218
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added a #[cfg(test)] module to audit.rs with 24 tests covering audit log recording and pagination correctness.
Related Issue
Closes PhasoraLabs#747
Changes Made
Testing
Notes for Reviewer
The test suite has pre-existing compilation errors in reviewer_sla.rs that prevent cargo test from running. These exist on main as well.