pineforge-codegen 1.2.0__tar.gz → 1.4.0__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 (72) hide show
  1. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/CHANGELOG.md +453 -0
  2. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/CONTRIBUTING.md +11 -5
  3. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/LEGAL.md +5 -5
  4. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/LICENSE +19 -3
  5. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/PKG-INFO +130 -31
  6. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/README.md +110 -27
  7. pineforge_codegen-1.4.0/VERSION +1 -0
  8. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/docs/PUBLIC_CONTRACT.md +211 -16
  9. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/docs/pine-cap-activation.md +11 -5
  10. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/__init__.py +6 -5
  11. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/base.py +3 -3
  12. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/types.py +7 -3
  13. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/base.py +36 -17
  14. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/capabilities.py +143 -10
  15. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/checked_settings.py +161 -4
  16. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/collection_history.py +163 -12
  17. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/emit_top.py +29 -13
  18. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/helpers.py +25 -1
  19. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/host_members.py +1 -0
  20. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/input.py +23 -8
  21. pineforge_codegen-1.4.0/pineforge_codegen/codegen/order_shapes.py +356 -0
  22. pineforge_codegen-1.4.0/pineforge_codegen/codegen/run_stops.py +52 -0
  23. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/security.py +66 -10
  24. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/tables.py +144 -28
  25. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/tv_number_format.py +9 -2
  26. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/types.py +85 -4
  27. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/visit_call.py +235 -55
  28. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/visit_expr.py +40 -8
  29. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/visit_stmt.py +5 -4
  30. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/collection_history.py +122 -20
  31. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/diagnostics_catalog.json +1 -0
  32. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/external_requests.py +30 -9
  33. pineforge_codegen-1.4.0/pineforge_codegen/matrix_overloads.py +7 -0
  34. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/parser.py +7 -2
  35. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/signatures.py +2 -2
  36. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/support_checker.py +101 -10
  37. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pyproject.toml +1 -1
  38. pineforge_codegen-1.2.0/VERSION +0 -1
  39. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/.gitignore +0 -0
  40. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/docs/codegen-coverage-gaps.md +0 -0
  41. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/__init__.py +0 -0
  42. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/call_handlers.py +0 -0
  43. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/contracts.py +0 -0
  44. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/diagnostics.py +0 -0
  45. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/analyzer/tables.py +0 -0
  46. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/ast_nodes.py +0 -0
  47. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/block_locals.py +0 -0
  48. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/builtin_keywords.py +0 -0
  49. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/__init__.py +0 -0
  50. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/constant_fold.py +0 -0
  51. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/drawing.py +0 -0
  52. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/helpers_syminfo.py +0 -0
  53. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/session_market.py +0 -0
  54. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/codegen/ta.py +0 -0
  55. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/diagnostic_codes.py +0 -0
  56. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/errors.py +0 -0
  57. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/finite_ta_length.py +0 -0
  58. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/lexer.py +0 -0
  59. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/library_inline.py +0 -0
  60. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/library_modules.py +0 -0
  61. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/library_v5.py +0 -0
  62. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/limits.py +0 -0
  63. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/method_binding.py +0 -0
  64. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/pine_libraries.py +0 -0
  65. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/pine_spelling.py +0 -0
  66. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/pragmas.py +0 -0
  67. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/request_discovery.py +0 -0
  68. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/security_contexts.py +0 -0
  69. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/session_reads.py +0 -0
  70. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/symbols.py +0 -0
  71. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/tokens.py +0 -0
  72. {pineforge_codegen-1.2.0 → pineforge_codegen-1.4.0}/pineforge_codegen/tv_input_choices.py +0 -0
