Skip to content

Commit cecedc0

Browse files
luisleo526claude
andcommitted
Merge main into the bounded drawing arena change
Main now holds the cohort admission change, the run option series_origin_ms and the other changes since the last merge. The four conflicts are mechanical: CHANGELOG.md keeps both new entries; the unreviewed ceiling of the allocation-bound manifest becomes 1404 (main's 1406 less the two groups this change removes) and the gate test's pin becomes 1356 + 48 + 184; the five line citations of the private fixture evidence row move down by the one line this change adds to tests/CMakeLists.txt, each checked against main's line by hash. The site inventory merged without a conflict and is checked by the gate itself. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2 parents 83c5019 + c6a61ef commit cecedc0

61 files changed

Lines changed: 3854 additions & 420 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actionlint.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# The unchanged release workflow retains its protected runner labels.
1+
# Release keeps one protected runner label, on its x86_64 prebuilt cell.
22
self-hosted-runner:
33
labels:
4-
- gkp-od-4cpu-8gb-amd64
54
- gkp-od-16cpu-32gb-amd64-128gb

‎.github/workflows/ci-post.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,10 @@ jobs:
746746
TMPDIR: /mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/tmp
747747
run: python3 scripts/ci_verify.py sanitizers --build-dir build-asan --jobs "$(getconf _NPROCESSORS_ONLN)" --ccache --ctest-shard ${{ matrix.shard }}/8
748748

749+
- name: Measure sanitizer disk space after verification
750+
if: ${{ always() && needs.authz.result == 'success' }}
751+
run: df -h / /mnt
752+
749753
- name: Stage and summarize diagnostics
750754
if: ${{ always() && needs.authz.result == 'success' }}
751755
run: python3 scripts/collect_ci_diagnostics.py --build-dir build-asan --profile sanitizers

‎.github/workflows/native-live.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ jobs:
292292
TMPDIR: /mnt/pineforge-native-sanitizers/${{ github.run_id }}-${{ matrix.profile }}/tmp
293293
run: python3 scripts/ci_verify.py ${{ matrix.profile }} --build-dir ${{ matrix.build_dir }} --jobs "$(getconf _NPROCESSORS_ONLN)" --generator Ninja --curl-dir "${{ steps.curl-deps.outputs.curl-dir }}" --ccache
294294

295+
- name: Measure sanitizer disk space after verification
296+
if: ${{ always() && needs.authz.result == 'success' }}
297+
run: df -h / /mnt
298+
295299
- name: Stage and summarize diagnostics
296300
if: always()
297301
env:

‎.github/workflows/release.yml‎

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ env:
7777

7878
jobs:
7979
release:
80-
runs-on: gkp-od-4cpu-8gb-amd64
80+
runs-on: ubuntu-24.04
8181
environment: release
8282

8383
outputs:
@@ -485,7 +485,32 @@ jobs:
485485
python3 scripts/release_version.py check-install \
486486
--prefix "${STAGE_DIR}" --expect "${NEXT}"
487487
488-
# Both dry-run and publication inspect every installed .a/.so/.so.*.
488+
# The glibc comparison baseline is this triple's archive from the v1.10.0
489+
# release: the real released bytes, pinned by sha256 and unpacked here.
490+
# The checker below only reads the unpacked libraries.
491+
- name: Fetch the v1.10.0 baseline archive for the glibc comparison
492+
env:
493+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
494+
TRIPLE: ${{ matrix.triple }}
495+
run: |
496+
set -euo pipefail
497+
case "${TRIPLE}" in
498+
linux-x86_64) digest=cb412fbae9e8ba515de41dc31026c77d6c5e309693247bee26bb93c67d3c3543 ;;
499+
linux-aarch64) digest=982b16da2d5f5ee7c274615895484fce36bd740052a14d59b66576dca496d7bb ;;
500+
*) echo "::error::no v1.10.0 baseline archive for ${TRIPLE}" >&2; exit 1 ;;
501+
esac
502+
archive="pineforge-v1.10.0-${TRIPLE}.tar.gz"
503+
root="${RUNNER_TEMP}/glibc-baseline-${TRIPLE}"
504+
mkdir "${root}" "${root}/download" "${root}/tree"
505+
gh release download v1.10.0 --repo "${GITHUB_REPOSITORY}" \
506+
--pattern "${archive}" --dir "${root}/download"
507+
echo "${digest} ${root}/download/${archive}" | sha256sum -c -
508+
tar -xzf "${root}/download/${archive}" -C "${root}/tree" \
509+
--no-same-owner --no-same-permissions
510+
echo "BASELINE_DIR=${root}/tree" >> "${GITHUB_ENV}"
511+
512+
# Both dry-run and publication inspect every installed .a/.so/.so.* and
513+
# compare their highest glibc tag with the baseline fetched above.
489514
# Keep raw checker output and its actual exit status, including setup errors.
490515
- name: Check every staged library's glibc floor
491516
env:
@@ -494,7 +519,7 @@ jobs:
494519
set -euo pipefail
495520
log="${RUNNER_TEMP}/prebuilt-glibc-${TRIPLE}"
496521
mkdir -p "${log}"
497-
if python3 scripts/check_prebuilt_glibc.py "${STAGE_DIR}" > "${log}/stdout.jsonl" 2> "${log}/stderr.txt"; then
522+
if python3 scripts/check_prebuilt_glibc.py "${STAGE_DIR}" --baseline-root "${BASELINE_DIR}" > "${log}/stdout.jsonl" 2> "${log}/stderr.txt"; then
498523
checker_rc=0
499524
else checker_rc=$?; fi
500525
printf '%s\n' "${checker_rc}" > "${log}/exitcode.txt"
@@ -565,7 +590,7 @@ jobs:
565590
notify-hub:
566591
needs: [release, prebuilt]
567592
if: ${{ !inputs.dry_run }}
568-
runs-on: gkp-od-4cpu-8gb-amd64
593+
runs-on: ubuntu-24.04
569594
environment: release
570595
steps:
571596
- name: Mint org App token (hub dispatch)

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ version number follows semantic versioning over the surfaces the
77

