Skip to content

fix: scope strategy.close replacement by callsite#126

Merged
luisleo526 merged 1 commit into
mainfrom
codex/strategy-close-callsite-queue-v2
Jul 21, 2026
Merged

fix: scope strategy.close replacement by callsite#126
luisleo526 merged 1 commit into
mainfrom
codex/strategy-close-callsite-queue-v2

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

What changed

  • add a stable six-argument strategy.close runtime path keyed by compiler callsite token
  • preserve the five-argument compatibility path as token zero and leave the public C ABI unchanged
  • queue distinct syntactic close sites in first-admission source order while repeated evaluations of one site replace in place
  • keep per-site reservation and provenance state isolated across bars and reset it across engine lifecycles
  • cover all existing bypass paths including ANY, explicit qty and percent, immediate, non-POOC, intrabar COOF, and consumed-C COOF

Evidence

  • native TradingView ledgers: XAU close-ledger cube, A-B-A interleaving, and shared-inner-UDF replacement
  • exhaustive 2^2 interaction matrix: 4 of 4 cells passed with no early stop; all-off reproduced the defect and all-on matched every native ledger
  • supplemental UI-observed overlap probe also matched; it is not presented as a native CSV export
  • fresh Release CTest: 114 of 114 passed
  • targeted integration: 1173 passed, 0 failed
  • calc-on-order-fills: 281 checks passed
  • corpus: 252 of 252, with 247 Excellent, 4 Strong, and 1 known anomaly
  • full validation board: 416 of 416 completed, 355 Excellent, 46 Strong, 4 Moderate, 2 Weak, 0 downgrades
  • six production-strategy tape and mismatch-set digests were byte-identical across all matrix cells; XAU remained Strong, so this runtime correctness milestone is intentionally tier-neutral

Scope boundary

The cross-owner same-ID persistent backing model is regression-covered and preserves the established physical-capacity rule, but this PR does not claim a new native TradingView tape for that separate cross-bar edge.

Landing order

Merge this engine overload first. The dependent codegen PR will emit nonzero source-location tokens only after this PR is green and merged.

@luisleo526
luisleo526 merged commit 22fbf5a into main Jul 21, 2026
7 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