Skip to content

Commit 655c97e

Browse files
luisleo526claude
andcommitted
Re-anchor the line citations of the published pages (digits only)
The N-day chart commit moved code in src/native_execution_consumer.cpp, src/native_execution_consumer.hpp, src/source/pine_strategy_host.cpp, src/source/pine_scheduler_native.cpp and src/timeframe.cpp, so the file:line citations of the published pages that point into them went stale, and scripts/check_doc_anchors.py reported 212 bad anchors. This commit changes digits only: the line numbers inside file:line citations of nine pages (145 changed lines, 233 changed numbers) and nothing else. No sentence, word, content pin or table is edited. The numbers were moved with the repository's own tools: scripts/check_doc_anchors.py --fix (the cited symbol sits on exactly one line) and scripts/reanchor_doc_citations.py --ref 360c4ab (a line map from the commit before the N-day chart change, where the pages were correct). The last six citations, which claim no symbol, were carried across the same line map by hand: the cited code line is the same text at its new number. scripts/check_doc_anchors.py reports no bad anchor on the result, and scripts/check_doc_reverts.py reports nothing, since a re-anchor is not an edit. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 6c9e778 commit 655c97e

9 files changed

Lines changed: 145 additions & 145 deletions

‎docs/adr/0001-kernel-adapter-boundary.md‎

Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.

‎docs/design/arena-bound.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ The carried declaration fields are visible in `PineStrategyConfig` at
162162
| pyramiding | Source entry admission policy, including pending/same-point rules. The optional generic cap is `max_open_lots` at `include/pineforge/native_run_spec.hpp:664`; the Pine projection deliberately leaves it unset (the `max_open_lots` setting spelling is at `src/source/pine_adapter.cpp:2836`). Do not assume this caps strategy.order or use it as an unconditional H. |
163163
| calc_on_order_fills | Extra source callbacks. The adapter passes its 1<<20 guard `kCoofLoopGuard` through the native cadence at `src/source/pine_adapter.cpp:3017`; the `kCoofLoopGuard` literal is declared at `include/pineforge/source/pine_adapter.hpp:77`. The native point budget is a callback bound, not a total fill bound. |
164164
| max_recalculations_per_point | Further executions still apply after callbacks stop; see the cadence comment and `max_recalculations_per_point` declaration at `include/pineforge/native_run_spec.hpp:686-695`. The actual counter check is `src/native_execution_consumer.cpp:8259`. |
165-
| first-open COOF chain | A second source-side guard exists at `src/source/pine_scheduler_native.cpp:888`. Count this source path; a native budget of 8 is not Pine's bound. |
165+
| first-open COOF chain | A second source-side guard exists at `src/source/pine_scheduler_native.cpp:945`. Count this source path; a native budget of 8 is not Pine's bound. |
166166
| process_orders_on_close | Adds a matching opportunity after calculation; projection at `src/source/pine_adapter.cpp:3006`. It does not impose an order/trade count. |
167167
| default_qty, margin, initial capital | Admission/sizing predicates can tighten a separately proved schedule. They provide no universal positive minimum close quantity or minimum loss, hence no universal T. Margin can create additional reductions. |
168168
| max_bars_back | Series-history setting, not a run/trade limit. The native mapping explicitly rules it out at `docs/pages/pine-to-native.md:142`. |
@@ -558,7 +558,7 @@ non-command certificates exactly.
558558
These formulas apply to the EngineRecorded streamed invocation. The
559559
selected recorder appends its anchor and selected observations in one
560560
writer (`equity_scratch` append at `src/engine_report.cpp:1563`), and capture transfers that writer as `metric_curve`
561-
instead of copying its prefix (`src/native_execution_consumer.cpp:13350`).
561+
instead of copying its prefix (`src/native_execution_consumer.cpp:13377`).
562562
HostRecorded array presentation and a second full curve are outside this
563563
profile. Adding another persistent scratch user requires another term and
564564
rounding region.

