Files
siloqy/prod/tests/test_dita_v2_docs.py
Codex 3d7b00e28d Snapshot PINK DITAv2 system + Sprint 0 flaw-fix verification
First commit of the previously-untracked PINK-on-DITAv2 migration system
(execution moves to the Rust kernel; policy stays on legacy DITA, so Alpha
Engine algorithmic integrity is preserved). BLUE is untouched.

Sprint 0 (safety snapshot + flaw-fix verification, MARKET single-leg scope):
- Verified Rust FSM fixes (flaws 2,4,10,11,13) by source read of lib.rs.
- Hardened 5 vacuous/guarded assertions in test_flaws.py so each flaw test
  genuinely exercises its fix. Most important: Flaw 5 now asserts capital
  moves by EXACTLY realized PnL (was entering/exiting at the same price).
- Offline suites: 533 passed, 0 failed (35 flaws + 402 kernel/accounting/
  bridge + 96 runtime/persistence/multi-exit/restart/seams).
- GATE PASS: MARKET-path-critical flaws 1,2,5 confirmed fixed + green.
- Added SPRINT0_FLAW_VERIFICATION.md report and _rust_kernel/.gitignore
  (excludes Rust target/ build artifacts).

LIMIT/partial-fill remain explicitly out of scope (MARKET-only bring-up).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:26:43 +02:00

38 lines
1.6 KiB
Python

from __future__ import annotations
from pathlib import Path
import unittest
class TestDITAv2Docs(unittest.TestCase):
def test_kernel_reference_exists(self) -> None:
text = Path("/mnt/dolphinng5_predict/prod/docs/DITA_V2_KERNEL_REFERENCE.md").read_text()
self.assertIn("# DITAv2 Kernel Reference", text)
self.assertIn("dolphin:dita_v2", text)
self.assertIn("prod/clean_arch/dita_v2/rust_backend.py", text)
self.assertIn("write-through", text)
self.assertIn("notify/wait", text)
self.assertIn("50 collected cases", text)
self.assertIn("full-stack E2E / functional tests", text)
self.assertIn("mocked exchange-first and BingX-basic E2E paths", text)
self.assertIn("KernelSeverity.WARNING", text)
self.assertIn("release_eta", text)
self.assertIn("retryable", text)
self.assertIn("dita_v2_live_bingx_smoke.py", text)
self.assertIn("--dry-run", text)
def test_system_bible_points_to_dita_v2_reference(self) -> None:
bible = Path("/mnt/dolphinng5_predict/prod/docs/SYSTEM_BIBLE_v7.md").read_text()
self.assertIn("DITA_V2_KERNEL_REFERENCE.md", bible)
self.assertIn("DITAv2 execution/launcher/operator surface", bible)
self.assertIn("write-through Zinc mirror semantics", bible)
self.assertIn("one-shot notify/wait signal contract", bible)
self.assertIn("full-stack DITAv2 E2E/functional matrix", bible)
self.assertIn("retryable transient throttling", bible)
self.assertIn("dita_v2_live_bingx_smoke.py", bible)
self.assertIn("--dry-run", bible)
if __name__ == "__main__":
unittest.main()