IAuditLog
AgentPrism.Abstractions.dllThe audit trail log.
public interface IAuditLogRemarks
Section titled “Remarks”Writing happens in the store decorators, not in the endpoint layer: writing in the endpoint layer would miss a change made to the same store from another code path. The decorator is the single gate.
A write failure does not stop the operation. When IAuditLog.WriteAsync fails the caller logs it and the operation continues — the same rule: observability does not break behaviour.
There is a read endpoint only; there is no delete or edit endpoint, and there will not be one.
Methods
Section titled “Methods”QueryAsync(AuditQuery, CancellationToken)
Section titled “ QueryAsync(AuditQuery, CancellationToken)”Reads the records through a filter.
ValueTask<IReadOnlyList<AuditEntry>> QueryAsync(AuditQuery query, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”query AuditQuery
The filter.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<AuditEntry>>
The records, newest first.
VerifyChainAsync(AuditChainQuery, CancellationToken)
Section titled “ VerifyChainAsync(AuditChainQuery, CancellationToken)”Walks a tenant’s hash chain and reports whether it is intact.
ValueTask<AuditChainVerification> VerifyChainAsync(AuditChainQuery query, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”query AuditChainQuery
The scope: tenant and, optionally, a date range.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<AuditChainVerification>
The verification result.
Remarks
Section titled “Remarks”A date range narrows which entries are walked; it does not weaken the check within that range. Because the entry immediately before the range’s start is not read, a break at the range’s own boundary cannot be judged and is not reported — an unbounded query is the only way to check a tenant’s whole history.
WriteAsync(AuditEntry, CancellationToken)
Section titled “ WriteAsync(AuditEntry, CancellationToken)”Writes an audit record.
ValueTask WriteAsync(AuditEntry entry, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”entry AuditEntry
The record to write.
cancellationToken CancellationToken
The cancellation token.