‎docs/design/consumed-partial-exit-fold.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ The slab uses design (b), maintained transforms. Deferring the sort until a
5656
hash request would put the work on the per-bar path. The scheduler calls
5757
`scheduler_record_broker_hash` once per terminal script dispatch, including
5858
its quiet carried-callback branch
59-
(`src/source/pine_scheduler_native.cpp:639`,
59+
(`src/source/pine_scheduler_native.cpp:696`,
6060
`src/source/pine_scheduler_native.cpp:725`). With recording enabled this
61-
calls `broker_state_hash` (`src/source/pine_strategy_host.cpp:3461`).
61+
calls `broker_state_hash` (`src/source/pine_strategy_host.cpp:3464`).
6262
`on_native_bar` then refreshes the recorded row after the adapter's close
63-
(`src/source/pine_strategy_host.cpp:939`); its `recording` guard
64-
(`src/source/pine_strategy_host.cpp:955`) enables
63+
(`src/source/pine_strategy_host.cpp:942`); its `recording` guard
64+
(`src/source/pine_strategy_host.cpp:958`) enables
6565
`capture_script_continuation_hash`
66-
(`src/source/pine_strategy_host.cpp:870`). Thus an ordinary recorded script
66+
(`src/source/pine_strategy_host.cpp:873`). Thus an ordinary recorded script
6767
bar folds the table twice. Recorded magnifier sub-bars can refresh it too.
6868
Terminal input updates also call `capture_script_continuation_hash`
69-
(`src/source/pine_strategy_host.cpp:895`). Without recording, that refresh
69+
(`src/source/pine_strategy_host.cpp:898`). Without recording, that refresh
7070
does not call the broker hash; explicit broker/stream hash queries still do.
7171
Each broker hash reaches `hash_host_extension`
7272
(`src/engine_state_hash.cpp:129`); the adapter's `hash_state`

‎docs/design/cr150-contracts.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,18 @@ references; L15a must maintain these anchors and mechanically pin every current
223223

224224
| Reader to route through the view/source | Source anchors in this tree | DESIGN lines |
225225
|---|---|---|
226-
| Kernel instrument-feed pump: current bar, close, next open, count | `NativeExecutionConsumer::pump_instrument_subscription` `src/native_execution_consumer.hpp:1279` | 357-358 |
226+
| Kernel instrument-feed pump: current bar, close, next open, count | `NativeExecutionConsumer::pump_instrument_subscription` `src/native_execution_consumer.hpp:1294` | 357-358 |
227227
| Host feed lookup/delivery and column reads | `installed_symbol_feed` `src/source/pine_security_eval.cpp:1081-1090`; `installed_symbol_feed` `src/source/pine_security_eval.cpp:1313-1323`; `installed_symbol_feed` `src/source/pine_security_eval.cpp:1342-1350` | 359-360 |
228-
| Feed validation: bar values/order, close length/bounds, column length; configure and consumer entry points | `feed.bars` `src/native_run_spec.cpp:259-290`; `instrument_feed_shapes` `src/native_run_spec.cpp:743`; `validate_native_instrument_feeds` `src/native_run_spec.cpp:1019-1022`; `validate_native_timeframe_subscriptions` `src/native_execution_consumer.cpp:10211`; `validate_native_timeframe_subscriptions` `src/native_execution_consumer.cpp:10211` | 361-363 |
228+
| Feed validation: bar values/order, close length/bounds, column length; configure and consumer entry points | `feed.bars` `src/native_run_spec.cpp:259-290`; `instrument_feed_shapes` `src/native_run_spec.cpp:743`; `validate_native_instrument_feeds` `src/native_run_spec.cpp:1019-1022`; `validate_native_timeframe_subscriptions` `src/native_execution_consumer.cpp:10238`; `validate_native_timeframe_subscriptions` `src/native_execution_consumer.cpp:10238` | 361-363 |
229229
| Adapter projection validation: use the context normalizer; host stages after lending and before projection, using a context built from its store | `normalize_projected_spec` `src/source/pine_adapter.cpp:3195` | 361-363; V1/V2 change 5 |
230-
| Instrument-feed digest and cached/uncached continuation folds | `digest_instrument_feed_views` `src/native_run_spec.cpp:1162-1205`; `native_instrument_feeds_digest` `src/native_execution_consumer.cpp:331`; `native_instrument_feeds_digest` `src/native_execution_consumer.cpp:2938`; `native_run_spec_digest` `src/native_execution_consumer.cpp:14506` | 364-365 |
230+
| Instrument-feed digest and cached/uncached continuation folds | `digest_instrument_feed_views` `src/native_run_spec.cpp:1162-1205`; `native_instrument_feeds_digest` `src/native_execution_consumer.cpp:331`; `native_instrument_feeds_digest` `src/native_execution_consumer.cpp:2954`; `native_run_spec_digest` `src/native_execution_consumer.cpp:14576` | 364-365 |
231231
| Staged feed counts in host state and its hash | `installed_symbol_feed` `src/source/pine_strategy_host.cpp:536-546`; `staged_.instrument_feeds` `src/source/pine_state_hash.cpp:339-346` | 366-367 |
232232
| Refresh of symbol-data digest and host hash fold | `refresh_symbol_data_digest` `src/source/pine_security_eval.cpp:1639-1652`; `symbol_data_digest_` `src/source/pine_state_hash.cpp:1240-1246` | 367-368 |
233233
| Restore/store upkeep and column-setter length check | `held.bars` `src/source/pine_security_eval.cpp:1113-1123`; `data.bars` `src/source/pine_security_eval.cpp:1455-1461` | 369-370 |
234-
| Lower-path preflight/validation | `NativeExecutionConsumer::preflight_intrabar_path` `src/native_execution_consumer.hpp:1238` | 371,1221-1222 |
234+
| Lower-path preflight/validation | `NativeExecutionConsumer::preflight_intrabar_path` `src/native_execution_consumer.hpp:1253` | 371,1221-1222 |
235235
| Lower-path digest (count first) and continuation hash | `native_intrabar_path_digest` `src/native_run_spec.cpp:891-919`; `native_intrabar_path_digest` `src/native_execution_consumer.cpp:296` | 371,1223-1224 |
236-
| Per-script-bar lower-path binary search/walk | `candidate` `src/native_execution_consumer.cpp:9273-9280` | 371,1225 |
237-
| Scheduler sub-bar lookup and one-bar look-ahead | `PineScheduler::lower_path_bar_at` `src/source/pine_scheduler_native.cpp:265-287`; `next_open` `src/source/pine_scheduler_native.cpp:328-329` | 371,1226-1227 |
236+
| Per-script-bar lower-path binary search/walk | `candidate` `src/native_execution_consumer.cpp:9289-9296` | 371,1225 |
237+
| Scheduler sub-bar lookup and one-bar look-ahead | `PineScheduler::lower_path_bar_at` `src/source/pine_scheduler_native.cpp:322-344`; `next_open` `src/source/pine_scheduler_native.cpp:385-386` | 371,1226-1227 |
238238
| Lower-path emptiness test | `inactive_sampler_path` `src/source/pine_adapter.cpp:3639` | 371,1228 |
239239

240240
Every count/digest must fold the same bytes/order for copied and borrowed
@@ -318,14 +318,14 @@ L17c/d and L8c use one report path. `fill_trades_section`
318318
open rows for a sink. `report_closed_net_profit`
319319
(`src/engine_report.cpp:537`) starts at `ClosedTradePrefix::pnl` and adds the
320320
resident suffix in order. `finish_streamed_trade_metrics`
321-
(`src/native_execution_consumer.cpp:14326`) finishes copies of the sealed
321+
(`src/native_execution_consumer.cpp:14353`) finishes copies of the sealed
322322
accumulators over resident closed rows, then the presented open rows. The
323323
source host's terminal-quote presentation continues that same closed-row PnL
324324
fold before adding its edited open rows (`net_profit`
325-
`src/source/pine_strategy_host.cpp:2402-2403`).
325+
`src/source/pine_strategy_host.cpp:2405-2406`).
326326

327327
Selected carry-in validation includes the minimum entry time folded at seal
328-
(`first_entry_time` `src/native_execution_consumer.cpp:13199`), so a
328+
(`first_entry_time` `src/native_execution_consumer.cpp:13226`), so a
329329
window starting after a sealed entry refuses with the existing typed
330330
`engine_invariant`. Validation never indexes a retired row. `write_report_sink_trades`
331331
(`src/engine_report.cpp:1700`) resumes at the global T cursor: sealed rows

0 commit comments

Comments
 (0)