pineforge-codegen 1.3.0__tar.gz → 1.5.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/CHANGELOG.md +318 -0
  2. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/PKG-INFO +145 -34
  3. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/README.md +144 -33
  4. pineforge_codegen-1.5.0rc1/VERSION +1 -0
  5. pineforge_codegen-1.5.0rc1/docs/PUBLIC_CONTRACT.md +702 -0
  6. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/docs/pine-cap-activation.md +11 -6
  7. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/__init__.py +66 -9
  8. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/base.py +3 -3
  9. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/types.py +7 -3
  10. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/base.py +26 -16
  11. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/checked_settings.py +113 -2
  12. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/collection_history.py +163 -12
  13. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/emit_top.py +24 -8
  14. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/helpers.py +19 -1
  15. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/host_members.py +1 -0
  16. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/input.py +23 -8
  17. pineforge_codegen-1.5.0rc1/pineforge_codegen/codegen/run_stops.py +52 -0
  18. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/security.py +12 -5
  19. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/tables.py +132 -28
  20. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/tv_number_format.py +9 -2
  21. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/types.py +85 -4
  22. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/visit_call.py +174 -55
  23. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/visit_expr.py +32 -6
  24. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/visit_stmt.py +3 -0
  25. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/collection_history.py +122 -20
  26. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/diagnostic_codes.py +18 -8
  27. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/diagnostics_catalog.json +629 -628
  28. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/errors.py +12 -1
  29. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/external_requests.py +30 -9
  30. pineforge_codegen-1.5.0rc1/pineforge_codegen/matrix_overloads.py +7 -0
  31. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/parser.py +7 -2
  32. pineforge_codegen-1.5.0rc1/pineforge_codegen/request_feed_inventory.py +311 -0
  33. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/signatures.py +2 -2
  34. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/support_checker.py +97 -6
  35. pineforge_codegen-1.5.0rc1/pineforge_codegen/timeframe_token_cli.py +133 -0
  36. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pyproject.toml +1 -1
  37. pineforge_codegen-1.3.0/VERSION +0 -1
  38. pineforge_codegen-1.3.0/docs/PUBLIC_CONTRACT.md +0 -372
  39. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/.gitignore +0 -0
  40. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/CONTRIBUTING.md +0 -0
  41. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/LEGAL.md +0 -0
  42. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/LICENSE +0 -0
  43. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/docs/codegen-coverage-gaps.md +0 -0
  44. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/__init__.py +0 -0
  45. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/call_handlers.py +0 -0
  46. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/contracts.py +0 -0
  47. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/diagnostics.py +0 -0
  48. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/analyzer/tables.py +0 -0
  49. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/ast_nodes.py +0 -0
  50. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/block_locals.py +0 -0
  51. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/builtin_keywords.py +0 -0
  52. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/__init__.py +0 -0
  53. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/capabilities.py +0 -0
  54. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/constant_fold.py +0 -0
  55. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/drawing.py +0 -0
  56. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/helpers_syminfo.py +0 -0
  57. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/order_shapes.py +0 -0
  58. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/session_market.py +0 -0
  59. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/codegen/ta.py +0 -0
  60. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/finite_ta_length.py +0 -0
  61. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/lexer.py +0 -0
  62. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/library_inline.py +0 -0
  63. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/library_modules.py +0 -0
  64. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/library_v5.py +0 -0
  65. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/limits.py +0 -0
  66. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/method_binding.py +0 -0
  67. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/pine_libraries.py +0 -0
  68. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/pine_spelling.py +0 -0
  69. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/pragmas.py +0 -0
  70. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/request_discovery.py +0 -0
  71. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/security_contexts.py +0 -0
  72. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/session_reads.py +0 -0
  73. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/symbols.py +0 -0
  74. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/tokens.py +0 -0
  75. {pineforge_codegen-1.3.0 → pineforge_codegen-1.5.0rc1}/pineforge_codegen/tv_input_choices.py +0 -0
