feat(audit): add persistent AuditLog storage foundation - #458
Merged
Conversation
Owner
Author
|
Final gate record for head 5f9ff36: holistic and dataflow immutable reviews PASS; lean dev CI PASS; supplemental draft PR #459 PASS on Windows, macOS, Ubuntu, MSRV, Clippy, Rustfmt, Cargo Deny, file-size, and no-secret checks. Supplemental Cargo Audit found pre-existing RUSTSEC-2026-0258 in unchanged h2 0.4.15; owner authorized merge of this dependency-neutral PR with an immediate dedicated h2 0.4.16 follow-up. PR #459 was closed without merge. |
This was referenced Aug 30, 2026
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
bacnet-typesand reusable constructed codecs intobacnet-encoding, while preserving the existingbacnet_services::auditpaths and wire behaviorAuditLogPersistenceport plus a concrete two-slot, versioned, checksummed file backendEnable, andTotal_Record_Countas one coherent snapshotRecord_Countread-only, and require explicit Rust/Python per-object storage configurationStandard and scope
This is the persistence-first foundation required by ANSI/ASHRAE 135-2020 §3.1 and §12.64. It establishes restart-safe object state and the dependency boundary needed by the later query slice.
It deliberately does not add AuditLogQuery dispatch, notification ingestion, authorization, replay, automatic migration/repair, multi-process locking, or public conformance claims. Portable power-loss behavior is not claimed beyond successful slot-file synchronization.
Compatibility
AuditLogObject::newnow requires an injected persistence backend.add_audit_lognow requires an explicitstorage_path.Validation
Final-head checks:
cargo test -p bacnet-objects audit --locked— 14 passedcargo fmt --all -- --checkcargo check -p bacnet-objects --tests --target x86_64-pc-windows-gnu --lockedgit diff --checkImplementation-pass checks (the subsequent bounded repair touched only Audit object/persistence code and reran its focused suite):
cargo test -p bacnet-types audit --lockedcargo test -p bacnet-encoding audit --lockedcargo test -p bacnet-services audit --lockedcargo test -p bacnet-server wpm_rollback_contract --lockedcargo check -p rusty-bacnet --tests --lockedcargo clippy --workspace --exclude rusty-bacnet --all-targets --lockedcargo test --workspace --exclude rusty-bacnet --lockedHosted Windows runtime qualification remains required because this slice adds a concrete filesystem backend.
Refs #345