fix: enforce exposure-bound exit activation across fill routes - #237
Merged
Conversation
Replace two stored suppression flags with concrete owner-bound activation coordinates and immutable Pine placement evidence. Resolve bindings on real creation, replacement, exposure creation and flat transitions. Enforce each fixed leg's readiness in revival, prearmed gap precedence and chart-extreme rounding fallback. Preserve independent risk liquidation and ready sibling pricing; cover the bypasses with literal native controls. Preserve the public C mirror prefix and version changed C++ types as v6.
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.
Pending exits could execute before their leg's activation deadline through margin-revival, prearmed open-gap selection, or chart-extreme rounding fallbacks. The engine now binds stop/limit readiness to an exact exposure cycle and applies that readiness at these fill routes. Forced margin liquidation still executes, and a ready sibling leg remains eligible.
Concrete native witness: a long position of 20 at 100 with 50% margin receives a required four-unit liquidation at 95. Its stop has a later activation deadline. Previously the remaining 16 also stopped early; now the risk fill remains and the stop waits for its deadline.
Two persistent leg-suppression booleans are replaced by owner-bound activation coordinates and immutable placement evidence.
PendingOrderdirect booleans decrease from 25 to 23. This is a bounded step toward the order-model work associated with #227. Existing Pine placement/continuation policy selection remains active; this does not complete adapter separation or the broader ordered-submodel refactor.Internal C++ order/engine layout and fingerprints advance to v6. Public C ABI 4, stream API 1 and mirror schema 1 remain unchanged; all 128 existing mirror fields are retained, with 14 appended fields.
Validation: full configured build; 16 selected native/tool checks; 19 new readiness-route scenarios with 127 assertions; three original failing native witnesses now pass unchanged. Exact v5/v6 pairing covers 20 compiles, 13 positive links and 21 stale-link rejections. The 314 corpus compile-only results are reused only with verified identical v6 headers. Independent Grok review of the exact 31-file candidate is GREEN, P0/P1/P2 = 0/0/0.
Full Cloud assessment
exp-exit-activation-readiness-20260910measured 4,190/4,190 probes across 72/72 cases. Raw CSVs, trade counts, complete grades and substantive verifier results are unchanged against both shipped149/741 and official baseline56: actual target score zero and zero individual regressions. Scoreboard remains 4,182 excellent / 8 strong. Inputs, reference evidence, population, grading metrics and thresholds are unchanged.Formal gate
pineforge-pr-gate-dx9clremains FAIL solelytarget.not-positive, because the score is zero. Publication uses the owner's standing authorization for native neutral fixes under the actual-zero/no-individual-regression condition. No PASS receipt or baseline promotion is fabricated. Candidate snapshot:8be01e18f2384e092117bc032592e14f5b7309c07d602bc0d97cf9ee3bde5972.Exact source, review, native witness and gate proof archive:
b4209522f7d13d738640a3bd3fade771ffd7a85752cc8902b2b99f8fb436ee62(1,975,436 bytes; 111 indexed files verified after GCS download).