Skip to content

refactor: replace seven pending-order flags with quantity and event facts - #236

Merged
luisleo526 merged 1 commit into
mainfrom
refactor/pending-order-core
Sep 10, 2026
Merged

refactor: replace seven pending-order flags with quantity and event facts#236
luisleo526 merged 1 commit into
mainfrom
refactor/pending-order-core

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Pending orders stored quantity intent, reservation coverage, replacement identity and callback origin in independent booleans. This replaces seven stored fields with Units/Fraction/All requests and numeric reservation bases, an exact predecessor incarnation, and immutable callback/fill/cursor facts. PendingOrder now has 25 direct Boolean members instead of 32. The duplicated EXIT predecessor is also removed.

The integrated path initializes deferred market-close quantity requests before later rebinding. An independently reproduced missing-intent exception after reversal is fixed without weakening the guard. The recorded placement target remains distinct from the later reservation produced by the existing Pine ANY-relative rule.

The C mirror preserves all 108 existing fields and appends 20 facts; legacy fields are derived outputs only. Both PendingOrder and BacktestEngine use internal C++ v5, including rejection of old standalone order callers. Broker/stream fingerprints advance together. Public C ABI 4 and stream API 1 are unchanged.

This is a partial state-model refactor related to #227. One persistent binary Pine historical-reach permission remains active, alongside the other 25 booleans and existing scheduling/admission policies. Generic leg-owner activation and external execution ingestion are separate work.

Validation: full configured build; 14 selected native/tool checks; 314 corpus transpile/compile checks without runtime execution; 15 compile-only pairing translation units, 10 positive and 15 rejected links. Independent exact-candidate Grok P0/P1/P2 = 0/0/0 and scoped Q1 repair review passed. Original failing witnesses are preserved.

Full Cloud assessment exp-pending-order-core-20260910: 4,190/4,190 graded across 72/72 cases. Raw CSVs, trade counts, complete grades and substantive verifier results are unchanged against both c45/741 and official baseline56. Target band score0, zero individual regressions; scoreboard remains4,182 excellent /8 strong. All source/input/runtime and complete Postgres row projections were verified.

Formal PR gate pineforge-pr-gate-rtplv remains FAIL solely target.not-positive because the score is zero. Publication uses the owner's explicit standing authorization for native neutral fixes with actualZERO and no individual regression. No grading rule, reference, input or population changed; no PASS receipt or baseline promotion is fabricated. Snapshot 61afac8eb013fc49f304d9d981c89a3a0dee42290ac60ea33c01d051079b9565; exact source/review evidence archive 185c3d7f6fd4e7acff0388d9d00a42120c065369f1727106ef8b0ccc3853619a.

Track quantity requests and reservation bases, exact replacement predecessors,
and callback birth/cursor provenance instead of independent Boolean labels.
Capture resolved targets for deferred closes before later reservation binding.
Keep the remaining Pine historical reach permission explicit.

Preserve the v1 C mirror prefix with derived legacy outputs and appended facts.
Version PendingOrder and BacktestEngine together to reject stale C++ objects.
@luisleo526
luisleo526 merged commit 149f77c into main Sep 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant