Skip to content

Atlas Alignment — Reconciliation Stack Complete + Pre-Session-41 State

To: Atlas (he/him) From: Vesper (she/her) CC: Katja (Captain), Orion (he/him) Date: 2026-04-19 Re: Both reconciliation branches merged. Realignment pending. Ready for S41 after balance correction.


Status

Both branches from your revised priority order are now live on main.

Branch Commits Tests Status
feat/wallet-truth-reconciliation 9 26 ✅ Merged (D2.2)
feat/reconciler-disappeared-order-audit-log 4 11 (+33 regression) ✅ Merged

Your core invariant is now enforced at three points: startup gate, 60s periodic check, and pre-trade gate at every submit_intent.


What's live on main

Startup gate: if on-chain divergence exceeds halt threshold (5 XRP / 10 RLUSD) at boot, the engine refuses to start and prints a structured error with delta values and the realignment command. --accept-truth-divergence overrides into DEGRADED with three audit keys persisted.

DEGRADED mode: cancel all orders, stop quoting, keep reconciling, recoverable without restart. Timeout to HALT after 300s (degraded_timeout_s). inventory_truth.mode, inventory_truth.degraded_since, inventory_truth.degraded_reason on engine_state.

Pre-trade gate: reads inventory_truth.status from in-memory state at every submit_intent. HALT/DEGRADED block. WARN proceeds with log. Unverified proceeds with WARNING. Rate-limited logging (first + every 50th refusal).

Realignment tool: tools/realign_inventory_to_onchain.py — dry-run default, --confirm required, active-session lock, atomic two-row write, event_type='realignment' in capital_events. Does not perturb basis (FLAG-031) or deposits (FLAG-030) accounting.

Reconciler audit log: reconciler_anomaly_log table. Every phantom-fill event in _handle_disappeared_active_order() now writes a structured row + [RECONCILER_ANOMALY] WARNING log before the fill is applied. Dashboard chip RECON_ANOM: n surfaces in the System Health strip when n > 0. Zero behavioral change — this is pure observability pre-FLAG-037.


Before S41: inventory realignment required

The engine's internal balance has not been corrected since the S33–S39 drain investigation. On-chain truth (static since S39 close): 29.42 XRP / 154.46 RLUSD. The startup gate will refuse to start until the internal balance is brought within the 5 XRP halt threshold.

Katja will run tools/realign_inventory_to_onchain.py --confirm (with current market price) to write the correction row before S41. The startup check will then clear and the engine can run normally.


FLAG-037 sequencing

Per your "observe → understand → then fix" mandate: FLAG-037 (fix/reconciler-disappeared-order-conservative) is on hold until we have at least one live session's worth of data in reconciler_anomaly_log. After S41 we query the population, characterize frequency and market context, and use that to scope the FLAG-037 design. Orion is standing by.


Phase 7.3 gate status

Gate Status
1. Wallet truth reconciliation root cause ✅ Complete
2. feat/wallet-truth-reconciliation live and tested ✅ Merged
3. Anchor saturation guard Pending
4. Inventory corridor guard Pending
5. Directional drift guard Pending
6. feat/anchor-error-per-tick-telemetry Pending
7. Session-close cancellation invariant Pending (useful, not primary)

Gates 3–7 remain. No new design questions from us on those — waiting for your direction on sequencing and any spec constraints before Orion starts.

— Vesper