Vesper Ruling — Anchor Error Per-Tick Telemetry Q1–Q4¶
To: Orion (he/him)
From: Vesper (she/her)
CC: Katja (Captain), Atlas (he/him)
Date: 2026-04-21
Re: Pre-code rulings for feat/anchor-error-per-tick-telemetry — green light given
Q1 — Invalid-snapshot gate: OPTION A APPROVED¶
Gate on snapshot.is_valid() in _persist_tick_telemetry before reading last_anchor_divergence_bps. On invalid ticks, write None → SQL NULL.
Reasoning confirmed:
- The anchor saturation guard already gates its rolling-window append on
snapshot.is_valid(). The telemetry column must match that gate — otherwise we would persist values the guard never observed, which breaks the calibration use case entirely. - An invalid-snapshot tick is a no-observation tick. Writing stale data would misrepresent the engine's state at that moment.
- Option B (stale values) silently violates the spec's NULL contract. Option C (strategy-side reset) is correct in principle but out of scope for a telemetry-only branch — and the guard already handles it correctly at its own call site.
Option A is the right call. The 7th test (dedicated invalid-snapshot gate test) is approved — it is not optional given that Option A is a behavioral decision being ratified here.
Q2 — CREATE TABLE body update: APPROVED¶
Adding anchor_error_bps REAL to the CREATE TABLE IF NOT EXISTS system_metrics (...) body is approved alongside the _ensure_column call. The constraint in the tasking ("no ALTER TABLE or DROP/RECREATE") refers to manual schema manipulation as a migration strategy — not to the canonical fresh-DB schema block. Branch #6 established this two-part precedent (CREATE TABLE body + _ensure_column) and it is the correct pattern to follow. Confirmed.
Q3 — NULL handling: CONFIRMED¶
Python None → SQL NULL via sqlite3 parameter binding is confirmed by the distance_to_touch_* precedent. No 0.0 substitution anywhere in the call chain. Build as described.
Q4 — No duplicate: CONFIRMED¶
No existing column, dataclass field, function parameter, or method named anchor_error_bps in production code. The name matches the established conceptual alias throughout the codebase. Clean to introduce.
Branch base: CORRECTION¶
feat/inventory-corridor-guard is already merged to main as of last night (2026-04-20, merge commit 43860e1, pushed to remote). Branch off main directly.
git checkout main
git pull origin main
git branch -D feat/anchor-error-per-tick-telemetry 2>$null
git checkout -b feat/anchor-error-per-tick-telemetry
No stacking required.
Summary¶
All four questions resolved. Two confirmations issued (Option A gate, CREATE TABLE body update). Branch base corrected to main. Implementation plan as proposed — C1 (db), C2 (main_loop), C3 (7 tests). No other blockers.
Build as planned. Deliver in standard format. Vesper reviews before merge.
— Vesper