< Summary

Information
Class: AsiBackbone.Core.Audit.IAsiBackboneAuditResidue
Assembly: AsiBackbone.Core
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Core/Audit/IAsiBackboneAuditResidue.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 158
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_AuditResidueId()100%11100%
get_SchemaVersion()100%11100%
get_SpanId()100%11100%
get_ParentSpanId()100%11100%
get_DecisionLatencyMs()100%11100%
get_ConstraintSetHash()100%11100%
get_ConstraintCount()100%11100%
get_RiskScore()100%11100%
get_PolicyScope()100%11100%
get_TenantHash()100%11100%
get_OrganizationHash()100%11100%
get_EmitterStatus()100%11100%
get_EmitterProvider()100%11100%
get_OutboxSequence()100%11100%
get_GatewayExecutionId()100%11100%
get_DecisionStage()100%11100%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Core/Audit/IAsiBackboneAuditResidue.cs

#LineLine coverage
 1using AsiBackbone.Core.Actors;
 2using AsiBackbone.Core.Serialization;
 3
 4namespace AsiBackbone.Core.Audit;
 5
 6/// <summary>
 7/// Defines the framework-neutral audit residue produced by an AsiBackbone operation.
 8/// </summary>
 9public interface IAsiBackboneAuditResidue
 10{
 11    /// <summary>
 12    /// Gets the stable audit event identifier.
 13    /// </summary>
 14    string EventId { get; }
 15
 16    /// <summary>
 17    /// Gets the stable audit residue identifier when available.
 18    /// </summary>
 19    /// <remarks>
 20    /// Existing residue implementations may use <see cref="EventId" /> as the residue identifier.
 21    /// </remarks>
 2322    string? AuditResidueId => EventId;
 23
 24    /// <summary>
 25    /// Gets the serialized schema version for the audit residue shape.
 26    /// </summary>
 2227    string SchemaVersion => AsiBackboneSchemaVersions.StableArtifactsV1;
 28
 29    /// <summary>
 30    /// Gets the UTC timestamp when the audited event occurred.
 31    /// </summary>
 32    DateTimeOffset OccurredUtc { get; }
 33
 34    /// <summary>
 35    /// Gets the stable actor identifier associated with the event.
 36    /// </summary>
 37    string ActorId { get; }
 38
 39    /// <summary>
 40    /// Gets the actor type associated with the event.
 41    /// </summary>
 42    AsiBackboneActorType ActorType { get; }
 43
 44    /// <summary>
 45    /// Gets the optional display name or label associated with the actor.
 46    /// </summary>
 47    string? ActorDisplayName { get; }
 48
 49    /// <summary>
 50    /// Gets the operation name associated with the audited event.
 51    /// </summary>
 52    string OperationName { get; }
 53
 54    /// <summary>
 55    /// Gets the governance, constraint, or host-defined outcome associated with the event.
 56    /// </summary>
 57    string Outcome { get; }
 58
 59    /// <summary>
 60    /// Gets machine-readable reason codes associated with the event.
 61    /// </summary>
 62    IReadOnlyList<string> ReasonCodes { get; }
 63
 64    /// <summary>
 65    /// Gets the correlation identifier associated with the event, when supplied by the host.
 66    /// </summary>
 67    string? CorrelationId { get; }
 68
 69    /// <summary>
 70    /// Gets the trace identifier associated with the event, when supplied by the host.
 71    /// </summary>
 72    string? TraceId { get; }
 73
 74    /// <summary>
 75    /// Gets the span identifier associated with the event, when supplied by the host or observability adapter.
 76    /// </summary>
 2377    string? SpanId => null;
 78
 79    /// <summary>
 80    /// Gets the parent span identifier associated with the event, when supplied by the host or observability adapter.
 81    /// </summary>
 2382    string? ParentSpanId => null;
 83
 84    /// <summary>
 85    /// Gets the decision latency in milliseconds, when supplied by the host.
 86    /// </summary>
 2387    long? DecisionLatencyMs => null;
 88
 89    /// <summary>
 90    /// Gets the hash of the evaluated constraint set, when supplied by the host.
 91    /// </summary>
 2392    string? ConstraintSetHash => null;
 93
 94    /// <summary>
 95    /// Gets the number of constraints evaluated for the decision, when supplied by the host.
 96    /// </summary>
 2397    int? ConstraintCount => null;
 98
 99    /// <summary>
 100    /// Gets the host-defined risk score associated with the decision, when supplied by the host.
 101    /// </summary>
 23102    double? RiskScore => null;
 103
 104    /// <summary>
 105    /// Gets the policy scope associated with the decision, when supplied by the host.
 106    /// </summary>
 23107    string? PolicyScope => null;
 108
 109    /// <summary>
 110    /// Gets the privacy-preserving tenant hash associated with the decision, when supplied by the host.
 111    /// </summary>
 23112    string? TenantHash => null;
 113
 114    /// <summary>
 115    /// Gets the privacy-preserving organization hash associated with the decision, when supplied by the host.
 116    /// </summary>
 23117    string? OrganizationHash => null;
 118
 119    /// <summary>
 120    /// Gets the provider-neutral emitter status, when supplied by the host or outbox provider.
 121    /// </summary>
 23122    string? EmitterStatus => null;
 123
 124    /// <summary>
 125    /// Gets the provider-neutral emitter provider name, when supplied by the host or outbox provider.
 126    /// </summary>
 23127    string? EmitterProvider => null;
 128
 129    /// <summary>
 130    /// Gets the outbox sequence associated with the event, when supplied by the host or outbox provider.
 131    /// </summary>
 23132    long? OutboxSequence => null;
 133
 134    /// <summary>
 135    /// Gets the gateway execution identifier associated with the event, when supplied by the host or gateway provider.
 136    /// </summary>
 23137    string? GatewayExecutionId => null;
 138
 139    /// <summary>
 140    /// Gets the provider-neutral decision stage associated with the event, when supplied by the host.
 141    /// </summary>
 23142    string? DecisionStage => null;
 143
 144    /// <summary>
 145    /// Gets the policy version associated with the event, when supplied by the host.
 146    /// </summary>
 147    string? PolicyVersion { get; }
 148
 149    /// <summary>
 150    /// Gets the policy hash associated with the event, when supplied by the host.
 151    /// </summary>
 152    string? PolicyHash { get; }
 153
 154    /// <summary>
 155    /// Gets additional framework-neutral audit metadata supplied by the host.
 156    /// </summary>
 157    IReadOnlyDictionary<string, string> Metadata { get; }
 158}