Repository navigation
Exit binding tests: pin that the cap part judges an add once - #344
Merged
Merged
Conversation
The cap part of the exit-binding rule (withdraw_unplaced_cap_adds) acts on an add only at the first opening after the add's call (placement_script_open_ms != last_broker_open_ms_). No test covered that condition: with it deleted, the whole suite still passed. Add one mechanism case to test_exit_binding_tapes: engine rows on the tapes' bars, not a TradingView tape. At pyramiding 1 under process_orders_on_close, an add called at the cap beside a close of the held entry is kept at the next opening (the position is flat), and a later market entry refills the cap. The add must still rest and fill at its limit, 3804.34 on 2025-11-03 02:30 UTC, for three rows, with every part on and with the cap part off, and the forward stream must close the backtest's trades. Without the condition the engine withdraws the add at the opening after the refill and books two rows. Tests only: src/ and include/ are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
luisleo526
force-pushed
the
px/w1-cap-test
branch
from
October 5, 2026 11:24
422dd31 to
02d97da
Compare
luisleo526
added a commit
that referenced
this pull request
Oct 6, 2026
* docs: release notes and version scoping for v1.3.0 CHANGELOG 1.3.0: confirmed-bar admission in pineforge-live (#342), the Pine adapter changes of #341, #345 and #347, tests and docs (#343, #344); no report key changes; the state-hash recipe additions of #341 and #347, domain tags and the v19 epoch unchanged; migration. Version scoping: README, install.md and public-contract.md name v1.3.0, its tarballs, the engine1.3.0-codegen1.3.0 image and the 1.3.0 pair. The confirmed-bar receipt and its admission, marked unreleased after 1.2.0 by #342, ship in 1.3.0 (README, strategy-capabilities.md, runner/README.md). Codegen license lines (README, LEGAL.md, docs/pages/index.md): the PineForge Source License 1.2 from codegen 1.3.0; 1.2.0 keeps 1.1, releases up to 1.1.0 the PolyForm Noncommercial terms. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: release 1.3.0's grades in the README and the changelog, from the facts tokens The README's release sentence moves to the releases[1.3.0] tokens, and its main-scoreboard lines re-render the values defe41f (#343) rendered at pineforge-release 3e39d64, and the 1.3.0 changelog says which registry baseline grades the release and why that baseline is the release's code, all rendered from pineforge-release facts/facts.json at ff21de0 (#32). The changelog sentence extends the last line of the "What a script author sees" bullet that 0e1ced7 added. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Tests only. This adds one committed test for the exit-binding cap condition that engine #341 added: the cap part acts on an add only at the first opening after the add's call.
tests/test_exit_binding_tapes.cpp,cap-add-judged-once. It checks the engine's own rows on the existing tapes' bars; it is not a TradingView tape. At pyramiding 1 under process_orders_on_close, an add called at the cap beside a close of the held entry is kept at the next opening. That add must still rest and fill at its limit, 3804.34 on 2025-11-03 02:30 UTC. The case asserts three rows, the same rows with the cap part off, and backtest equal to stream.src/orinclude/. The fixture README names the case.Verify bundles on this tree: release 862, sanitizers 840, debug 843, kernel 307 with 0 boundary findings, parity 312/312 with 0 moved, subset 54, docs.
🤖 Generated with Claude Code