88
## Unreleased
99

10+
- `ta.percentile_nearest_rank` now accepts a series length at runtime. Each
11+
call site retains its own appended source history and computes the
12+
nearest-rank percentile over the requested recent values, within the
13+
documented historical limit.
14+
- An exit given in ticks and without `from_entry` that follows a market entry in
15+
the same execution now takes effect when that entry fills, as a named exit does.
1016
- **Strategy modules built against 1.10.x must be rebuilt.** The C++ script
1117
ABI epoch moves from `engine_script_run_v19` to `engine_script_run_v20`
1218
(and `PINEFORGE_HAS_NATIVE_STRATEGY_HOST_V19` to `..._V20`) because
@@ -156,6 +162,18 @@ version number follows semantic versioning over the surfaces the
156162
Ratio scheduling is a separate later change; whole-curve passes remain.
157163
Plain/full and v1 delta bytes are preserved. Ledger tables and checkpoint
158164
layout are unchanged.
165+
- New run option `series_origin_ms`: the open time, in epoch milliseconds, of
166+
the first bar of the series the reference ran on. The source host takes it
167+
as a metadata key (a value that is not finite or not positive changes
168+
nothing) and the `--syminfo` document of `docker/run_json.py` as a positive
169+
JSON integer (`0`, a negative number, a float, a string, a boolean, `NaN` or
170+
`Infinity` fails with `syminfo_unreadable`; absent or `null` applies nothing).
171+
Declaring it makes `ta.ema`, and the EMAs inside `ta.macd`, `ta.kc` and
172+
`ta.tsi`, answer `na` for the first `length - 1` inputs and then start from an
173+
SMA seed, as TradingView does at the start of its series, and starts
174+
`request.security` at the first whole bucket opening at or after the origin.
175+
A run that does not declare it is unchanged. The option has no defined
176+
meaning in a live run. See `docker/README.md`.
159177
- A bounded drawing arena (the line, box and label arenas the generated code
160178
builds from a script's declared `max_*_count`) now writes in place and keeps
161179
its slots in blocks of 32 that a checkpoint of the arena shares, like an

‎ci/cr150-source-bounds.yaml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ codegen:
5555
tree: absent
5656
# The codegen checkout is not in this tree, so its emitter source is NOT
5757
# scanned. These are the container shapes the pinned emitter is documented
58-
# (docs/coverage.md:58, :895-896) and observed (tutorial/**/generated*.cpp) to
58+
# (docs/coverage.md:58, :900-901) and observed (tutorial/**/generated*.cpp) to
5959
# emit. All OPEN: a bound for generated user state needs a codegen-side proof.
6060
emitter_templates:
6161
- {id: "T01", emits: "Pine array<T> as std::vector<T>", owner: "generated-cpp", phase: "bar", state: "pending-flat-memory", grows_with: ["bars", "events"], inventory: "U01"}
@@ -83,14 +83,16 @@ ceilings:
8383
# CR-559: one map Store resize group and one group of three error-string temporaries.
8484
# Both stay OPEN; an optional pair limit with default zero establishes no fixed bound.
8585
# Ten time-format string groups use per-call pattern and written-width storage.
86-
# Forty-seven more unreviewed groups on the integrated tree (51 emitted by
86+
# Forty-six more unreviewed groups on the integrated tree (50 emitted by
8787
# --emit-seed, 4 stale entries removed): the bounded drawings, the owned
8888
# storage and runtime context service, the ledger cache
8989
# and the selected-capacity driver, reader and core. None is bounded.
9090
# Two of those groups are gone (U1666 and U1668, the whole-state copies a bounded
9191
# drawing arena made on every create, delete and edit): its slots are now shared
9292
# blocks written in place, so the ceiling drops by two.
93-
unreviewed: 1401
93+
# One materialize_relative_exits local-list group and three
94+
# SeriesPercentileNearestRank groups remain OPEN as well.
95+
unreviewed: 1404
9496
pending-flat-memory: 184
9597
owners:
9698
- {name: "generated-cpp", globs: ["tutorial/**"]}
@@ -926,7 +928,6 @@ entries:
926928
- {id: "U0828", file: "src/source/pine_adapter.cpp", symbol: "close_logical_units_", ops: ["subscript"], container: "unresolved by the index: close_logical_units_[...]", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 9488}
927929
- {id: "U0830", file: "src/source/pine_adapter.cpp", symbol: "closes", ops: ["assign", "decl", "grow"], container: "std::vector<std::pair<native_order::RequestHandle, PlacementSnapshot>>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 1885}
928930
- {id: "U0833", file: "src/source/pine_adapter.cpp", symbol: "cohort_sides", ops: ["decl", "subscript"], container: "std::unordered_map<const void*, CohortSides>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 1551}
929-
- {id: "U0834", file: "src/source/pine_adapter.cpp", symbol: "cohorts_by_id_", ops: ["grow", "subscript"], container: "unresolved by the index: cohorts_by_id_.emplace(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 3020}
930931
- {id: "U0835", file: "src/source/pine_adapter.cpp", symbol: "consumed_partial_exit_cycles_", ops: ["grow", "subscript"], container: "unresolved by the index: consumed_partial_exit_cycles_[...]", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 24790}
931932
- {id: "U0836", file: "src/source/pine_adapter.cpp", symbol: "cross_side_by_entry", ops: ["decl", "grow"], container: "std::unordered_map<SourceId, bool>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 1974}
932933
- {id: "U0837", file: "src/source/pine_adapter.cpp", symbol: "current_debited_applied_ordinals_", ops: ["grow"], container: "unresolved by the index: current_debited_applied_ordinals_.insert(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 10535}
@@ -1179,7 +1180,7 @@ entries:
11791180
- {id: "U1104", file: "src/source/pine_ta_length.cpp", symbol: "atr_", ops: ["grow"], container: "unresolved by the index: atr_.emplace(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 354}
11801181
- {id: "U1105", file: "src/source/pine_ta_length.cpp", symbol: "bar_prefix", ops: ["decl"], container: "std::string", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 26}
11811182
- {id: "U1108", file: "src/source/pine_ta_length.cpp", symbol: "state_", ops: ["assign"], container: "unresolved by the index: state_ = ...", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 195}
1182-
- {id: "U1109", file: "src/source/pine_ta_length.cpp", symbol: "std::to_string", ops: ["temp"], container: "unresolved by the index: std::to_string(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 29}
1183+
- {id: "U1109", file: "src/source/pine_ta_length.cpp", symbol: "std::to_string", ops: ["temp"], container: "unresolved by the index: std::to_string(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 30}
11831184
- {id: "U1508", file: "src/source/pine_value_admission.cpp", symbol: "<temp:RunFailureArgs>", ops: ["temp"], container: "unresolved by the index: RunFailureArgs", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (c171b), class: error-path temporary. One RunFailureArgs list built once in admit_text, only when a strategy identifier containing NUL or the unit separator is refused; the run then fails on the throw. Three short fields; nothing is retained, nothing grows with bars, never on a per-bar path. Bound not argued, so OPEN.", line: 54}
11841185
- {id: "U1509", file: "src/source/pine_value_admission.cpp", symbol: "<temp:string>", ops: ["temp"], container: "unresolved by the index: std::string", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (c171b), class: error-path temporaries. Three std::string temporaries in the same throw (line 54: the 'strategy.' prefix and the part of the field name before the dot; line 55: the part after the dot), sized by the length of the field name (a literal chosen by the caller), built only when an identifier with NUL or the unit separator is refused, freed on the throw; nothing retained, not per-bar. Bound not argued, so OPEN.", line: 54}
11851186
- {id: "U1111", file: "src/source/pine_value_admission.hpp", symbol: "<temp:RunFailureArgs>", ops: ["temp"], container: "unresolved by the index: RunFailureArgs", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 33}
@@ -1731,3 +1732,7 @@ entries:
17311732
- {id: "U1720", file: "src/selected_capacity_driver.hpp", symbol: "option", ops: ["decl"], container: "std::string", owner: "selected-capacity", phase: "unclassified", state: "unreviewed", line: 126}
17321733
- {id: "U1721", file: "src/source/multi_day_periods.hpp", symbol: "allocate_shared", ops: ["alloc"], container: "unresolved by the index: allocate_shared", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 103}
17331734
- {id: "U1722", file: "src/source/pine_strategy_host.cpp", symbol: "timeframe", ops: ["assign", "decl"], container: "std::string", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 1885}
1735+
- {id: "U1726", file: "src/source/pine_adapter.cpp", symbol: "global_pending", ops: ["decl", "grow"], container: "std::vector<PendingRelativeExit>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "A local list of materialize_relative_exits: the unnamed relative exit definitions taken from pending_relative_exits_ (one definition per exit id and from_entry pair) when a market entry fills, one push_back each in the loop over pending_relative_exits_, then moved into the local pending list of the same call; it lives for one call. OPEN.", line: 14587}
1736+
- {id: "U1724", file: "include/pineforge/source/pine_ta_length.hpp", symbol: "history_", ops: ["decl"], container: "std::vector<double>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "SeriesPercentileNearestRank's append ring retains kMaxBarsBack + 1 doubles. Its optional ta::PercentileWindow retains the requested length, at most kMaxBarsBack + 1 values, and is rebuilt on a length change. OPEN.", line: 289}
1737+
- {id: "U1725", file: "src/source/pine_ta_length.cpp", symbol: "history_", ops: ["grow"], container: "unresolved by the index: history_.assign(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "SeriesPercentileNearestRank's append ring is assigned once at kMaxBarsBack + 1 doubles and then overwrites slots. The optional ta::PercentileWindow retains the requested length, at most kMaxBarsBack + 1 values, and is rebuilt on a length change. OPEN.", line: 342}
1738+
- {id: "U1728", file: "src/source/pine_ta_length.cpp", symbol: "window_", ops: ["grow"], container: "unresolved by the index: window_.emplace(...)", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "SeriesPercentileNearestRank builds its ta::PercentileWindow for the requested length and builds it again when the requested length changes; the window retains that length, at most kMaxBarsBack + 1 values. OPEN.", line: 366}

‎ci/cr150-source-reading.tsv‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ U0829 src/source/pine_adapter.cpp closed_cohorts std::vector<SourceId> grow=1 lo
429429
U0830 src/source/pine_adapter.cpp closes std::vector<std::pair<native_order::RequestHandle, PlacementSnapshot>> assign=6,decl=1,grow=1 mixed:file+local NativeExecutionConsumer* native = nullptr; adapter state source-layer stale 8 / new 8 SITES READ:growth-op+assign-count/source
430430
U0831 src/source/pine_adapter.cpp cohort_ids std::vector<SourceId> decl=2,grow=4 local } adapter state source-layer stale 6 / new 6 SITES READ:growth-op DEFECT:G2 reader (second pass); first pass DEFECT; evidence pine_adapter.cpp:7511-7513,8719-8721; Per-call copies of every resident cohort id (two sites). Resident rows are ids with exposure or a pinned roster window (U1225); reserve() is no cap.
431431
U0833 src/source/pine_adapter.cpp cohort_sides std::unordered_map<const void*, CohortSides> decl=1,subscript=1 mixed:file+member || snapshot.family == PineOrderFamily::ExitTrail) adapter state source-layer stale 2 / new 2 SITES READ:growth-op+decl-member/ns/file DEFECT:G2 reader (second pass); first pass DEFECT; evidence pine_adapter.cpp:1705,1939-1952,28778-28780; One entry per resident cohort with >16 lifetime origins and a non-empty window, erased only when that window empties (28778-28780). Follows the resident rows.
432-
U0834 src/source/pine_adapter.cpp cohorts_by_id_ unresolved by the index: cohorts_by_id_.emplace(...) grow=1 local // is a named divergence in docs/design/native-feature-parity.md §3.7: adapter state source-layer stale 2 / new 1 SITES READ:growth-op REJECT:scratch index Second pass; first pass DEFECT; evidence pine_adapter.cpp:3196-3209; disk_id_table.hpp:18-23,340-343; disk_resident_id_table.hpp:454-466; The per-id index node lives in scratch (DiskIdTable RAM = 5 scalars + a ScratchFile), and a fresh row is spillable at the next spill. Resident growth is U1225's.
433432
U0835 src/source/pine_adapter.cpp consumed_partial_exit_cycles_ unresolved by the index: consumed_partial_exit_cycles_[...] grow=1 local // `id`) released onto its new book: bound to that request, bound to the id adapter state source-layer stale 1 / new 1 SITES READ:growth-op REJECT:scratch RAM fixed reader, re-read at source by reviewer (second pass); first pass DEFECT; evidence pine_adapter.cpp:25396-25400; id_pair_store.hpp:3,34-36,811-830; IdPairStore keeps no per-key RAM directory: records and index are scratch files, with RAM static_assert <= 32 KiB (:830). Disk grows with distinct keys; RAM does not.
434433
U0836 src/source/pine_adapter.cpp cross_side_by_entry std::unordered_map<SourceId, bool> decl=1,grow=1 local // A leg whose row was erased answers through its fact (`erased`). adapter state source-layer stale 2 / new 2 SITES READ:growth-op
435434
U0837 src/source/pine_adapter.cpp current_debited_applied_ordinals_ unresolved by the index: current_debited_applied_ordinals_.insert(...) grow=1 local // A partial source close breaks the exact ShortSeed transaction book. adapter state source-layer stale 1 / new 1 SITES READ:growth-op

0 commit comments

Comments
 (0)