Commit Graph

2 Commits

Author SHA1 Message Date
Codex
7ae49c587e VIOLET V2c: synthetic intent scripts + ExecStormHarness + 9-scenario matrix
synthetic_intents.py: seeded IntentScriptSpec -> CycleSpec scripts
(script_hash + outcomes_hash determinism, V0 discipline); per-scenario
router ExecConfig constructed directly (no env mutation); cycle executor
runs full ENTER->terminal->flatten lifecycles with per-scenario terminal
predicates and cycle-end invariants (working registry empty, driver
drained, slot flat).

exec_harness.py: composition root — production bundle (MOCK, injected
ScriptedVenue), ExecDeadlineDriver ports wired, pump = venue.reconcile()
-> kernel + driver.on_fill forwarding (the production seam), gate report
via the ExecGateReport schema, archive next to V0 reports.

scripted_venue.py amendment: MARKET orders never rest (venue realism —
directives are keyed by trade_id and the R1 MARKET fallback shares the
position's trade_id).

Matrix green through the REAL kernel at 100ms TTL: immediate fill,
rest-then-fill (deadline cancelled), fill-races-cancel (no retry),
rest-expire-retry (-r1 opens), retry-exhaust skip|market, exit-expire ->
MARKET same trade_id, post-only reject, cancel-reject (no strand). Two
runs same seed -> identical outcomes_hash. Router 77 green; shared clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 00:31:09 +02:00
Codex
dfe7136404 VIOLET V2b: ScriptedVenue + ExecDeadlineDriver (event-driven TTL @sub-second)
exec_driver.py lifts PINK's TTL-resolution logic (_exec_after_submit /
_handle_expired_working, live-proven) into a standalone driver with
injected ports (router/submit/pump/slot_view/venue_flat/ref-price) and
replaces the 1s polling sweep with one DeadlineScheduler deadline per
working order. The driver is the TIMING authority (router clamps TTLs
>=0.5s — its internal deadline is vestigial here); the router stays the
POLICY authority. R1 preserved verbatim: exit TTL -> MARKET escalation on
the SAME trade_id; post-only reject -> schedule_in(0) through the one
shared resolution path; venue-truth requote gate fails safe.

scripted_venue.py subclasses MockVenueAdapter (zero shared edits) with
per-trade directives: IMMEDIATE_FILL / REST_THEN_FILL / REST_THEN_EXPIRE /
POST_ONLY_REJECT / CANCEL_REJECT / FILL_RACES_CANCEL; deferred fills
release through reconcile() (the production pump seam), never the 50ms
subscribe() poll.

17 new tests incl. full-kernel CANCEL->venue mapping, fill-races-cancel,
bounded retry chains, on_fill deadline cancellation, fail-safe probe.
Router 77 green untouched; shared files clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 00:18:54 +02:00