Repository navigation
Close spy-lean-parity and dividend-sim-module on the qualifying parity v2 replay (sim rung ready) - #103
Merged
seathatflowsinourveins merged 10 commits intoSep 23, 2026
Conversation
…d DistributionModule) Implements harness_changes_required of the sealed mapping-manifest-v2.json (sha256 1b821d7b...): the market-on-open proxy as a native OCO pair of STOP_MARKET and MARKET_IF_TOUCHED orders submitted from the decision bar at the decision close +/- 0.0001, and dividend cash through a native SimulationModule (distribution_module.py) that posts frozen per-share x ctx.positions quantity at 00:00 New York on LEAN's next-session ex-date. run.py binds the v2 manifest (and v1 by its recorded sha256), passes the explicit venue settings, checks the engine extension sha256 and scans the fully captured engine log for ERROR lines. compare.py binds v2, treats engine-posted distributions as native cash, adds the OCO, gap/open, log and module checks, and reports FAIL for any failure (no unsupported rows). Tests add the no-gap, flat-bar, double-fill, partial-fill, late-emission and calendar+1 boundary fixtures. The published v2 receipt and verdict follow in the next commit; the sealed manifest, preregistration, tolerances and probes are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
run.py now copies a constant list of deviations from the sealed v2 text into the receipt: the run precedes the independent review the preconditions require, the sealed status fields stay unedited, a late module emission is refused after engine.run() rather than mid-run, the v2 results use receipt-v2.json/verdict-v2.json, the annotated manifest evidence class, INFO-level captured engine logging, and the operator-declared --harness-commit argument. Nothing sealed, no tolerance and no input changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eviewed) receipt-v2.json is the unedited output of the documented bwrap two-run replay (rc5, extension sha256 a53dd5a2..., no network namespace, cleared environment) run from commit 8c4d7e7. verdict-v2.json is compare.py --bars against the sealed v2 manifest and unchanged tolerances; --lean-data re-derivation writes a byte-identical verdict. Entry 304 @ 323.58 and exit -304 @ 291.69 by native OCO gap-open fills, engine-posted distributions 0.00 and 428.64, native end cash 90734.08, zero ERROR log lines, two runs equal after UUID normalization. The receipt carries the declared deviations, including that the replay precedes the independent review the preconditions require. v1 receipt.json and verdict.json (BLOCKED) and every gate row are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…engine views, replay history) compare.py evaluates acceptance_criteria.preconditions as checks under the sealed verdict rule: a retained review of exactly the files that ran, completed before the run; the sealed manifest, tolerances and frozen inputs at run time and, with --lean-data only, at comparison time; the engine pin and isolation. It pins the sealed v2 manifest and preregistration sha256 and refuses a v2 receipt bound to any other file, judges the OCO structure from the engine cache's own order records at OrderAccepted and at run end, and checks that every reported AccountState after the initial one is a module emission. The verdict reports preregistration_qualifying and the execution checks separately. run.py records started_utc, an optional --review-record, the read-only mount observation, the engine order views, the configured module count labelled as configuration, the full replay history (replay-history-v2.json) and revised deviations; the sizing note is a limitation. fixture_strategy.py reads each accepted order back from the engine cache. Nothing sealed changes; the published receipt-v2.json and verdict-v2.json are stale until the re-run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ondition (96/96 execution checks pass) receipt-v2.json is the unedited output of the documented bwrap two-run replay (rc5, extension sha256 a53dd5a2..., loopback only, cleared environment, read-only harness and data mounts) run from commit f079f6c. verdict-v2.json is compare.py --lean-data against the sealed v2 manifest and unchanged tolerances: every execution check passes (entry 304 @ 323.58 and exit -304 @ 291.69 by native OCO gap-open fills read back from the engine cache, engine-posted distributions 0.00 and 428.64, native end cash 90734.08, zero ERROR lines, two runs equal after UUID normalization), and nine of ten precondition checks pass. precondition_review fails because no retained independent review preceded this run, so under the sealed verdict rule the verdict is FAIL and preregistration_qualifying is false. This supersedes the unqualified PASS published at 9d55cb4. replay-history-v2.json appends this run. v1 receipt.json and verdict.json and every gate row are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dge OCO timing and legs from the engine compare.py (precondition_review) no longer reports PASS or preregistration_qualifying while any recorded earlier v2 replay has reviewed_before_run other than true, unless the gate owner's acceptance of deviation first_v2_run_preceded_review (deviation-acceptance-v2.json, not created here) existed at run time, is unchanged at comparison time, has exactly the six schema keys, names that deviation, binds the five reviewed harness files that ran and is dated before started_utc. The replay history is re-hashed at comparison time (append-only growth only), and a run whose reviewed files equal an earlier replay's fails. v2_oco_checks replaces the tautological submission-instant check with the engine clock (submitted_clock_ns) and each leg's OrderSubmitted and OrderAccepted ts_event at the decision ts (probe_oco_moo_p4: 96/96 accepted legs at the decision bar), checks the filled leg per fill_rule_by_open from engine_at_accept, and requires unique order_refs equal to the intents, four distinct legs, no other client_order_id in order_events and no denial or rejection anywhere. final_quantity and receipt intents/fills project strictly. Also: determinism is recomputed from runs[*].normalized_economic_sha256 and undeclared_differing_fields; under v2 a skipped check is FAIL; MOO attribution is computed only for a failing price; run.py records python -I, a read-only interpreter prefix, user/pid namespace indicators and documented environment values (compare.py checks them; the rest is declared as isolation_partially_observed) and derives the sizing limitation from the intents. Every replay from f079f6c is listed as superseded. No replay was run; receipt-v2.json and verdict-v2.json stay the superseded f079f6c results. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ceptance Review record (schema spy-parity-v2-harness-review/1): harness cc4503f independently reviewed and accepted with zero unresolved findings, accepted limitations listed. Deviation acceptance first_v2_run_preceded_review: the six earlier replays ran before review and are superseded; the first replay from the reviewed harness, run after this commit with the committed history, may qualify under unchanged sealed criteria; no retry from cc4503f can. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ity and dividend-sim-module Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ping-status revision Result review: the closure receipt now carries mappings_closed per the gate's preregistered schema, and mapping-status-20260923.json records the three v2 rows as resolved under the v2 manifest's own rule (the sealed v2 and hash-bound v1 manifests are not edited; declared deviation from the note's v1 wording). Tests tie the receipt and revision to the qualifying verdict and receipt. Stale gate-note sentences rewritten as history. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
deleted the
claude/spy-parity-v2-qualify-20260923
branch
September 23, 2026 04:31
9 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes
spy-lean-parityanddividend-sim-module. The simulation rung of the trading gate ladder is now ready:trading_gates.py --checkreportsrung_ready.sim = true.Qualifying SPY/LEAN parity v2 replay:
verdict-v2.jsonreads PASS withpreregistration_qualifying: true.SimulationModuledividend cash: 428.64, posted as reported AccountStates.How it was produced (bias control):
12059ba). Tolerances are unchanged.replay-history-v2.jsonand recorded as superseded.f079f6c: not accepted. Five required fixes to the comparator.cc4503f: accepted with zero unresolved findings. Each round used three Opus lenses plus one read-only Codex review (gpt-6-astra, high) and an adjudication.review-record-v2-cc4503f.jsonanddeviation-acceptance-v2.json(efcdb11, 04:14:49Z) before running the qualifying replay itself (04:15:06Z) from the reviewed harness.replay-history-v2.jsonasbwrap-cc4503f-qualifying, with full hashes.cc4503fcan qualify.Gate changes:
spy-lean-parity→ established,receipt_pathnowverdict-v2.json. v1's BLOCKEDverdict.jsonis retained.dividend-sim-module→ established (native_proven).dividend-module-receipt.json, matching the gate's preregistered schema (status: closed,mappings_closed).mapping-status-20260923.json: all three v2 rows move from preregistered to resolved under the v2 manifest's own rule.Limits:
one_zerocase only.Evidence
python3 -m unittest: 2593 OK (338 skipped).validate.ymlsteps,trading_gates.py --check,evidence_manifest.py --checkandbuild_ecosystem.py --checkrc=0.origin/main..HEAD: no leaks.V2GateClosureTeststie the closure receipt and revision to the verdict.🤖 Generated with Claude Code