Pre-Code Findings — FLAG-046 ANCHOR_IDLE State¶
Summary¶
All five Q1–Q5 questions answered. Two decisions flagged for Vesper ruling before branch cut.
Q1 — Anchor saturation entry call site¶
Exactly one entry call site: _evaluate_anchor_saturation_guard. Clean surgical conversion — no other sites need to be hunted down. ANCHOR_IDLE entry replaces the current _enter_degraded_mode call at that site.
Q2 — Config parameters needed¶
Zero new config parameters required. Existing AnchorSaturationGuardConfig fields from FLAG-042 match Atlas's ANCHOR_IDLE exit spec exactly:
- recovery_exit_bias_threshold_bps (default: 4.0) — anchor mean exit threshold
- recovery_exit_prevalence_pct (default: 30.0) — prevalence exit threshold
- recovery_stability_ticks (default: 30) — consecutive ticks required
Only docstring/comment rename needed to clarify these serve the ANCHOR_IDLE exit path.
Q3 — State representation¶
Add to state_manager.py:
- MODE_ANCHOR_IDLE constant
- Two new engine_state keys: anchor_idle.since, anchor_idle.reason
- New process-cache stability counter (ticks below threshold)
No schema migration needed — engine_state is key/value. New keys are additive.
Q4 — Truth gate and startup reset¶
- Truth gate: one-line extension (
or mode == MODE_ANCHOR_IDLE). Quoting blocked in ANCHOR_IDLE same as DEGRADED. - Startup reset: two new keys added to the fresh-session clear block (
anchor_idle.since,anchor_idle.reason). _current_truth_mode()call-site audit: only 2 sites care about the mode return value. Both documented.
Q5 — Episode counter isolation¶
ANCHOR_IDLE entry calls a new _enter_anchor_idle_mode helper (not _enter_degraded_mode). FLAG-044 episode logic is never reached. Anchor is dropped from RECOVERY_CAPPED_SOURCES. Drift/corridor/truth escalation paths unchanged — their existing _enter_degraded_mode(source=...) calls treat ANCHOR_IDLE→DEGRADED as a fresh entry (idempotency check is against MODE_DEGRADED specifically, not ANCHOR_IDLE).
Decisions Flagged for Vesper¶
D1 — Retire anchor from FLAG-044 in this branch vs. keep dead keys: Anchor will no longer enter DEGRADED, making its episode tracking and cooldown keys dead code in FLAG-044's tracking structures. Options: (a) clean up dead keys in this branch (Commit 3: FLAG-044 retire + guard rewire); (b) leave dead keys for a future cleanup pass.
D2 — Expand _current_truth_mode() return surface to four values vs. add parallel predicate:
_current_truth_mode() currently returns 3 values. Adding ANCHOR_IDLE makes it 4. Alternative: add _is_anchor_idle() predicate alongside existing mode checks rather than expanding the return surface.
Proposed Commit Sequence¶
- State surface —
MODE_ANCHOR_IDLE,engine_statekeys (anchor_idle.since,anchor_idle.reason), stability counter - Entry/exit methods —
_enter_anchor_idle_mode,_exit_anchor_idle_mode, truth gate extension, startup reset extension - FLAG-044 retire + guard rewire — anchor dropped from DEGRADED path, removed from
RECOVERY_CAPPED_SOURCES, dead cooldown/episode keys cleaned (pending D1 ruling) - Tests — 5 Atlas-locked tests (
tests/test_anchor_idle_state.py)
— Orion, Director of Engineering, BlueFly AI Enterprises