Table of Contents

Class GovernanceTestHarnessPolicyEvaluator

Namespace
AsiBackbone.Testing
Assembly
AsiBackbone.Testing.dll

Deterministic policy evaluator used by the test harness.

public sealed class GovernanceTestHarnessPolicyEvaluator : IGovernancePolicyEvaluator<GovernanceEvaluationContext>
Inheritance
GovernanceTestHarnessPolicyEvaluator
Implements
Inherited Members

Remarks

Selecting a decision per policy token simulates a host-supplied decision policy that reads the endpoint.policy_types metadata entry and varies its outcome. It does not mirror framework behavior: the framework never resolves an endpoint's policy type or selects constraints from it, and the registered evaluator evaluates every registered constraint on every governed endpoint. A test that configures different results for two policy tokens is asserting against host policy it must actually implement, not against something AsiBackbone provides. Without such a host decision policy, both endpoints evaluate identically in production.

Initializes a new instance of the GovernanceTestHarnessPolicyEvaluator class.

Constructors

GovernanceTestHarnessPolicyEvaluator(GovernanceTestHarnessOptions)

Deterministic policy evaluator used by the test harness.

public GovernanceTestHarnessPolicyEvaluator(GovernanceTestHarnessOptions options)

Parameters

options GovernanceTestHarnessOptions

Remarks

Selecting a decision per policy token simulates a host-supplied decision policy that reads the endpoint.policy_types metadata entry and varies its outcome. It does not mirror framework behavior: the framework never resolves an endpoint's policy type or selects constraints from it, and the registered evaluator evaluates every registered constraint on every governed endpoint. A test that configures different results for two policy tokens is asserting against host policy it must actually implement, not against something AsiBackbone provides. Without such a host decision policy, both endpoints evaluate identically in production.

Initializes a new instance of the GovernanceTestHarnessPolicyEvaluator class.

Methods

EvaluateAsync(GovernanceEvaluationContext, CancellationToken)

Evaluates the supplied context and returns the composed governance decision.

public ValueTask<GovernanceDecision> EvaluateAsync(GovernanceEvaluationContext context, CancellationToken cancellationToken = default)

Parameters

context GovernanceEvaluationContext

The framework-neutral evaluation context.

cancellationToken CancellationToken

A token that can cancel asynchronous evaluation.

Returns

ValueTask<GovernanceDecision>

The composed governance decision.