@@ -20,6 +20,459 @@ 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.4.0 — 2026-10-08
24
+
25
+ A minor release of the exact engine/codegen pair. Its behavior was validated
26
+ before tagging on codegen `bfc4ddce` and engine `b3192bfc`.
27
+ It consolidates the seven requests landed
28
+ since `v1.3.0`: [#183](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/183)
29
+ (emission ordering), [#184](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/184)
30
+ (coded run stops), [#185](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/185)
31
+ (input manifests), [#186](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/186)
32
+ (collection history and binding), [#188](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/188)
33
+ (CI history), [#189](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/189)
34
+ (reference tests), and [#190](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/190)
35
+ (emitted-string regressions and edge cases). Recorded-output support from
36
+ engine request #356 is excluded. The pre-tag validation used these commits
37
+ with `VERSION` equal to `1.3.0`; those results are not post-tag measurements.
38
+
39
+ ### Compatibility and migration
40
+
41
+ - Codegen 1.4.0 supports only engine `v1.4.0`. Regenerate every strategy's C++
42
+ and relink with that release's generated headers and `libpineforge.a`.
43
+ The pair retains C ABI version 4, settings/capability API version 1 and the
44
+ `engine_script_run_v19` epoch; equal version numbers for those interfaces
45
+ do not make mixed engine/codegen releases supported.
46
+ A report's fingerprint records engine/codegen versions, generated C++'s
47
+ hash and the paired engine's corrected provenance values. The retained
48
+ epoch and hash domain tags do not promise equal fingerprints, state-hash
49
+ values or trades across 1.3.0 and 1.4.0.
50
+ - Emitted C++ changes, including common run-stop shims and collection history
51
+ wrappers. Do not reuse a 1.3.0 strategy library or assume source identity.
52
+ The public Python call signatures and override keys stay the same, but
53
+ `inputs` values and the Python/Pyodide success envelopes change as described
54
+ below. These are not blanket byte-identity promises for emission or envelopes.
55
+ - Every manifest row now carries `supported`. When it is `false`, hide the
56
+ input, exclude it from sweeps and optimization, and do not send a value:
57
+ the strategy uses its compiled default, and the paired engine refuses a
58
+ supplied value with `setting_unsupported`. `supported: true` alone does
59
+ not validate the value's type, bounds or options, or make a shared key safe.
60
+ A supported empty dropdown and an unsupported string input can both have
61
+ `options: []`; that list does not determine support.
62
+ - Give each input a unique title before upgrading. Calls with the same title
63
+ or fallback declaration key still produce separate manifest rows with the
64
+ same `title`; their `supported` flags do not detect the collision. Different
65
+ `group=` labels do not separate keys. On the paired 1.4.0 engine's normal
66
+ checked path, a completed run of such a script has `fingerprint: null` even
67
+ without an override. Supplying the shared key fails before execution with
68
+ `setting_rejected`, reason `ambiguous_key`. For example,
69
+ `Period="7"` returned a success report on 1.3.0, whose legacy setter applied
70
+ a shared key to all matching inputs. Legacy-path unresolved provenance rows
71
+ may still appear inside a fingerprint; that differs from the whole
72
+ fingerprint being null on the checked path.
73
+ - The paired engine's run harness now uses the checked settings API. Stored
74
+ presets and sweep values must satisfy the compiled input's type, bounds and
75
+ options. Two other examples that succeeded on 1.3.0 now fail with
76
+ `setting_rejected`: `Color="color.blue"` (`expected_integer`) and
77
+ `Choice="15"` for options `[10, 20, 30]` (`invalid_input_option`). A color's
78
+ manifest still has `type: "string"` and a Pine spelling such as `"color.red"`
79
+ as its default, but the checked native input requires the packed integer;
80
+ do not forward that manifest string as a native color value. The checked
81
+ API also validates parseable numbers, booleans, enum members and known keys.
82
+ This does not mean all invalid settings previously succeeded:
83
+ `initial_capital="abc"` and `initial_capital="-1"` already failed on 1.3.0;
84
+ they now report `expected_finite_decimal` and `value_below_minimum` reasons.
85
+ Legacy C setters retain their existing behavior.
86
+ - The paired engine adds `strategy_get_last_error_code` and
87
+ `strategy_get_last_error_args` beside the existing English error getter,
88
+ under `PINEFORGE_HAS_RUN_FAILURE_CODES_V1`. Its run harness exposes `code`
89
+ and typed `args` beside `error` on failures. Check the failure channel even
90
+ when the English message is empty; do not accept a stopped run's partial
91
+ output as success or parse the English to recover a code. These run failures
92
+ are distinct from transpile-time `CompileError` diagnostics.
93
+ `setting_rejected` is catalog class `input`; `setting_unsupported` is class
94
+ `unsupported`. A deliberate `runtime.error` is `strategy_runtime_error`,
95
+ class `strategy`. The installed engine entrypoint returns exit 4 for all
96
+ three codes: exit 4 alone does not select a billing or refund decision.
97
+ - The paired engine certifies scalar input/override types in fingerprint
98
+ provenance; unresolved values remain explicit rather than being treated as
99
+ certified native values. This is an engine report change, not another field
100
+ added to the transpile-time input manifest. See the paired engine's release
101
+ notes for report resolution reasons and counts.
102
+
103
+ ### Emission and run failures
104
+
105
+ - Requested-context history resets and TA variant position ties no longer
106
+ use address or set order; they preserve traversal order. Refusal
107
+ diagnostics for conflicting scalar history and map locals are hash-seed
108
+ independent.
109
+ - Generated run stops use stable engine failure codes when the paired engine
110
+ advertises `PINEFORGE_HAS_RUN_FAILURE_CODES_V1`. No-data and other-symbol
111
+ stops carry compile-time request provenance; copying their English into
112
+ `runtime.error` cannot select their codes. Older engines keep the legacy
113
+ throws and English messages.
114
+ - `runtime.error(message = "...")` now passes the named message. With the
115
+ coded engine and run harness, a run stopped by `runtime.error()` with an
116
+ empty or named message no longer reports success or exposes partial results.
117
+ - `str.tonumber` no longer hides a stop raised while evaluating its argument;
118
+ only numeric parse failures become `na`. Invalid array sizes, substring
119
+ positions and overflowing format-placeholder indices have checked stops.
120
+ String parsing and checked substring calls do not capture authored helper-like
121
+ names; substring arguments retain source order without copying the source text.
122
+ - Generated run wrappers preserve the inner failure code, and latched setter
123
+ failures and checked strategy construction retain their failure identity.
124
+
125
+ ### Python and Pyodide input metadata
126
+
127
+ - The transpile-time input manifest (`transpile_full()["inputs"]` and the JSON
128
+ envelope of the Pyodide package) gains `supported`, the checked-settings
129
+ receipt's flag, on every input, and reads its defaults, choices and bounds
130
+ from the descriptor that generates the receipt, with the retained limitations
131
+ below. No manifest key is renamed or removed, but these values of existing
132
+ keys change:
133
+ - Source inputs (`input.source`, a plain `input(close)`): `default` is the
134
+ series name, where it was `null`, and `options` lists the nine native
135
+ sources, where it was absent.
136
+ - Enum inputs: `options` lists the `Enum.member` choices, where it was
137
+ absent; `default` keeps its `Enum.member` spelling. The compiled receipt
138
+ encodes that default as its integer member value.
139
+ - String inputs: a built-in constant publishes its runtime value
140
+ (`alert.freq_all` is `"all"`, `currency.USD` is `"USD"`; the manifest held
141
+ the Pine names), a named string constant its value, and the choices of
142
+ `input.timeframe` and `input.session` are listed. What the receipt cannot
143
+ represent (`size.small`, `position.top_right`, `na`) has `supported: false`
144
+ and `options: []`; an unavailable default is `""`, but a representable
145
+ default survives an unsupported choice. String decoding uses the emitter
146
+ escape grammar, keeps literal Unicode and escaped backslashes, and stops
147
+ at the first NUL like the receipt's `std::string(const char*)` constructor.
148
+ NUL is emitted as a fixed three-digit octal escape even before digits;
149
+ this is consistency with current native truncation, not lossless NUL storage.
150
+ - Typed `int`, `float`, `price` and `time` inputs: a signed or
151
+ named-constant `default` is a number, where it was `null`; `min`, `max` and
152
+ `step` appear for signed and named-constant bounds (`minval=-80` was left
153
+ out); an `options=[...]` dropdown lists its numbers. A literal or inlined
154
+ `bool` default publishes a boolean, not a number.
155
+ - A plain `input(-5)` or `input(-2.5)` is typed `int` or `float` with its
156
+ number as `default`, where it was `string` with `null`. The compiled
157
+ getter and checked receipt keep their existing float type for these
158
+ signed plain inputs; this manifest correction does not change that lowering.
159
+
160
+ Values the receipt computes at run time (`LEN * 2`, `not true`,
161
+ `timestamp(year, month, ...)`) stay unpublished: the default remains
162
+ `None`/JSON `null`, an unfoldable bound is omitted, and the whole `options`
163
+ field is omitted when any numeric choice is unfoldable. An `input.color`
164
+ retains its Pine spelling as a string default, not the receipt's packed
165
+ integer; other nonliteral plain `input()` calls remain `string` with no
166
+ published default (the source case above is the exception). A folded
167
+ `timestamp("...")` is a publishable literal. These gaps
168
+ are explicit in `tests/test_input_metadata_receipt.py::KNOWN_LIMITS`, not a
169
+ claim of arbitrary expression evaluation or language soundness.
170
+ - Documents the timeframe spellings of two surfaces, both stable: a capability
171
+ receipt records a request's timeframe as the script wrote it (`"D"`), and
172
+ request discovery and feed keys use the engine's spelling (`"1D"`).
173
+
174
+ ### Collection lowering and refusals
175
+
176
+ - 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.
177
+ - 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.
178
+ - 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.
179
+
180
+ The inherited follow-ups remain: keywords on UDT matrix fields, `matrix.new`
181
+ and array methods outside the checked table; `matrix.fill` range handling
182
+ (both spellings still fill the whole matrix); matrix diff/mult dimension
183
+ checks; and nullable history across callable/iteration shapes not covered by
184
+ the documented lowering. This release does not claim those cases resolved.
185
+
186
+ ### Emitted-string edge cases and maintenance
187
+
188
+ - Return the prefix or ticker of the supplied symbol in `syminfo.prefix(symbol)`
189
+ and `syminfo.ticker(symbol)` instead of always reading the chart symbol; the
190
+ variable forms, no-argument calls and direct chart-ID calls keep their
191
+ chart lowering. Supplied-symbol calls split at the first colon; a prefix
192
+ is empty without a colon or with no ticker after it, and a ticker without
193
+ a colon is the full string. Non-string arguments still compile and yield
194
+ an empty string, including the retained string-`na` typing gap.
195
+ - Refuse malformed library versions with the existing import diagnostic instead
196
+ of allowing them to raise outside the JSON gate, including non-ASCII decimal
197
+ digits and ASCII versions exceeding Python's integer-conversion limit.
198
+ - Reserve generated receipt exports and version macros against script names.
199
+ - Escape embedded NUL values in generated C++ string literals, and strengthen
200
+ emitted-string regression tests with explicit emitter reach and round trips.
201
+ - CI fetches full branch history for historical reference tests (#188); two
202
+ whole-C++ comparisons use the accepted immutable scaffold (#189). These
203
+ changes affect verification only, not the compiler or execution semantics.
204
+
205
+ The hardening wording remains scoped to the previously documented emitted-string
206
+ validation and escaping; these edge-case repairs and regression checks are not
207
+ a new arbitrary-source security guarantee. No exploit payloads are included.
208
+
209
+ ### Known issues with consumers
210
+
211
+ The new numeric options expose an exact-type comparison in
212
+ `pineforge-hpo` 0.11.0: a JSON integer `20` is refused with
213
+ `invalid_input_option` for an `input.float` choice `20.0`, although the
214
+ numbers are equal. For HPO 0.11.0, send each selected value with the number
215
+ type the original manifest publishes for that option: `20.0` when it lists
216
+ `20.0` (explicit JSON `20.0` or a Python float), and integer `20` when it lists
217
+ `20`. A float input written with whole-number-literal options such as
218
+ `options=[10, 20, 30]` publishes integer options; mixed lists retain mixed
219
+ number types. The input's `float` type alone does not choose the workaround.
220
+
221
+ This can affect a caller that reads a float-spelled manifest default and
222
+ sends it back through JavaScript's ordinary JSON serialization, which writes
223
+ a whole-number value as `20`, losing its float spelling. Writing `20.0` in
224
+ JavaScript before ordinary serialization does not preserve that distinction;
225
+ preserve each option's original number type at the HPO boundary. Upgrade to
226
+ HPO 0.11.1 or a later release containing the fix when available. This fix is
227
+ separate from the engine/codegen release; HPO 0.11.1 has not been released at
228
+ the time of writing.
229
+
230
+ ### Recorded validation and grades
231
+
232
+ The landed #190 candidate recorded 9,254 engine-enabled pytest passes with
233
+ 12 audited skips, 2,164 focused passes each under GCC and Clang without skips,
234
+ 314 public corpus compilation passes, and 279 fixtures in each of the JSON
235
+ and Pyodide fixture-parity checks. Those
236
+ are the request's retained native measurements, not a new native suite run
237
+ for this documentation change. The release-pair baseline records
238
+ excellent: <!-- pf:releases[1.4.0].scoreboard.excellent|int -->7,983<!-- /pf -->;
239
+ strong: <!-- pf:releases[1.4.0].scoreboard.strong|int -->6<!-- /pf -->;
240
+ graded: <!-- pf:releases[1.4.0].scoreboard.graded|int -->7,989<!-- /pf --> probes,
241
+ with <!-- pf:releases[1.4.0].scoreboard.belowStrong|int -->0<!-- /pf --> below strong
242
+ and <!-- pf:releases[1.4.0].scoreboard.engineErrors|int -->0<!-- /pf --> engine errors.
243
+ These are recorded grading outcomes, not a statement that no internal attempt
244
+ ever failed. Baseline <!-- pf:releases[1.4.0].scoreboard.id|code -->`pineforge-parity-baseline-20261007-engine-b3192bfc`<!-- /pf -->
245
+ measures engine <!-- pf:releases[1.4.0].scoreboard.engineCommit|short-code -->`b3192bfc`<!-- /pf -->
246
+ and codegen <!-- pf:releases[1.4.0].scoreboard.codegenCommit|short-code -->`bfc4ddce`<!-- /pf -->;
247
+ these quantities render from the public release facts, not numeric overrides.
248
+
249
+ ## 1.3.0 — 2026-10-06
250
+
251
+ A minor release: generated strategy libraries gain two receipts beside 1.2.0's
252
+ capability receipt, the confirmed-bar receipt, which engine `v1.3.0`'s live
253
+ runner reads, and the order-shapes receipt; a string dropdown that uses a
254
+ built-in constant no longer breaks the checked settings; and the package is
255
+ licensed under the PineForge Source License 1.2. It covers the changes merged
256
+ to `main` since 1.2.0:
257
+ [#173](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/173) and
258
+ [#178](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/178) add
259
+ the receipts to the emitted C++,
260
+ [#179](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/179)
261
+ changes its checked settings metadata,
262
+ [#177](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/177)
263
+ replaces the license, string values derived from a script are validated and
264
+ escaped wherever they are written into generated C++ (see "Hardening"),
265
+ [#174](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/174)
266
+ renders the README's scoreboard, and
267
+ [#175](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/175)
268
+ changes the repository's CI only. Codegen `1.3.0` supports only engine
269
+ `v1.3.0`. Engine `v1.3.0`'s `<pineforge/pineforge.h>` is the same file as
270
+ `v1.2.0`'s: the pair keeps C ABI version 4, `PF_SETTINGS_API_VERSION` and
271
+ `PF_CAPABILITIES_API_VERSION` 1 and the script ABI epoch
272
+ `engine_script_run_v19`, and no engine header declares the new receipt
273
+ functions, which a host looks up in the library by name.
274
+
275
+ ### Compatibility and migration
276
+
277
+ - Regenerate C++ with 1.3.0 and relink it against engine `v1.3.0`'s headers
278
+ and `libpineforge.a`. The C++ defines the two new receipts beside the
279
+ capability functions, only when the engine's `pineforge/pineforge.h` defines
280
+ both `PF_SETTINGS_API_VERSION` and `PF_CAPABILITIES_API_VERSION`, as engine
281
+ `v1.3.0`'s does. Engine `v1.2.0`'s header defines both too; that does not
282
+ make 1.3.0 with engine `v1.2.0` a supported pair. C++ generated by 1.2.0 has
283
+ neither receipt, and engine `v1.3.0`'s live runner keeps its original
284
+ receipt policy for it (see "Confirmed-bar receipt").
285
+ - Every generated C++ file changes: it gains the two receipts. Beyond that,
286
+ the C++ does not change for the engine's 325 public corpus sources and this
287
+ repository's 277 gate fixtures: each transpiled in a fresh process, 1.3.0's
288
+ C++ with the confirmed-bar and order-shapes functions removed is 1.2.0's C++
289
+ byte for byte, and the 13 fixtures the gate expects to be refused are
290
+ refused with the same message. Elsewhere, #173 changes the capability
291
+ receipt's request entries and `unresolved` list, and #179 the settings
292
+ metadata of a string input that uses a built-in constant (see below),
293
+ shapes none of those sources has. The trading code is unchanged.
294
+ - The Python and JSON contract does not change: no argument, result key or
295
+ envelope is added, removed or renamed. Since 1.2.0 the package's code
296
+ changed only in the code generator (`pineforge_codegen/codegen/`) and its
297
+ support checker (`pineforge_codegen/support_checker.py`):
298
+ `pineforge_codegen/__init__.py`, `pineforge_codegen/errors.py`,
299
+ `gate/glue.py` and `pineforge_codegen/diagnostics_catalog.json` (628 codes)
300
+ are 1.2.0's files. For the 602 sources above, each in a fresh process,
301
+ `transpile_full()`'s result without `cpp`, the diagnostics' codes and
302
+ arguments included, and the `transpile_json` envelope without `cpp` are
303
+ 1.2.0's. The GitHub release attaches the catalog as
304
+ `diagnostics_catalog-v1.3.0.json`.
305
+ - Report keys: the engine's Docker harness (`docker/run_json.py`, which the
306
+ `pineforge-release` image runs) is the same file in engine `v1.3.0` as in
307
+ `v1.2.0`, so no report key is added, removed or renamed;
308
+ `metrics.equity.sharpe_tv` and `sortino_tv` (`EQUITY_REPORT_KEYS`) are
309
+ unchanged, and the engine's ADR-0001 keeps serialized report keys as they
310
+ are. A report's fingerprint still differs between 1.2.0 and 1.3.0, since it
311
+ records the engine and codegen versions and the generated C++'s hash, and
312
+ the engine's Pine adapter changes since `v1.2.0`
313
+ ([pineforge-engine#341](https://github.com/pineforge-4pass/pineforge-engine/pull/341),
314
+ [#345](https://github.com/pineforge-4pass/pineforge-engine/pull/345),
315
+ [#347](https://github.com/pineforge-4pass/pineforge-engine/pull/347)) can
316
+ change a run's trades.
317
+ - 1.3.0 is the first release under the PineForge Source License 1.2. 1.2.0
318
+ shipped under the PineForge Source License 1.1, and releases up to and
319
+ including 1.1.0 under "PineForge Codegen — License"; copies of each release
320
+ keep the license it shipped with (see "License").
321
+
322
+ ### Confirmed-bar receipt
323
+
324
+ From [#173](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/173):
325
+
326
+ - Built against engine `v1.3.0`, a generated strategy library also defines
327
+ `strategy_confirmed_bar_api_version()`, which returns 1, and
328
+ `strategy_confirmed_bar_receipt(s, json, capacity, required, error,
329
+ error_capacity)`, with the buffer protocol and statuses of
330
+ `strategy_capabilities_receipt`. Its canonical JSON is written into the C++
331
+ when it is generated, as the capability receipt's is, and has the keys
332
+ `version`, `requests` (the capability receipt's request fields and the
333
+ lowered `expression`), `orders` and `intrabar_persistence`. `orders` lists
334
+ the distinct classified shapes of the script's `strategy.*` order calls,
335
+ sorted: `entry:market`, `entry:stop`, `entry:limit`, `exit:short_bracket`
336
+ and `close:market` for the modeled calls and arguments, and the call's name
337
+ marked unproven, such as `strategy.exit (unproven exit terms)`, for any other
338
+ call or argument, risk rules and an order ID that is not a string literal
339
+ included. With `process_orders_on_close=true`, `strategy()` sizing, slippage
340
+ or account settings outside the tested literal profiles add
341
+ `strategy() (unproven POOC sizing, slippage or account settings)`.
342
+ - The capability receipt keeps its version and keys, but its request entries
343
+ now take their timeframe, Heikin-Ashi flag and feed from the request's
344
+ registration, as the confirmed-bar receipt's do. A timeframe held by a
345
+ constant global (`htf = "D"`) or passed as a literal to a helper called once
346
+ (`f("5")`) is that timeframe, where 1.2.0 wrote the name (`htf`) and listed
347
+ `request.security[N].timeframe` in `unresolved`. A Heikin-Ashi request of the
348
+ chart's symbol is `feed: "chart"`, where 1.2.0 wrote `auxiliary` and set
349
+ `requirements.auxiliary_security_feeds`. Symbol `""`, which lowers through
350
+ another symbol's feed, is `feed: "auxiliary"` and sets
351
+ `requirements.auxiliary_security_feeds`, where 1.2.0 wrote `chart`. A request
352
+ of `close`, `close[1]`, `ta.sma(close, 4)` or `ta.ema(close, 3)` in a script
353
+ that declares its own `close` adds
354
+ `request.security.expression (user-bound close)` to `unresolved`. An input,
355
+ reassigned or other run-time timeframe stays unresolved.
356
+ - Engine `v1.3.0`'s live runner, `pineforge-live`, reads both receipts
357
+ ([pineforge-engine#342](https://github.com/pineforge-4pass/pineforge-engine/pull/342)),
358
+ checks that they agree and fails closed on a malformed field or a missing
359
+ proof. With the confirmed-bar receipt it admits a same-chart request in the
360
+ proven shapes the engine's `docs/strategy-capabilities.md` lists (such as
361
+ `close` requested at `5`, `60` or `D`, on confirmed one-minute bars) and a
362
+ standalone close-only `varip` on script clock `1`, where engine `v1.2.0`'s
363
+ runner refused every request and every `varip`. Two requests together, a
364
+ request with `varip`, and `process_orders_on_close=true` whatever the order
365
+ shapes stay refused. A library without the confirmed-bar receipt, such as
366
+ one generated by 1.2.0, keeps the original receipt's policy. A batch run
367
+ reads neither receipt, and its computation is unchanged.
368
+
369
+ ### Order-shapes receipt
370
+
371
+ From [#178](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/178):
372
+
373
+ - A generated strategy library also defines
374
+ `strategy_order_shapes_api_version()`, which returns 1, and
375
+ `strategy_order_shapes_receipt(s, json, capacity, required, error,
376
+ error_capacity)`, with the same buffer protocol, whether
377
+ `process_orders_on_close` is on or off. Its canonical JSON describes the
378
+ strategy's order calls as they are lowered, for closing-time order
379
+ processing: the keys are `version`, `process_orders_on_close`, `calls`,
380
+ `entry_ids`, `host_reads`, `settings` and `unmodeled`. `calls` has one entry
381
+ per lowered `strategy.entry`, `strategy.order`, `strategy.exit`,
382
+ `strategy.close`, `strategy.close_all`, `strategy.cancel` or
383
+ `strategy.cancel_all` site, in source order, classing each parameter the
384
+ call passes: a number as `absent` (the default), `literal`, `never_na` or
385
+ `maybe_na`, and text, enums, directions and IDs in classes of their own, an
386
+ ID without its string; a site in a loop, a user function or a method is
387
+ marked `repeatable`. `entry_ids` counts the IDs that `strategy.entry` and
388
+ `strategy.order` sites set, by direction, shared and repeated; `host_reads`
389
+ lists the execution members the generated C++ references; `settings` holds
390
+ the compiled `strategy()` order settings (`pyramiding`, `default_qty_type`,
391
+ `initial_capital`, `slippage`, ...), not later overrides; `unmodeled` names
392
+ every other `strategy.*` call that is not read-only, risk rules included.
393
+ - The receipt describes the calls; it is not an admission decision. Engine
394
+ `v1.3.0` does not read it: the runner-side policy that reads it ships in a
395
+ separate engine change. #178 leaves the capability and confirmed-bar
396
+ receipts byte for byte as they were, the confirmed-bar `orders` included
397
+ (`tests/test_order_shapes.py` pins both), and the trading code unchanged.
398
+ The [public contract](docs/PUBLIC_CONTRACT.md#optional-compiled-execution-capabilities)
399
+ describes both new receipts.
400
+
401
+ ### Checked settings
402
+
403
+ From [#179](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/179):
404
+
405
+ - A strategy whose `input.string` dropdown uses a built-in constant as its
406
+ default or an option no longer breaks its checked settings. 1.2.0 wrote a
407
+ display constant's integer code, such as `size.tiny`'s or
408
+ `position.top_left`'s, where an option of the settings metadata needs a
409
+ string, so building the metadata made a string from a null pointer and
410
+ `strategy_get_effective_settings` or `strategy_set_input_checked` failed or
411
+ crashed. A constant that the generated code reads as a string
412
+ (`alert.freq_*`, `order.ascending` and `descending`, `session.regular` and
413
+ `extended`, and the `currency.*` and `format.*` members, which publish their
414
+ own names) keeps its exact default and choices. A default or option with no
415
+ faithful string marks the input `"supported": false` in the settings
416
+ receipt, with `"options": []` and, when the default is such a constant,
417
+ `"default": ""`, where 1.2.0 published the input as supported;
418
+ `strategy_set_input_checked` refuses it with `PF_SETTINGS_UNSUPPORTED`. The
419
+ legacy `strategy_set_input`, the input getters and the strategy's execution
420
+ are unchanged.
421
+
422
+ ### Hardening
423
+
424
+ - String values derived from a script are validated and escaped wherever
425
+ they are written into generated C++. The generated C++ of the 602 sources
426
+ measured under "Compatibility and migration" does not change.
427
+
428
+ ### License
429
+
430
+ From [#177](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/177):
431
+
432
+ - 1.3.0 is the first release under the PineForge Source License 1.2.
433
+ Compared with 1.1 it changes two places and nothing else. In the Personal
434
+ Trading section, an account that a proprietary-trading firm or a
435
+ funded-trader program provides or allocates to the person to trade,
436
+ including a challenge, evaluation or simulated account, whether the capital
437
+ in it is real or simulated, is not the person's own account and is not
438
+ funded by the person's own capital. In the Commercial Use section, the
439
+ capital in such an account is investment capital whether it is real or
440
+ simulated, so trading it, or researching, developing or backtesting
441
+ strategies for it, is Investment Management, which `LICENSE` makes
442
+ Commercial Use for every individual and every organization unless it is
443
+ Personal Trading. 1.2.0 shipped under the PineForge Source License 1.1, and
444
+ releases up to and including 1.1.0 under "PineForge Codegen — License", the
445
+ PolyForm Noncommercial License 1.0.0 with PineForge's supplemental sections;
446
+ copies of those releases keep the license they shipped with. `LICENSE` is the
447
+ controlling text; `LEGAL.md` summarizes it and is not legal advice.
448
+ - Packaging: the PyPI classifier and `@pineforge/codegen-pyodide`'s
449
+ `package.json` license field are 1.2.0's; the `LICENSE` both packages carry
450
+ is version 1.2.
451
+
452
+ ### Documentation
453
+
454
+ - The README's scoreboard of `main` renders from the facts tokens of
455
+ `pineforge-release` at 3e39d64
456
+ ([#174](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/174)):
457
+ baseline `pineforge-parity-baseline-20261005-input-reanchor-781b8f00`
458
+ (engine 3c414528, this repository at 39545379), 7,975 excellent and 14
459
+ strong of 7,989 graded probes, none below strong.
460
+ Release 1.3.0 is graded on registry baseline <!-- pf:releases[1.3.0].scoreboard.id|code -->`pineforge-parity-baseline-20261006-engine-7a1f01c0`<!-- /pf -->,
461
+ which holds <!-- pf:releases[1.3.0].scoreboard.excellent|int -->7,982<!-- /pf --> excellent and <!-- pf:releases[1.3.0].scoreboard.strong|int -->7<!-- /pf --> strong of <!-- pf:releases[1.3.0].scoreboard.graded|int -->7,989<!-- /pf --> graded probes,
462
+ and <!-- pf:releases[1.3.0].scoreboard.belowStrong|int -->0<!-- /pf --> below strong. It measured engine <!-- pf:releases[1.3.0].scoreboard.engineCommit|short -->7a1f01c0<!-- /pf -->
463
+ ([pineforge-engine#347](https://github.com/pineforge-4pass/pineforge-engine/pull/347)'s
464
+ merge), which v1.3.0 equals in behaviour, and this repository at <!-- pf:releases[1.3.0].scoreboard.codegenCommit|short -->3e50082f<!-- /pf -->
465
+ ([#177](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/177)'s
466
+ merge). The pr-gates of the later code changes, #178's receipts and the
467
+ hardening of emitted string values, changed no graded probe, and the
468
+ release's other changes are documentation.
469
+ - `docs/PUBLIC_CONTRACT.md` describes the confirmed-bar and order-shapes
470
+ receipts ([#173](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/173),
471
+ [#178](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/178)),
472
+ and the README's License section, `LEGAL.md` and the npm README name the
473
+ PineForge Source License 1.2
474
+ ([#177](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/177)).
475
+
23
476
  ## 1.2.0 — 2026-10-05
24
477
 
25
478
  A minor release: generated strategy libraries gain the compiled execution
@@ -47,12 +47,13 @@ before treating a run as complete.
47
47
 
48
48
  ## Engine pairing
49
49
 
50
- Codegen `main` is developed and tested against engine `main`. Codegen 1.2.0
51
- pairs with engine `v1.2.0`, the pair the
50
+ Codegen `main` is developed and tested against engine `main`. Codegen 1.3.0
51
+ pairs with engine `v1.3.0`, the pair the
52
52
  [`pineforge-release`](https://github.com/pineforge-4pass/pineforge-release)
53
- image `1.2.0` ships, codegen 1.1.0 with engine `v1.1.0`, the pair of the image
54
- `1.1.0`, codegen 1.0.1 with engine `v1.0.1`, the pair of the image `1.0.1`,
55
- and codegen 1.0.0 with engine `v1.0.0`, the pair of the image `1.0.0`. On the
53
+ image `1.3.0` ships, codegen 1.2.0 with engine `v1.2.0`, the pair of the image
54
+ `1.2.0`, codegen 1.1.0 with engine `v1.1.0`, the pair of the image `1.1.0`,
55
+ codegen 1.0.1 with engine `v1.0.1`, the pair of the image `1.0.1`, and codegen
56
+ 1.0.0 with engine `v1.0.0`, the pair of the image `1.0.0`. On the
56
57
  0.x line the two version lineages are independent:
57
58
  the last 0.x release, codegen 0.10.4, pairs with engine `v0.13.1`, the pair
58
59
  the `pineforge-release` image `0.1.25` ships.
@@ -117,6 +118,11 @@ publishing is a separate release operation.
117
118
  engine.
118
119
  - Keep [CHANGELOG.md](CHANGELOG.md) current for user-visible changes. Its
119
120
  release-note policy applies to both stable and prerelease tags.
121
+ - CI clears a pull request from a fork into `main` only when it changes
122
+ documentation or legal text alone (Markdown, `docs/`, `LICENSE`, `NOTICE`).
123
+ A fork's code change does not run in CI here: its `gate` check fails until a
124
+ maintainer pushes the branch to this repository and opens a pull request
125
+ from it, which runs the full gate.
120
126
  - The README describes the latest release and becomes the PyPI page of the
121
127
  next release: when a version is tagged, update its "Releases and this
122
128
  README" section, its engine-pairing table and its release markers.
@@ -4,18 +4,18 @@ Summary of licensing, third-party components, and trademarks for `pineforge-code
4
4
 
5
5
  ## License
6
6
 
7
- `pineforge-codegen` is **source-available**, **not** OSI "open source." It is distributed under the **PineForge Source License 1.1** — see [LICENSE](LICENSE), which is the controlling text.
7
+ `pineforge-codegen` is **source-available**, **not** OSI "open source." It is distributed under the **PineForge Source License 1.2** — see [LICENSE](LICENSE), which is the controlling text.
8
8
 
9
9
  - **Noncommercial use** — any noncommercial purpose, and use by a charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution for its teaching, research and other operations, is free.
10
- - **Personal Trading** — free for a natural person to research, develop or backtest strategies and trade their **own** account with their **own** capital. Household, joint and retirement accounts and ordinary margin count as their own; a company's or fund's account does not, even a company they wholly own.
11
- - **Investment management** — managing, advising on or trading investment capital, or researching strategies for it (a friend's, clients' or investors' capital, an endowment, a pension fund, a public fund, a foundation's treasury), is **Commercial Use for every individual and every organization**, noncommercial organizations included, except Personal Trading.
10
+ - **Personal Trading** — free for a natural person to research, develop or backtest strategies and trade their **own** account with their **own** capital. Household, joint and retirement accounts and ordinary margin count as their own; a company's or fund's account does not, even a company they wholly own. An account that a proprietary-trading firm or funded-trader program provides or allocates to them, including a challenge, evaluation or simulated account, does not count as their own either.
11
+ - **Investment management** — managing, advising on or trading investment capital, or researching strategies for it (a friend's, clients' or investors' capital, an endowment, a pension fund, a public fund, a foundation's treasury, or an account a proprietary-trading firm or funded-trader program provides or allocates, including challenge, evaluation and simulated accounts), is **Commercial Use for every individual and every organization**, noncommercial organizations included, except Personal Trading.
12
12
  - **Commercial Use** — investment management and any other use that is not free, such as use by or for a company or fund, embedding the software or its output in a product or service for others, or operating a hosted/public-facing service with it, requires a **commercial license** (email **enterprise@pineforge.dev**; the commercial-license store is coming soon).
13
13
 
14
14
  Describe this project as **"source-available"** rather than "open source." The runtime it targets, [`pineforge-engine`](https://github.com/pineforge-4pass/pineforge-engine), is separate and **Apache-2.0**.
15
15
 
16
- Releases up to and including 1.1.0 were published under the license text that came with them (the PolyForm Noncommercial License 1.0.0 with a PineForge supplement); copies of those releases keep that license. The PineForge Source License 1.0 is a separate license and is not a PolyForm license.
16
+ Releases up to and including 1.1.0 were published under the license text that came with them (the PolyForm Noncommercial License 1.0.0 with a PineForge supplement); copies of those releases keep that license. The PineForge Source License is a separate license and is not a PolyForm license.
17
17
 
18
- The PineForge Source License 1.1 replaces 1.0 for the code on `main` and in future releases; it clarifies one point, that distributing the software or its output, changed or not, embedded in or bundled with a product or service made available to others is Commercial Use, not free distribution, unless it is for a permitted purpose.
18
+ The PineForge Source License 1.1 replaced 1.0, and 1.2 replaces 1.1, for the code on `main` and in releases from 1.3.0 on. Version 1.1 clarified one point, that distributing the software or its output, changed or not, embedded in or bundled with a product or service made available to others is Commercial Use, not free distribution, unless it is for a permitted purpose. Version 1.2 makes two points explicit: an account a proprietary-trading firm or funded-trader program provides or allocates, including a challenge, evaluation or simulated account, is not a person's own account or capital, so trading it is not Personal Trading; and the capital in such an account, real or simulated, is investment capital, so trading it is investment management, which is Commercial Use. It changes nothing else. Release 1.2.0 was published under 1.1 and keeps that text; 1.3.0 is the first release published under 1.2.
19
19
 
20
20
  ## Copyright and licensor
21
21
 
@@ -1,6 +1,14 @@
1
- PineForge Source License 1.1
1
+ PineForge Source License 1.2
2
2
  ============================
3
3
 
4
+ Version 1.2, 2026-10-05. Compared with 1.1, two places change. In the
5
+ Personal Trading section, the last bullet now says that an account a
6
+ proprietary-trading firm or funded-trader program provides or allocates,
7
+ including a challenge, evaluation or simulated account, is not the
8
+ person's own account or capital. In the Commercial Use section, the
9
+ definition of investment capital now covers the capital in such an
10
+ account, real or simulated.
11
+
4
12
  Copyright 2025-2026 pineforge, LLC
5
13
 
6
14
  Required Notice: Copyright 2025-2026 pineforge, LLC (https://github.com/pineforge-4pass/pineforge-codegen-oss)
@@ -134,7 +142,12 @@ For Personal Trading:
134
142
  program or anyone else outside the person's household provides or
135
143
  allocates to the person to trade, and that the provider still owns or
136
144
  whose losses the provider bears, is not the person's own capital, even
137
- if the person shares in the profits.
145
+ if the person shares in the profits. An account that a
146
+ proprietary-trading firm or a funded-trader program provides or
147
+ allocates to the person to trade, including a challenge, evaluation or
148
+ simulated account, whether the capital in it is real or simulated, is
149
+ likewise not the person's own account and is not funded by the
150
+ person's own capital.
138
151
 
139
152
 
140
153
  ## Commercial Use
@@ -149,7 +162,10 @@ in each case whoever the capital belongs to and whether or not for a fee.
149
162
  trading, including capital belonging to any other person or entity, such as a
150
163
  friend or relative, clients or investors, an endowment, a pension or
151
164
  retirement fund, a sovereign or other public fund, or the treasury or reserves
152
- of a foundation or other organization.
165
+ of a foundation or other organization. The capital in an account that a
166
+ proprietary-trading firm or a funded-trader program provides or allocates
167
+ to a person or entity to trade, including a challenge, evaluation or
168
+ simulated account, is investment capital whether it is real or simulated.
153
169
 
154
170
  **Commercial Use** means any use of the software that is not a permitted
155
171
  purpose, other than distributing copies under the Distribution License