Class GovernanceDecision
- Namespace
- AsiBackbone.Core.Decisions
- Assembly
- AsiBackbone.Core.dll
Represents a framework-neutral governance decision produced by an AsiBackbone evaluation flow.
public sealed class GovernanceDecision
- Inheritance
-
GovernanceDecision
- Inherited Members
Fields
MaxCorrelationIdLength
Defines the maximum retained length for normalized correlation identifiers.
public const int MaxCorrelationIdLength = 256
Field Value
Remarks
Correlation identifiers are trimmed before enforcement. Values longer than this limit are truncated to keep telemetry-facing identifiers bounded.
MaxTraceIdLength
Defines the maximum retained length for normalized trace identifiers.
public const int MaxTraceIdLength = 256
Field Value
Remarks
Trace identifiers are trimmed before enforcement. Values longer than this limit are truncated to keep telemetry-facing identifiers bounded.
Properties
CanProceed
Gets a value indicating whether the decision allows immediate execution.
public bool CanProceed { get; }
Property Value
CorrelationId
Gets the correlation identifier associated with the decision, when supplied by the host.
public string? CorrelationId { get; }
Property Value
EscalationRecommended
Gets a value indicating whether the decision recommends escalation.
public bool EscalationRecommended { get; }
Property Value
HasReasons
Gets a value indicating whether the decision includes reason data.
public bool HasReasons { get; }
Property Value
IsAllowed
Gets a value indicating whether the decision allows the operation.
public bool IsAllowed { get; }
Property Value
IsDeferred
Gets a value indicating whether the decision defers the operation.
public bool IsDeferred { get; }
Property Value
IsDenied
Gets a value indicating whether the decision denies the operation.
public bool IsDenied { get; }
Property Value
IsWarning
Gets a value indicating whether the decision allows the operation with warnings.
public bool IsWarning { get; }
Property Value
Outcome
Gets the selected governance decision outcome.
public GovernanceDecisionOutcome Outcome { get; }
Property Value
PolicyHash
Gets the policy hash associated with the decision, when supplied by the host.
public string? PolicyHash { get; }
Property Value
PolicyVersion
Gets the policy version associated with the decision, when supplied by the host.
public string? PolicyVersion { get; }
Property Value
ReasonCodes
Gets machine-readable reason codes associated with the governance decision.
public IReadOnlyList<string> ReasonCodes { get; }
Property Value
Reasons
Gets reasons associated with the governance decision.
public IReadOnlyList<OperationReason> Reasons { get; }
Property Value
RequiresAcknowledgment
Gets a value indicating whether the decision requires acknowledgment before execution.
public bool RequiresAcknowledgment { get; }
Property Value
TraceId
Gets the trace identifier associated with the decision, when supplied by the host.
public string? TraceId { get; }
Property Value
Methods
Allow(string?, string?, string?, string?)
Creates an allowed governance decision.
public static GovernanceDecision Allow(string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
An allowed governance decision.
Defer(string, string, string?, string?, string?, string?)
Creates a deferred governance decision.
public static GovernanceDecision Defer(string code, string message, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
codestringThe machine-readable reason code.
messagestringThe human-readable reason message.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A deferred governance decision.
Deny(OperationReason, string?, string?, string?, string?)
Creates a denied governance decision.
public static GovernanceDecision Deny(OperationReason reason, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
reasonOperationReasonThe reason associated with the denied decision.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A denied governance decision.
Deny(IEnumerable<OperationReason>, string?, string?, string?, string?)
Creates a denied governance decision.
public static GovernanceDecision Deny(IEnumerable<OperationReason> reasons, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
reasonsIEnumerable<OperationReason>The reasons associated with the denied decision.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A denied governance decision.
Deny(string, string, string?, string?, string?, string?)
Creates a denied governance decision.
public static GovernanceDecision Deny(string code, string message, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
codestringThe machine-readable reason code.
messagestringThe human-readable reason message.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A denied governance decision.
Escalate(string, string, string?, string?, string?, string?)
Creates an escalation-recommended governance decision.
public static GovernanceDecision Escalate(string code, string message, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
codestringThe machine-readable reason code.
messagestringThe human-readable reason message.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
An escalation-recommended governance decision.
RequireAcknowledgment(string, string, string?, string?, string?, string?)
Creates an acknowledgment-required governance decision.
public static GovernanceDecision RequireAcknowledgment(string code, string message, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
codestringThe machine-readable reason code.
messagestringThe human-readable reason message.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
An acknowledgment-required governance decision.
Warning(OperationReason, string?, string?, string?, string?)
Creates a warning governance decision.
public static GovernanceDecision Warning(OperationReason reason, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
reasonOperationReasonThe reason associated with the warning decision.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A warning governance decision.
Warning(IEnumerable<OperationReason>, string?, string?, string?, string?)
Creates a warning governance decision.
public static GovernanceDecision Warning(IEnumerable<OperationReason> reasons, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
reasonsIEnumerable<OperationReason>The reasons associated with the warning decision.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A warning governance decision.
Warning(string, string, string?, string?, string?, string?)
Creates a warning governance decision.
public static GovernanceDecision Warning(string code, string message, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null)
Parameters
codestringThe machine-readable reason code.
messagestringThe human-readable reason message.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
Returns
- GovernanceDecision
A warning governance decision.