Repository navigation
codegen: var color state inside a request.security helper (Part of #229) - #255
Closed
luisleo526 wants to merge 3 commits into
Closed
luisleo526 wants to merge 3 commits into
luisleo526 wants to merge 3 commits into
Conversation
…or half) Red-first tests: the reporter's script must translate, explicit and inferred color declarations are typed from the Pine type, the requested value must match a helper without var, a color set on one requested bar must persist when the next bar does not assign it, na colors must match chart state, and epoch-width int, varip and collection state stay refused. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…color half) A helper-local var of Pine type color now keeps its state in the helper's double series: the packed 32-bit ARGB value is exactly representable, na is preserved, and reads cast back to the ordinary color integer type. The type is taken from the declaration (type hint, analyzed type, or color-valued initializer), never from a name or a literal. The epoch-width int64 refusal and the collection / UDT / drawing refusals are unchanged; their message for non-int64 types now also names color (new code PF-E3093; PF-E3015 stays pinned). Part of #229 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…F-E3093; AGENTS.md lists colour (#229, var color half) The boundary test (epoch-width int64, varip, collection stay refused) no longer carries the colour positive control, which is its own test, and its collection case asserts the new code PF-E3093 instead of matching the old sentence by prefix. AGENTS.md's helper `var` state row names colour (packed exact 32-bit ARGB in the double series, na as NaN, read back as int64_t). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526
added a commit
that referenced
this pull request
Oct 26, 2026
…ialization, request.currency_rate, helper-local var color, one-line field assignment) (#261) ## What This branch carries five codegen fixes planned for 1.8.0. It is five merge commits on `main`, one per pull request, in this order, followed by one CHANGELOG commit. | Merged pull request | Fix | |---|---| | #260 | A `calc_on_order_fills` recalculation after a fill no longer rolls back the state of a deferred `request.security` evaluation (a silent wrong value, for example after a late margin-call liquidation). | | #259 | A persistent (`var`) UDT, array, map or matrix whose initializer reads an earlier computed value is initialized once, in statement order (Fixes #226). A `varip` declaration with the same dependency still reads the default; that gap is tracked in #258. | | #254 | `request.currency_rate` raises its error only where the call is evaluated, not where it merely appears in a branch that never runs (Fixes #228). | | #255 | `var color` state inside a `request.security` helper, explicit or inferred, with persistence, transparency and `na` (Part of #229). The refusal for any other unsupported helper-local `var` type has the new code `PF-E3093`. | | #253 | A UDT field assignment as the body of a one-line function or method (Part of #230). | The CHANGELOG commit puts all five entries in the planned 1.8.0 section, updates its summary and compatibility notes, and removes the separate planned-patch section one of the merged branches added. ## Scope and limits - The five merge commits resolved no code conflict; the only textual conflicts were in `CHANGELOG.md`, replaced once by the last commit. The name-status against `main` is the union of the five pull requests' own files (28 files). - Over the 555 corpus and fixture scripts the emitted C++ differs from `main` in 72 scripts, all from the #260 change and only inside `restore_script_state()`; the other 483 are byte-identical. The other four fixes change no script of the 555; their tests cover their shapes. - The user-facing text of two diagnostics (`PF-E1088`, `PF-W1088`) is reworded and one code is added (`PF-E3093`); the catalog schema is unchanged. - The second half of #229 (the history of a derived helper argument) and the `varip` gap (#258) are not in this branch; they follow as separate pull requests. ## Tests - Full suite on the head of this branch with the paired engine: 10725 passed, 221 skipped (private fixtures and empty parameter sets, the same 221 as `main`), 0 failed. - A parity sweep over the whole population (7989 graded probes): PASS, no regression and no improvement (hard gate: 1009 evaluated, no moves; coverage complete). - Every pull request above keeps the tests it was reviewed with; this branch adds no test of its own. Fixes #226, Fixes #228. Part of #229, Part of #230. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor
Author
|
Superseded by #261, which carried this fix into the 1.8.0 release. |
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.
codegen:
var colorstate inside arequest.securityhelperA helper-local
varof Pine typecolorevaluated byrequest.securitywas refused (#229, second pattern). It now keeps its state in the helper's double series: the packed 32-bit ARGB value is exactly representable,nais stored as NaN and read back as the ordinary color integer. The type is taken from the declaration (type hint, analyzed type, or a color-valued initializer), never from a name or a literal.int64refusal (PF-E3015, same text),varip, and collection / UDT / drawing state stay refused. The remaining non-scalar refusal has a new code PF-E3093 whose text also names color; PF-E3015 stays pinned and is used for the epoch-width case only.varstate row lists color.Tests (red first, expected values from controls: a helper without
var, the chart's ownvar color): the reporter's script, explicit and inferred declarations, transparency (alpha above 2^31), persistence when the next requested bar does not assign,naseed and reassignment, and the unchanged boundaries. Lab (CLOUD, paired engine main): red 10 failures on the old refusal, green 10644 passed / 0 failed (+ compile-corpus 312 earlier), raw-bytes comparison of 555 scripts identical to the base.Part of #229 (the helper-parameter history half is a separate design, not in this PR).
🤖 Generated with Claude Code