Skip to content

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
mainfrom
refactor/adapter-lowering-20260914
Draft

luisleo526 wants to merge 1 commit into
mainfrom
refactor/adapter-lowering-20260914

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Slice C (R4-D, adapter-to-native lowering) — codegen side, paired with pineforge-engine PR #254.

  • Price-less strategy.exit(id, from_entry, comment) now lowers to strategy_exit_cancel_bracket(exit_id, from_entry, comment) instead of strategy_close(id, comment); the from_entry id is no longer discarded. Priced exits and every other command route are unchanged.
  • barstate.isnew reads is_first_tick() instead of the protected member is_first_tick_ (contract P13); history_advances_new_bar() / security_series_slot_is_new() unchanged.
  • Every generated TU carries #ifndef PINEFORGE_HAS_NATIVE_LOWERING_V1 / #error / #endif after the engine includes (no fallback; the switched engine defines the macro in pineforge/source/pine_strategy_host.hpp).
  • Goldens regenerated; text-level tests added for both exit shapes, the accessor, the capability fence and the convert_to_account/symbol identity lowering. support_checker, signatures and the official surface are unchanged.

Verification (local): pytest -q 1932 passed / 581 skipped / 0 failed; git diff --check clean; Python-re scan over goldens: 0 protected-member references, 0 strategy_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.md in the campaign evidence directory. Requires the engine at or after PR #254 (L3a).

🤖 Generated with Claude Code

https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm

… 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
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