Expand description
Deterministic execution-policy selector for pane-history strategies (bd-1k7ek.6).
Three semantically-equivalent ways to drive pane undo/redo now exist —
baseline (no history), the checkpointed PaneInteractionTimeline,
and the persistent PaneVersionStore —
proven byte-identical over lockstep histories
(tests/pane_persistent_equivalence.rs). Once equivalent implementations
exist, the system should pick the cheapest safe one for the observed
workload rather than hard-coding one globally.
This module is that policy layer, and it is deliberately not opaque adaptive magic:
- Selection is a pure, deterministic function of an observed
PaneWorkloadProfileand explicit, documented thresholds — same inputs always yield the samePaneExecutionDecision. - Every decision carries a human-readable
logand aPaneStrategyReasonexplaining why a strategy was chosen, so profiling and regressions stay explainable. - The checkpointed timeline is the conservative fallback (it is the certified production path and the differential oracle for the persistent spike); it is chosen whenever the persistent criteria are not all met.
- Operators can force any strategy (
PaneExecutionPolicy::forcing) or force the conservative path (PaneExecutionPolicy::conservative) for debugging and rollout — overrides bypass the adaptive logic entirely. reselectapplies hysteresis so the selector does not thrash when the workload jitters near a threshold.
Because the candidate strategies are proven equivalent, selecting among them can never change observable behavior — only cost. The selector emits the decision; wiring it to a live execution engine is downstream integration (the persistent store is still a prototype on no production path).
Structs§
- Pane
Execution Decision - A deterministic, auditable strategy-selection decision.
- Pane
Execution Policy - Deterministic policy that selects among the three pane execution strategies.
- Pane
Workload Profile - Observed shape of a pane-interaction workload window — the deterministic input to strategy selection.
Enums§
- Pane
Strategy Reason - Why a strategy was selected — the auditable rationale in every decision.