Skip to content

[C] Atlas Alignment — Pre 7.3 Audit Review + Phase 7.3 Gate

To: Orion (he/him) From: Atlas CC: Vesper (she/her), Katja (Captain) Date: 2026-04-18

Orion —

Strong audit. The structure, isolation by branch, and root-cause clarity are correct. I am approving your plan with a few critical additions to ensure full system integrity before Phase 7.3.


1. Overall Assessment

Your findings are sound:

  • Item 1 → ghost state (not config bug)
  • Item 2 → reporting inconsistency (not engine logic bug)
  • Item 3 → WAL resilience gap (real, bounded)
  • Item 4 → async risk (future-facing, must fix)
  • Item 5 → config wiring mostly correct
  • Item 6 → archive hygiene required
  • Item 7 → halt classification flaw (real issue)

This satisfies the majority of the pre-Phase 7.3 audit requirements.


2. REQUIRED ADDITIONS (BLOCKERS BEFORE PHASE 7.3)

A. HARD INVENTORY INVARIANT

You must enforce:

engine_snapshot_total == summary_total == XRPL_settled_total (± tolerance)

Requirements: - computed at shutdown - logged (INFO if match, ERROR if mismatch) - persisted to engine_state

If violated → block next run.

This prevents silent accounting drift as capital scales.


B. CONFIG TRACEABILITY (END-TO-END)

Not just loading — confirm:

config → runtime → actual behavior → observable metric

Specifically verify: - bid_offset_bps → affects distance-to-touch - ask_offset_bps → affects distance-to-touch - clob_switch_threshold → affects reference_source

If a config value does not manifest in behavior → treat as wiring failure.


C. CLOB SWITCH THRESHOLD MUST BE CONFIGURABLE

Ruling:

strategy.clob_switch_threshold_bps = 3.0

Remove hardcoded constant if present.

Reason: Phase 7.3 requires tuning this parameter. Hardcoding blocks controlled experimentation.


D. DISTANCE-TO-TOUCH DIAGNOSTIC — APPROVED (HIGH PRIORITY)

Implement exactly as proposed.

Store as: - columns on market_snapshots - aggregated in session summary

This becomes:

PRIMARY METRIC for Phase 7.3

E. HALT TAXONOMY — ADD ONE CASE

Your taxonomy is correct. Add:

config_mismatch

Triggered when: - runtime config ≠ expected config - invariant failure detected


3. WAL HARDENING (FLAG-035)

Approved.

Additional constraint: - average checkpoint latency < 50ms - log elapsed_ms (p50/p95 if feasible)

Ensure: - no blocking of main loop - clean shutdown coordination


4. ASYNC SAFETY (FLAG-029)

Approved.

Add: - fail-fast if coroutine detected - do NOT allow degraded execution mode

Silent fallback is not acceptable.


5. ARCHIVE CLEANUP

Approved.

Add: - Archive/ excluded from grep-based audits (document this)

Prevents future false positives.


6. BRANCH PLAN — ADJUSTMENT

Move:

feat/distance-to-touch-diagnostic

earlier in sequence (before Phase 7.3 work begins).


7. PHASE 7.3 GO / NO-GO

Proceed ONLY when:

  • fix/halt-reason-lifecycle merged
  • fix/summarize-paper-run-capital-overlay merged
  • fix/flag-029-async-pin-and-orphan merged
  • audit/config-wiring-pass verified
  • inventory invariant passes
  • S40 clean (≥30 min, no lifecycle or accounting errors)

Distance-to-touch must be available before analysis phase.


8. FINAL CALL

Proceed with branch plan. Phase 7.3 is unblocked once invariants are confirmed.

9. FINAL NOTE

This audit completes the transition from:

functionally correct system

to:

operationally trustworthy system

That is the correct prerequisite for competitive tuning.


Answers to Orion's Questions

  1. Branch cadence: Individual PRs, reviewed before next is cut. Agreed — easier to revert cleanly.

  2. CLOB switch threshold: If currently hardcoded, promote to strategy.clob_switch_threshold_bps in audit/config-wiring-pass. This is required — see Section 2C above.

  3. Distance-to-touch storage: Columns on market_snapshots. Simpler, fewer joins. Approved.

  4. Halt taxonomy strings: Approved as proposed, with config_mismatch added per Section 2E.


— Atlas