VIOLET V2d: V2 exec gate PASSED on prod host + beartype ADOPT verdict
200 scenario cycles @100ms TTL with the V0 storm as concurrent background load: deadline_jitter p99 8.47ms (<25, zero early fires), ttl_resolution fire->CANCEL p99 5.89ms (<50) p50 0.08ms (<10), all terminals correct, zero stuck orders/deadlines, capital never froze, run-to-run determinism (identical outcomes_hash). V0 latency gate re-run: still PASSED. beartype A/B (subprocess, import-time kill-switch): jitter p99 delta +0.42ms, ttl p99 delta +0.025ms -> ADOPT (<1ms budget); 'typed' stays on by default, DOLPHIN_VIOLET_BEARTYPE=0 escape hatch retained. exec_harness: CLI runner (the A/B vehicle), is_capital_frozen() for the accounting verdict, early-fires derived from negative jitter. Dedicated non-gate test: full exec path vs ObserveOnlyVenue - inner venue untouched, slot stays free. Violet suite 97 green; router 77 green; shared clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,16 +180,11 @@ class ExecStormHarness:
|
||||
)
|
||||
|
||||
def _accounting_ok(self) -> bool:
|
||||
"""K==E reconciled and capital_frozen never set."""
|
||||
"""capital_frozen never set (the kernel's reconcile-gate verdict)."""
|
||||
try:
|
||||
snap = self.kernel.snapshot()
|
||||
return not bool(self.kernel.is_capital_frozen())
|
||||
except Exception:
|
||||
return False
|
||||
if isinstance(snap, dict):
|
||||
if snap.get("capital_frozen"):
|
||||
return False
|
||||
return True
|
||||
return not bool(getattr(snap, "capital_frozen", False))
|
||||
|
||||
|
||||
def archive_report(report: ExecGateReport) -> Path:
|
||||
@@ -198,3 +193,42 @@ def archive_report(report: ExecGateReport) -> Path:
|
||||
path = REPORTS_DIR / name
|
||||
path.write_text(json.dumps(report.model_dump(), indent=2, default=str))
|
||||
return path
|
||||
|
||||
|
||||
# ── CLI (subprocess vehicle for the beartype ON/OFF gate comparison) ──────────
|
||||
|
||||
def _amain(argv: Optional[List[str]] = None) -> int:
|
||||
import argparse
|
||||
import sys as _sys
|
||||
|
||||
from .domain import _beartype_enabled
|
||||
|
||||
ap = argparse.ArgumentParser(description="VIOLET V2 exec gate runner")
|
||||
ap.add_argument("--cycles", type=int, default=60)
|
||||
ap.add_argument("--seed", type=int, default=7)
|
||||
ap.add_argument("--ttl-ms", type=float, default=100.0)
|
||||
ap.add_argument("--storm-events", type=int, default=0)
|
||||
ap.add_argument("--out", type=str, default="")
|
||||
args = ap.parse_args(argv)
|
||||
|
||||
async def go() -> ExecGateReport:
|
||||
h = ExecStormHarness(ttl_ms=args.ttl_ms)
|
||||
storm = (StormSpec(n_events=args.storm_events)
|
||||
if args.storm_events > 0 else None)
|
||||
return await h.run_gate(
|
||||
IntentScriptSpec(n_cycles=args.cycles, seed=args.seed),
|
||||
background_storm=storm,
|
||||
beartype_meta={"enabled": _beartype_enabled()},
|
||||
)
|
||||
|
||||
report = asyncio.run(go())
|
||||
blob = json.dumps(report.model_dump(), indent=2, default=str)
|
||||
if args.out:
|
||||
Path(args.out).write_text(blob)
|
||||
else:
|
||||
_sys.stdout.write(blob + "\n")
|
||||
return 0 if report.passed else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(_amain())
|
||||
|
||||
Reference in New Issue
Block a user