Skip to content

fix: expose short margin liquidations before script evaluation - #207

Merged
luisleo526 merged 4 commits into
mainfrom
round23/short-margin-script-final
Sep 7, 2026
Merged

fix: expose short margin liquidations before script evaluation#207
luisleo526 merged 4 commits into
mainfrom
round23/short-margin-script-final

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Short liquidations were settled after the close-time strategy calculation. A strategy could read a retired position, suppress a flat-only entry, or attach a bracket using the old entry price. Settle the supported short margin checkpoint before the script and retire a fully closed position's old bracket before new orders are placed.

The shared engine path selects by broker state and order ownership, without strategy, symbol, date, or benchmark-ID conditions. Its measured scope is an ordinary market-origin short of at most one unit, 100% margin, a fractional lot step, no fees/slippage/FX conversion, and at most one own regular priced bracket. Liquidation arithmetic, sizing rules, grading metrics, verifier, harness, population, and tapes are unchanged.

The README now reports the round 23 overall and per-lane scoreboard and current test inventory. Remove four retired research files under validation-adhoc/4emarsi-commission-slippage-ethusdt, replacing documentation references with permanent links to their published Git history. Those files are not runtime/build or registry inputs; all four graded 4emarsi corpus probes remain intact and excellent. The FX test changes only a comment citation.

Validation on frozen 00938e4ca48ae6b37e6979f9c6b0f9a2969b0e79:

  • All 4,190 probes measured on Cloud Run: 4,166 excellent / 24 strong / zero moderate. BTC Rhyme17 and Ycelestine move strong to excellent; the other 4,188 canonical results are unchanged. Zero errors, coverage gaps, or regressions, including all 704 hard probes.
  • The two target outputs match all 10,742 TradingView rows on side, time, price, and quantity. Eleven covered TradingView controls pin opening/carried full and partial liquidations, script-visible position size, funded cases, and explicit replacement brackets.
  • All 215 tests pass after a full rebuild; C ABI and library freshness checks pass. New regression fixtures fail on the earlier behavior and cover excluded checkpoint owners.
  • Independent Grok 4.6 high review of the exact final candidate: P0/P1/P2 = 0. All earlier review findings are resolved. Every README lane and trade-count aggregate matches the final measurement.

Codegen remains pinned to 3fd97fe28abd7b191cb376d9f5db4e056fcfae4b. No product release or compute-plane deployment is included.

Formal Cloud Run gate pineforge-pr-gate-dzccj: PASS, target score +2, 704 hard probes with zero regressions or tolerated exceptions. Gated snapshot: 51d6e41d27fcca7e021d3aa7f180002c0f0b662f4ee221869915bb2fb6c4de5f.

@luisleo526
luisleo526 merged commit 00938e4 into main Sep 7, 2026
8 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