Skip to content

Vesper Execution Note — Guard Architecture Fixes Pre-S53

Per Atlas ruling received 2026-04-22.


1. State Variables That Reset on ANCHOR_IDLE Entry

Reset (confirmed by Orion Q2 answers + Atlas ruling)

Variable Reset value Rationale
_drift_ticks_since_opposing_fill 0 Condition C primary counter. Idle time is not active exposure. Pre-idle fill imbalance resolved by entering idle.
Any burst-window tick state for C 0 Any rolling window that measures quoting-continuity for condition C specifically must not carry forward.

Preserve

Variable Rationale
_drift_fills_seen_this_session Cumulative session fill count — meaningful for session-level metrics regardless of idle. Does not drive C's timer.
Burst-detection window state for A Condition A fires on rapid same-side fills in active quoting — not relevant during idle, but preserving allows burst detection to remain accurate post-idle if fills were near session boundary.
Net notional imbalance state for B Same rationale as A — cumulative, not continuity-dependent.

Atlas nuance: "This ruling is specific to the control history used by drift condition C. Do not reset unrelated system state casually."

Orion should confirm which variables are C-specific vs shared before implementing.


2. Idle-Sourced vs Active-Sourced Episode: Definition

Active-sourced episode

A DEGRADED entry counts as active-sourced if: - _current_truth_mode() was MODE_OK or MODE_DEGRADED (recovery path) at the moment the guard fired - Equivalently: engine was in its normal quoting/recovery cycle when the safety condition triggered

Idle-sourced episode

A DEGRADED entry counts as idle-sourced if: - _current_truth_mode() was MODE_ANCHOR_IDLE at the moment the guard fired - Engine was paused for regime reasons; guard fired as a consequence of the paused state

Implementation guidance

The simplest implementation: at DEGRADED entry, inspect current mode and increment the appropriate counter.

if current_mode == MODE_ANCHOR_IDLE:
    idle_episode_count[source] += 1
else:
    active_episode_count[source] += 1

degraded_episode_limit_halt should only fire when active_episode_count[source] reaches the limit. Idle episode count is tracked separately — exact limit TBD per Atlas ("not yet ruling on exact numbers").


3. Success Criteria for Next Validation Session (S53)

A session counts as validation success if:

Criterion Required
Engine survives past 50 ticks FLAG-048 warm-up completes — this is the minimum meaningful threshold
No degraded_episode_limit_halt from idle-sourced episodes Episode budget split working correctly
Engine exits ANCHOR_IDLE and places orders post-idle C counter reset on entry confirmed working
No immediate drift C re-fire on first tick post-idle FLAG-050 fix confirmed working
Halt reason (if any) is duration_elapsed or active-sourced episode limit only Session terminated for correct reasons

A session that halts on inventory_truth_halt or degraded_episode_limit_halt from active trading risk is acceptable — those are correct safety behaviors.

A session that halts before tick 50 from idle-sourced episode burn is a test failure.


4. Branch Scope for Orion

Two changes required. Orion may deliver as one branch or two — his call on what is cleaner to test and review.

Change 1 — FLAG-050: Reset drift-C fill history on ANCHOR_IDLE entry

Location: _evaluate_directional_drift_guard or the ANCHOR_IDLE entry handler (wherever _current_truth_mode transitions to MODE_ANCHOR_IDLE) What: Reset _drift_ticks_since_opposing_fill (and any other C-specific quoting-continuity state confirmed by Orion) to 0 when engine enters ANCHOR_IDLE. Tests required: - Idle entry resets C counter - Post-idle engine places orders without immediate C re-fire - Reset does not affect A/B state

Change 2 — Idle-vs-active episode accounting split

Location: DEGRADED entry logic (episode increment site) What: At DEGRADED entry, route episode count to active_episode_count or idle_episode_count based on current mode. degraded_episode_limit_halt gates on active_episode_count only. Tests required: - Idle-sourced DEGRADED entry does not increment active count - Active-sourced DEGRADED entry does not increment idle count - degraded_episode_limit_halt fires correctly on active limit - Engine can cycle through idle-sourced episodes without session termination - FLAG-048 warm-up (50 ticks) can complete when anchor is hostile but no active-sourced safety events occur


5. What This Unlocks

With both changes in place: - FLAG-048 can finally be validated (50-tick warm-up reachable) - Sessions in hostile anchor regimes will idle correctly and resume when conditions allow - The Atlas-locked principle ("A bad regime is not, by itself, a reason to terminate the session") is restored - S53 is unblocked


— Vesper 2026-04-22