Table of Contents

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

int

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

int

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

bool

CorrelationId

Gets the correlation identifier associated with the decision, when supplied by the host.

public string? CorrelationId { get; }

Property Value

string

EscalationRecommended

Gets a value indicating whether the decision recommends escalation.

public bool EscalationRecommended { get; }

Property Value

bool

HasReasons

Gets a value indicating whether the decision includes reason data.

public bool HasReasons { get; }

Property Value

bool

IsAllowed

Gets a value indicating whether the decision allows the operation.

public bool IsAllowed { get; }

Property Value

bool

IsDeferred

Gets a value indicating whether the decision defers the operation.

public bool IsDeferred { get; }

Property Value

bool

IsDenied

Gets a value indicating whether the decision denies the operation.

public bool IsDenied { get; }

Property Value

bool

IsWarning

Gets a value indicating whether the decision allows the operation with warnings.

public bool IsWarning { get; }

Property Value

bool

Outcome

Gets the selected governance decision outcome.

public GovernanceDecisionOutcome Outcome { get; }

Property Value

GovernanceDecisionOutcome

PolicyHash

Gets the policy hash associated with the decision, when supplied by the host.

public string? PolicyHash { get; }

Property Value

string

PolicyVersion

Gets the policy version associated with the decision, when supplied by the host.

public string? PolicyVersion { get; }

Property Value

string

ReasonCodes

Gets machine-readable reason codes associated with the governance decision.

public IReadOnlyList<string> ReasonCodes { get; }

Property Value

IReadOnlyList<string>

Reasons

Gets reasons associated with the governance decision.

public IReadOnlyList<OperationReason> Reasons { get; }

Property Value

IReadOnlyList<OperationReason>

RequiresAcknowledgment

Gets a value indicating whether the decision requires acknowledgment before execution.

public bool RequiresAcknowledgment { get; }

Property Value

bool

TraceId

Gets the trace identifier associated with the decision, when supplied by the host.

public string? TraceId { get; }

Property Value

string

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

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

code string

The machine-readable reason code.

message string

The human-readable reason message.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

reason OperationReason

The reason associated with the denied decision.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

reasons IEnumerable<OperationReason>

The reasons associated with the denied decision.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

code string

The machine-readable reason code.

message string

The human-readable reason message.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

code string

The machine-readable reason code.

message string

The human-readable reason message.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

code string

The machine-readable reason code.

message string

The human-readable reason message.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

reason OperationReason

The reason associated with the warning decision.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

reasons IEnumerable<OperationReason>

The reasons associated with the warning decision.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional 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

code string

The machine-readable reason code.

message string

The human-readable reason message.

correlationId string

Optional correlation identifier.

traceId string

Optional trace identifier.

policyVersion string

Optional policy version.

policyHash string

Optional policy hash.

Returns

GovernanceDecision

A warning governance decision.