Skip to main content

defense_aware_shadow_plan

Function defense_aware_shadow_plan 

Source
pub fn defense_aware_shadow_plan(
    planner: &AttackPlanner,
    snapshot: &KnowledgeSnapshot,
    subject: &EntityId,
    context: PlanningContext,
    signal: &ResourceDefenseSignal,
    classify: impl Fn(&AttackAction) -> DefenseInteractionClass,
) -> Result<DefenseAwareShadowPlan, PlannerError>
Expand description

Computes the current plan, a defense-aware shadow plan, and their delta.

This is pure and side-effect-free: it uses the planner’s read-only snapshot seam, issues no request, and mutates no planner, runtime, knowledge, or experience state. The signal applies only when it is scoped to subject and recommends more than Proceed; otherwise the shadow plan equals the current plan and the delta is empty. The shadow plan is always an order-preserving, dependency-safe subsequence — it never replans or introduces a new action.