@@ -20,6 +20,324 @@ supported as exact pairs; on the 0.x line they are independent. See the
20
20
  the release commit. A prerelease note describes changes since the preceding
21
21
  prerelease or stable tag; the final stable note consolidates the series.
22
22
 
23
+ ## 1.5.0 — Unreleased
24
+
25
+ The planned number of the next release; it stays **Unreleased** until its tag
26
+ exists, and the package version is unchanged. This entry records the diagnostic
27
+ additions below and the report-contract documentation for the paired engine
28
+ fix, and nothing else: the engine pairing, the rest of the content and the date
29
+ of 1.5.0 are set when the release is prepared. The codegen change is
30
+ diagnostics only; the report documentation adds no Python, JSON, diagnostic or
31
+ emitted-C++ change of its own, and no analyzer or code-generation file differs.
32
+
33
+ ### Compatibility and migration
34
+
35
+ - **`note` is a third diagnostic severity, and it is nonfatal.** A diagnostic
36
+ is now an `error`, a `warning` or a `note`: `Level.NOTE` in Python and `"note"`
37
+ as the `severity` of a catalog entry and of a JSON diagnostic. A note is
38
+ nonfatal like a warning. `transpile_full()["diagnostics"]` and the success
39
+ envelope's `diagnostics` list warnings and notes, a script with only notes
40
+ still returns `ok: true` and its C++, and a `CompileError` can carry notes
41
+ beside its errors. `transpile()` still returns no nonfatal diagnostics.
42
+ `CompileError.format()` prints `note[...]` where it printed `warning[...]` for
43
+ the codes below. Code written for two severities must handle `note`: read an
44
+ unknown severity as a warning, never as an error. A note does not mean that
45
+ results are unaffected; PF-W1505 describes a warmup approximation.
46
+ - **Exactly eleven codes change from warning to note:** PF-W1505, PF-W1508,
47
+ PF-W1509, PF-W1525, PF-W1526, PF-W1527, PF-W1528, PF-W1529, PF-W1530,
48
+ PF-W1531 and PF-W1532. They describe calls PineForge skips as visual only
49
+ (`plot(...)`, `table.new(...)`), earnings, dividends, splits, financial,
50
+ footprint and other-symbol requests whose value reaches only display and alert
51
+ sinks and is lowered to `na`, and the `ta.ema` warmup approximation. Every
52
+ other code keeps its severity. PF-W1502 (`color(...)` cast), PF-W1506
53
+ (`color.from_gradient`), PF-W1507 (drawing setters that drop color, style or
54
+ size), PF-W1078 (visual or style constants) and PF-W1552 (a
55
+ `request.security_lower_tf` whose value reaches only display and alert sinks)
56
+ also speak of visual-only or display-only handling and remain warnings: a
57
+ message's wording does not classify it. A consumer that tallied these eleven
58
+ codes as warnings, to gate a run, count warnings or color a banner, now
59
+ receives notes. PF-W1509 still classifies as PF-W1508 where the two templates
60
+ tie, so no new emitted code appears.
61
+ - **`user_message` is a raw ICU template over `args`.** Every catalog entry,
62
+ every `Diagnostic` (`Diagnostic.user_message`) and every JSON diagnostic gains
63
+ `user_message`: a short English ICU template that uses only that diagnostic's
64
+ existing `args` names and may be constant (`{name}() does nothing in a backtest.`
65
+ with `args.name = "plot"`). It is not pre-rendered English. Render it with
66
+ `args` as plain text, never as template syntax or markup, or translate by
67
+ `code`; do not display the unrendered template. It does not replace `message`
68
+ and `hint`. The templates of the eleven migrated codes are fixed string for
69
+ string by a delta fixture. Every template is checked for form (short,
70
+ parseable, over that code's own `args` names). Each of the 97 warning twins
71
+ of an error (`PF-W1nnn` for `PF-E1nnn`) has a sentence of its own that says
72
+ PineForge warns, and the 91 that warn only inside a `switch` arm also say it
73
+ keeps the arm's lowering. No warning or note template says that PineForge
74
+ refuses or rejects something, though one may say what TradingView refuses or
75
+ rejects. Beyond these checks a template's exact wording is not pinned.
76
+ - **Legacy fields are stable.** `code`, `args`, `message`, `hint`, `line`,
77
+ `col`, `endCol`, `ok`, `error` and the envelope keys keep their meaning and
78
+ values: no key is renamed or removed, and no code is renumbered or reused (the
79
+ notes keep their `PF-W` codes, and the prefix is not the severity).
80
+ `render_diagnostic()` still returns the unchanged English `message` and
81
+ `hint`. The catalog schema id stays `pineforge-diagnostics-catalog/v1`, so a
82
+ reader that checks `severity` against two values or rejects unknown entry
83
+ fields must accept `note` and `user_message`. The receiver examples in
84
+ `tests/fixtures/diagnostic_notes/receiver.json` specify the compatibility
85
+ rule; they are not evidence of any application's behavior.
86
+ - **The warmup sidecar is later work.** No compile-time or runtime sidecar
87
+ exists in this entry. PF-W1505 stays the static `ta.ema` note it was, with
88
+ only its severity changed: the support checker emits it at each `ta.ema` call
89
+ it visits, with no per-call condition or suppression and no call-site
90
+ identifier. The startup inventory and extraction that would bind a versioned
91
+ sidecar to a diagnostic by `call_site_id` and source range, so that a consumer
92
+ can show a startup sentence only for a known finite shortfall, are not part of
93
+ this entry, and no diagnostic carries a call-site identifier or a startup
94
+ length.
95
+
96
+ ### Documentation
97
+
98
+ The engine side of the report-ownership text below is a report fix, in
99
+ preparation, that engine `v1.4.0` does not carry.
100
+
101
+ - The [public contract](docs/PUBLIC_CONTRACT.md#a-report-belongs-to-the-call-that-returned-it)
102
+ states that a report belongs to the call that returned it. A call the engine
103
+ refuses without beginning gets the empty report, never an earlier run's rows;
104
+ a run that began and then failed keeps its partial rows; the explicit stream
105
+ snapshot keeps the owner's rows; recorded outputs keep their own record of
106
+ the last run that began.
107
+ - Read the error text, the error code **and** the run status after every run.
108
+ A refusal the engine makes before it admits the begin leaves the status at its
109
+ earlier value (0 after a completed run), so the status alone misses it. The
110
+ README's "Compile & run against the engine" section says the same.
111
+ - Pairing is unchanged in kind: regenerate the strategy C++ and relink against
112
+ the engine release's headers and `libpineforge.a` on a pair change (README
113
+ [Engine pairing](README.md#engine-pairing)).
114
+
115
+ ## 1.4.0 — 2026-10-08
116
+
117
+ A minor release of the exact engine/codegen pair. Its behavior was validated
118
+ before tagging on codegen `bfc4ddce` and engine `b3192bfc`.
119
+ It consolidates the seven requests landed
120
+ since `v1.3.0`: [#183](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/183)
121
+ (emission ordering), [#184](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/184)
122
+ (coded run stops), [#185](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/185)
123
+ (input manifests), [#186](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/186)
124
+ (collection history and binding), [#188](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/188)
125
+ (CI history), [#189](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/189)
126
+ (reference tests), and [#190](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/190)
127
+ (emitted-string regressions and edge cases). Recorded-output support from
128
+ engine request #356 is excluded. The pre-tag validation used these commits
129
+ with `VERSION` equal to `1.3.0`; those results are not post-tag measurements.
130
+
131
+ ### Compatibility and migration
132
+
133
+ - Codegen 1.4.0 supports only engine `v1.4.0`. Regenerate every strategy's C++
134
+ and relink with that release's generated headers and `libpineforge.a`.
135
+ The pair retains C ABI version 4, settings/capability API version 1 and the
136
+ `engine_script_run_v19` epoch; equal version numbers for those interfaces
137
+ do not make mixed engine/codegen releases supported.
138
+ A report's fingerprint records engine/codegen versions, generated C++'s
139
+ hash and the paired engine's corrected provenance values. The retained
140
+ epoch and hash domain tags do not promise equal fingerprints, state-hash
141
+ values or trades across 1.3.0 and 1.4.0.
142
+ - Emitted C++ changes, including common run-stop shims and collection history
143
+ wrappers. Do not reuse a 1.3.0 strategy library or assume source identity.
144
+ The public Python call signatures and override keys stay the same, but
145
+ `inputs` values and the Python/Pyodide success envelopes change as described
146
+ below. These are not blanket byte-identity promises for emission or envelopes.
147
+ - Every manifest row now carries `supported`. When it is `false`, hide the
148
+ input, exclude it from sweeps and optimization, and do not send a value:
149
+ the strategy uses its compiled default, and the paired engine refuses a
150
+ supplied value with `setting_unsupported`. `supported: true` alone does
151
+ not validate the value's type, bounds or options, or make a shared key safe.
152
+ A supported empty dropdown and an unsupported string input can both have
153
+ `options: []`; that list does not determine support.
154
+ - Give each input a unique title before upgrading. Calls with the same title
155
+ or fallback declaration key still produce separate manifest rows with the
156
+ same `title`; their `supported` flags do not detect the collision. Different
157
+ `group=` labels do not separate keys. On the paired 1.4.0 engine's normal
158
+ checked path, a completed run of such a script has `fingerprint: null` even
159
+ without an override. Supplying the shared key fails before execution with
160
+ `setting_rejected`, reason `ambiguous_key`. For example,
161
+ `Period="7"` returned a success report on 1.3.0, whose legacy setter applied
162
+ a shared key to all matching inputs. Legacy-path unresolved provenance rows
163
+ may still appear inside a fingerprint; that differs from the whole
164
+ fingerprint being null on the checked path.
165
+ - The paired engine's run harness now uses the checked settings API. Stored
166
+ presets and sweep values must satisfy the compiled input's type, bounds and
167
+ options. Two other examples that succeeded on 1.3.0 now fail with
168
+ `setting_rejected`: `Color="color.blue"` (`expected_integer`) and
169
+ `Choice="15"` for options `[10, 20, 30]` (`invalid_input_option`). A color's
170
+ manifest still has `type: "string"` and a Pine spelling such as `"color.red"`
171
+ as its default, but the checked native input requires the packed integer;
172
+ do not forward that manifest string as a native color value. The checked
173
+ API also validates parseable numbers, booleans, enum members and known keys.
174
+ This does not mean all invalid settings previously succeeded:
175
+ `initial_capital="abc"` and `initial_capital="-1"` already failed on 1.3.0;
176
+ they now report `expected_finite_decimal` and `value_below_minimum` reasons.
177
+ Legacy C setters retain their existing behavior.
178
+ - The paired engine adds `strategy_get_last_error_code` and
179
+ `strategy_get_last_error_args` beside the existing English error getter,
180
+ under `PINEFORGE_HAS_RUN_FAILURE_CODES_V1`. Its run harness exposes `code`
181
+ and typed `args` beside `error` on failures. Check the failure channel even
182
+ when the English message is empty; do not accept a stopped run's partial
183
+ output as success or parse the English to recover a code. These run failures
184
+ are distinct from transpile-time `CompileError` diagnostics.
185
+ `setting_rejected` is catalog class `input`; `setting_unsupported` is class
186
+ `unsupported`. A deliberate `runtime.error` is `strategy_runtime_error`,
187
+ class `strategy`. The installed engine entrypoint returns exit 4 for all
188
+ three codes: exit 4 alone does not select a billing or refund decision.
189
+ - The paired engine certifies scalar input/override types in fingerprint
190
+ provenance; unresolved values remain explicit rather than being treated as
191
+ certified native values. This is an engine report change, not another field
192
+ added to the transpile-time input manifest. See the paired engine's release
193
+ notes for report resolution reasons and counts.
194
+
195
+ ### Emission and run failures
196
+
197
+ - Requested-context history resets and TA variant position ties no longer
198
+ use address or set order; they preserve traversal order. Refusal
199
+ diagnostics for conflicting scalar history and map locals are hash-seed
200
+ independent.
201
+ - Generated run stops use stable engine failure codes when the paired engine
202
+ advertises `PINEFORGE_HAS_RUN_FAILURE_CODES_V1`. No-data and other-symbol
203
+ stops carry compile-time request provenance; copying their English into
204
+ `runtime.error` cannot select their codes. Older engines keep the legacy
205
+ throws and English messages.
206
+ - `runtime.error(message = "...")` now passes the named message. With the
207
+ coded engine and run harness, a run stopped by `runtime.error()` with an
208
+ empty or named message no longer reports success or exposes partial results.
209
+ - `str.tonumber` no longer hides a stop raised while evaluating its argument;
210
+ only numeric parse failures become `na`. Invalid array sizes, substring
211
+ positions and overflowing format-placeholder indices have checked stops.
212
+ String parsing and checked substring calls do not capture authored helper-like
213
+ names; substring arguments retain source order without copying the source text.
214
+ - Generated run wrappers preserve the inner failure code, and latched setter
215
+ failures and checked strategy construction retain their failure identity.
216
+
217
+ ### Python and Pyodide input metadata
218
+
219
+ - The transpile-time input manifest (`transpile_full()["inputs"]` and the JSON
220
+ envelope of the Pyodide package) gains `supported`, the checked-settings
221
+ receipt's flag, on every input, and reads its defaults, choices and bounds
222
+ from the descriptor that generates the receipt, with the retained limitations
223
+ below. No manifest key is renamed or removed, but these values of existing
224
+ keys change:
225
+ - Source inputs (`input.source`, a plain `input(close)`): `default` is the
226
+ series name, where it was `null`, and `options` lists the nine native
227
+ sources, where it was absent.
228
+ - Enum inputs: `options` lists the `Enum.member` choices, where it was
229
+ absent; `default` keeps its `Enum.member` spelling. The compiled receipt
230
+ encodes that default as its integer member value.
231
+ - String inputs: a built-in constant publishes its runtime value
232
+ (`alert.freq_all` is `"all"`, `currency.USD` is `"USD"`; the manifest held
233
+ the Pine names), a named string constant its value, and the choices of
234
+ `input.timeframe` and `input.session` are listed. What the receipt cannot
235
+ represent (`size.small`, `position.top_right`, `na`) has `supported: false`
236
+ and `options: []`; an unavailable default is `""`, but a representable
237
+ default survives an unsupported choice. String decoding uses the emitter
238
+ escape grammar, keeps literal Unicode and escaped backslashes, and stops
239
+ at the first NUL like the receipt's `std::string(const char*)` constructor.
240
+ NUL is emitted as a fixed three-digit octal escape even before digits;
241
+ this is consistency with current native truncation, not lossless NUL storage.
242
+ - Typed `int`, `float`, `price` and `time` inputs: a signed or
243
+ named-constant `default` is a number, where it was `null`; `min`, `max` and
244
+ `step` appear for signed and named-constant bounds (`minval=-80` was left
245
+ out); an `options=[...]` dropdown lists its numbers. A literal or inlined
246
+ `bool` default publishes a boolean, not a number.
247
+ - A plain `input(-5)` or `input(-2.5)` is typed `int` or `float` with its
248
+ number as `default`, where it was `string` with `null`. The compiled
249
+ getter and checked receipt keep their existing float type for these
250
+ signed plain inputs; this manifest correction does not change that lowering.
251
+
252
+ Values the receipt computes at run time (`LEN * 2`, `not true`,
253
+ `timestamp(year, month, ...)`) stay unpublished: the default remains
254
+ `None`/JSON `null`, an unfoldable bound is omitted, and the whole `options`
255
+ field is omitted when any numeric choice is unfoldable. An `input.color`
256
+ retains its Pine spelling as a string default, not the receipt's packed
257
+ integer; other nonliteral plain `input()` calls remain `string` with no
258
+ published default (the source case above is the exception). A folded
259
+ `timestamp("...")` is a publishable literal. These gaps
260
+ are explicit in `tests/test_input_metadata_receipt.py::KNOWN_LIMITS`, not a
261
+ claim of arbitrary expression evaluation or language soundness.
262
+ - Documents the timeframe spellings of two surfaces, both stable: a capability
263
+ receipt records a request's timeframe as the script wrote it (`"D"`), and
264
+ request discovery and feed keys use the engine's spelling (`"1D"`).
265
+
266
+ ### Collection lowering and refusals
267
+
268
+ - Bind keyword arguments of the matrix methods and the checked array methods to their own parameter slot, with the omitted optional parameters taking their defaults in place (`matrix.sort(m, order = order.descending)`, `m.submatrix(to_column = 1)`, `a.fill(7.0, index_to = 1)` no longer drop or shift a keyword), and refuse a keyword that names no parameter, or a parameter given twice, with the existing argument diagnostics. A defaulted `submatrix` evaluates its receiver once, an index-only `add_row` / `add_col` takes any numeric index, and a bound `array.concat` result (`c = a.concat(b)`, `c := array.concat(a, b)`) keeps the unsupported-function refusal. An array history that reaches a user function's or method's parameter keeps its earlier copy lowering and the earlier refusal of a callee that checks it with `na()`; a bound missing-history matrix reports the recorded na-ID runtime error.
269
+ - Compile matrix/matrix and matrix/scalar `matrix.sum` overloads with matrix-valued results, including helpers and history. Support scalar `matrix.diff`/`matrix.mult` and omitted optional arguments to matrix row/column insertion, submatrix, sort and array fill; unsupported matrix/vector multiplication and bound `array.concat` results report an existing unsupported-function diagnostic instead of failing C++ compilation.
270
+ - Preserve na array IDs when a history offset has no value, including aliases and `na()`-only bindings; array methods on those IDs report the existing runtime error instead of crashing. Bounds-check legacy collection-element reads and writes to prevent unchecked access.
271
+
272
+ The inherited follow-ups remain: keywords on UDT matrix fields, `matrix.new`
273
+ and array methods outside the checked table; `matrix.fill` range handling
274
+ (both spellings still fill the whole matrix); matrix diff/mult dimension
275
+ checks; and nullable history across callable/iteration shapes not covered by
276
+ the documented lowering. This release does not claim those cases resolved.
277
+
278
+ ### Emitted-string edge cases and maintenance
279
+
280
+ - Return the prefix or ticker of the supplied symbol in `syminfo.prefix(symbol)`
281
+ and `syminfo.ticker(symbol)` instead of always reading the chart symbol; the
282
+ variable forms, no-argument calls and direct chart-ID calls keep their
283
+ chart lowering. Supplied-symbol calls split at the first colon; a prefix
284
+ is empty without a colon or with no ticker after it, and a ticker without
285
+ a colon is the full string. Non-string arguments still compile and yield
286
+ an empty string, including the retained string-`na` typing gap.
287
+ - Refuse malformed library versions with the existing import diagnostic instead
288
+ of allowing them to raise outside the JSON gate, including non-ASCII decimal
289
+ digits and ASCII versions exceeding Python's integer-conversion limit.
290
+ - Reserve generated receipt exports and version macros against script names.
291
+ - Escape embedded NUL values in generated C++ string literals, and strengthen
292
+ emitted-string regression tests with explicit emitter reach and round trips.
293
+ - CI fetches full branch history for historical reference tests (#188); two
294
+ whole-C++ comparisons use the accepted immutable scaffold (#189). These
295
+ changes affect verification only, not the compiler or execution semantics.
296
+
297
+ The hardening wording remains scoped to the previously documented emitted-string
298
+ validation and escaping; these edge-case repairs and regression checks are not
299
+ a new arbitrary-source security guarantee. No exploit payloads are included.
300
+
301
+ ### Known issues with consumers
302
+
303
+ The new numeric options expose an exact-type comparison in
304
+ `pineforge-hpo` 0.11.0: a JSON integer `20` is refused with
305
+ `invalid_input_option` for an `input.float` choice `20.0`, although the
306
+ numbers are equal. For HPO 0.11.0, send each selected value with the number
307
+ type the original manifest publishes for that option: `20.0` when it lists
308
+ `20.0` (explicit JSON `20.0` or a Python float), and integer `20` when it lists
309
+ `20`. A float input written with whole-number-literal options such as
310
+ `options=[10, 20, 30]` publishes integer options; mixed lists retain mixed
311
+ number types. The input's `float` type alone does not choose the workaround.
312
+
313
+ This can affect a caller that reads a float-spelled manifest default and
314
+ sends it back through JavaScript's ordinary JSON serialization, which writes
315
+ a whole-number value as `20`, losing its float spelling. Writing `20.0` in
316
+ JavaScript before ordinary serialization does not preserve that distinction;
317
+ preserve each option's original number type at the HPO boundary. Upgrade to
318
+ HPO 0.11.1 or a later release containing the fix when available. This fix is
319
+ separate from the engine/codegen release; HPO 0.11.1 has not been released at
320
+ the time of writing.
321
+
322
+ ### Recorded validation and grades
323
+
324
+ The landed #190 candidate recorded 9,254 engine-enabled pytest passes with
325
+ 12 audited skips, 2,164 focused passes each under GCC and Clang without skips,
326
+ 314 public corpus compilation passes, and 279 fixtures in each of the JSON
327
+ and Pyodide fixture-parity checks. Those
328
+ are the request's retained native measurements, not a new native suite run
329
+ for this documentation change. The release-pair baseline records
330
+ excellent: <!-- pf:releases[1.4.0].scoreboard.excellent|int -->7,983<!-- /pf -->;
331
+ strong: <!-- pf:releases[1.4.0].scoreboard.strong|int -->6<!-- /pf -->;
332
+ graded: <!-- pf:releases[1.4.0].scoreboard.graded|int -->7,989<!-- /pf --> probes,
333
+ with <!-- pf:releases[1.4.0].scoreboard.belowStrong|int -->0<!-- /pf --> below strong
334
+ and <!-- pf:releases[1.4.0].scoreboard.engineErrors|int -->0<!-- /pf --> engine errors.
335
+ These are recorded grading outcomes, not a statement that no internal attempt
336
+ ever failed. Baseline <!-- pf:releases[1.4.0].scoreboard.id|code -->`pineforge-parity-baseline-20261007-engine-b3192bfc`<!-- /pf -->
337
+ measures engine <!-- pf:releases[1.4.0].scoreboard.engineCommit|short-code -->`b3192bfc`<!-- /pf -->
338
+ and codegen <!-- pf:releases[1.4.0].scoreboard.codegenCommit|short-code -->`bfc4ddce`<!-- /pf -->;
339
+ these quantities render from the public release facts, not numeric overrides.
340
+
23
341
  ## 1.3.0 — 2026-10-06
24
342
 
25
343
  A minor release: generated strategy libraries gain two receipts beside 1.2.0's