Lower price-less strategy.exit to the bracket-cancel command and read the first-tick predicate through its accessor (R4-D W5) - #130
Draft
luisleo526 wants to merge 1 commit into
Conversation
… the first-tick predicate through its accessor (R4-D W5) Lower price-less strategy.exit to strategy_exit_cancel_bracket with from_entry and comment preservation. Require PINEFORGE_HAS_NATIVE_LOWERING_V1 in every generated translation unit, route barstate.isnew through is_first_tick(), and regenerate generated-output goldens and exact byte pins. Contract: §4; §2 P13; amendment A22. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
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.
Slice C (R4-D, adapter-to-native lowering) — codegen side, paired with pineforge-engine PR #254.
strategy.exit(id, from_entry, comment)now lowers tostrategy_exit_cancel_bracket(exit_id, from_entry, comment)instead ofstrategy_close(id, comment); thefrom_entryid is no longer discarded. Priced exits and every other command route are unchanged.barstate.isnewreadsis_first_tick()instead of the protected memberis_first_tick_(contract P13);history_advances_new_bar()/security_series_slot_is_new()unchanged.#ifndef PINEFORGE_HAS_NATIVE_LOWERING_V1 / #error / #endifafter the engine includes (no fallback; the switched engine defines the macro inpineforge/source/pine_strategy_host.hpp).convert_to_account/symbolidentity lowering.support_checker, signatures and the official surface are unchanged.Verification (local):
pytest -q1932 passed / 581 skipped / 0 failed;git diff --checkclean; Python-rescan over goldens: 0 protected-member references, 0strategy_close(from price-less exits. The compile-backed suite runs against the engine PR #254 tree at integration; the composite Cloud Run sweep over the 4190-probe corpus follows on the final engine+codegen pair (one sweep per PR).Evidence:
tasks/r4-d/LANDING-W5-CODEGEN-REPORT.mdin the campaign evidence directory. Requires the engine at or after PR #254 (L3a).🤖 Generated with Claude Code
https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm