Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 78 additions & 2 deletions .github/workflows/ci-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,78 @@ jobs:
path: build-ci-preflight/
if-no-files-found: warn

# Every CI round fits fifteen minutes of wall time. Each configuration builds
# Full lab Release configuration, split by generated target names. Each shard
# captures ctest -N and independent CMake/link inventories before and after a
# real build. build-tests-result requires their exact union; smoke stays below.
build-tests:
needs: [authz]
if: ${{ needs.authz.result == 'success' }}
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8]
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout the exact workflow head
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.12'
- name: Install dependencies
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache ninja-build
- name: Exercise the broken registered header control
if: ${{ matrix.shard == 1 }}
run: python3 scripts/test_ci_build_tests.py WorkflowControl
- name: Build every Release test target
run: |
python3 scripts/ci_build_tests.py build --source . --build-dir build-tests-${{ matrix.shard }} --artifact-dir ci-build-tests --shard ${{ matrix.shard }}/8 --jobs "$(getconf _NPROCESSORS_ONLN)"
- name: Retain Release target inventories and build logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ci-release-build-${{ matrix.shard }}
path: ci-build-tests/
if-no-files-found: error

build-tests-result:
needs: [authz, build-tests]
if: ${{ needs.authz.result == 'success' }}
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Require every Release build shard to succeed
env:
BUILD_TESTS_RESULT: ${{ needs.build-tests.result }}
run: test "$BUILD_TESTS_RESULT" = success
- name: Checkout the exact workflow head
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Collect every Release target inventory
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: ci-release-build-*
path: ci-build-tests/
merge-multiple: true
- name: Require the complete Release build
run: |
python3 scripts/ci_build_tests.py union --artifact-dir ci-build-tests --shards 8

# Every CI round fits fifteen minutes of wall time. Each smoke configuration builds
# the PR smoke target and runs the fast CTest label; the full profiles run in
# the lab's verify on the exact head tree before every merge (docs/ci.md,
# "Where the full suites run").
Expand Down Expand Up @@ -412,7 +483,7 @@ jobs:
# maintainers, rather than this build context.
build-gate:
name: build
needs: [authz, changes, preflight, build-x86-gcc133, smoke, smoke-arm, sanitizers, corpus-parity-subset]
needs: [authz, changes, preflight, build-x86-gcc133, build-tests, build-tests-result, smoke, smoke-arm, sanitizers, corpus-parity-subset]
if: always()
# The aggregate runs inline Python and shell on the light pool class.
runs-on: ubuntu-24.04
Expand All @@ -434,13 +505,16 @@ jobs:
DOCS_ONLY: ${{ needs.changes.outputs.docs_only }}
PREFLIGHT_RESULT: ${{ needs.preflight.result }}
X86_GCC133_RESULT: ${{ needs.build-x86-gcc133.result }}
BUILD_TESTS_RESULT: ${{ needs.build-tests.result }}
BUILD_TESTS_UNION_RESULT: ${{ needs.build-tests-result.result }}
SMOKE_RESULT: ${{ needs.smoke.result }}
ARM_SMOKE_RESULT: ${{ needs.smoke-arm.result }}
SANITIZER_RESULT: ${{ needs.sanitizers.result }}
PARITY_RESULT: ${{ needs.corpus-parity-subset.result }}
run: |
printf '%s\n' "authz: $AUTHZ_RESULT" "changes: $CHANGES_RESULT, docs only: ${DOCS_ONLY:-unanswered}" \
"preflight: $PREFLIGHT_RESULT" "native x86 GNU 13.3.0: $X86_GCC133_RESULT" \
"Release test build: $BUILD_TESTS_RESULT" "Release target union: $BUILD_TESTS_UNION_RESULT" \
"amd64 smoke: $SMOKE_RESULT" "arm64 smoke: $ARM_SMOKE_RESULT" \
"sanitizers: $SANITIZER_RESULT" "corpus parity (subset): $PARITY_RESULT"
# Every smoke leg and the subset parity must pass. Only a classified
Expand All @@ -451,5 +525,7 @@ jobs:
[[ "$AUTHZ_RESULT" == "success" && "$CHANGES_RESULT" == "success" ]] \
&& [[ "$PREFLIGHT_RESULT" == "success" ]] \
&& [[ "$X86_GCC133_RESULT" == "success" ]] \
&& [[ "$BUILD_TESTS_RESULT" == "success" ]] \
&& [[ "$BUILD_TESTS_UNION_RESULT" == "success" ]] \
&& passed "$SMOKE_RESULT" && passed "$ARM_SMOKE_RESULT" \
&& passed "$SANITIZER_RESULT" && passed "$PARITY_RESULT"
74 changes: 73 additions & 1 deletion .github/workflows/gke-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,74 @@ jobs:
path: ci-native-x86-gcc133/
if-no-files-found: warn

# Compile the full lab Release population in parallel, including on docs-only
# and .github-only PRs. CTest execution stays in the existing proof jobs.
build-tests:
needs: [admit]
if: ${{ needs.admit.outputs.allowed == 'true' }}
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8]
runs-on: ubuntu-24.04
permissions: {contents: read}
steps:
- name: Checkout the admitted head
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository }}
ref: ${{ needs.admit.outputs.head_sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.12'
- name: Install dependencies
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache ninja-build
- name: Exercise the broken registered header control
if: ${{ matrix.shard == 1 }}
run: python3 scripts/test_ci_build_tests.py WorkflowControl
- name: Build every Release test target
run: |
python3 scripts/ci_build_tests.py build --source . --build-dir build-tests-${{ matrix.shard }} --artifact-dir ci-build-tests --shard ${{ matrix.shard }}/8 --jobs "$(getconf _NPROCESSORS_ONLN)"
- name: Retain Release target inventories and build logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ci-release-build-${{ matrix.shard }}
path: ci-build-tests/
if-no-files-found: error

build-tests-result:
needs: [admit, build-tests]
if: ${{ needs.admit.outputs.allowed == 'true' }}
runs-on: ubuntu-24.04
permissions: {contents: read}
steps:
- name: Require every Release build shard to succeed
env:
BUILD_TESTS_RESULT: ${{ needs.build-tests.result }}
run: test "$BUILD_TESTS_RESULT" = success
- name: Checkout the admitted head
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository }}
ref: ${{ needs.admit.outputs.head_sha }}
fetch-depth: 0
persist-credentials: false
- name: Collect every Release target inventory
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: ci-release-build-*
path: ci-build-tests/
merge-multiple: true
- name: Require the complete Release build
run: |
python3 scripts/ci_build_tests.py union --artifact-dir ci-build-tests --shards 8

build:
needs: [admit]
if: ${{ needs.admit.outputs.allowed == 'true' && needs.admit.outputs.docs_only != 'true' && needs.admit.outputs.github_only != 'true' }}
Expand Down Expand Up @@ -505,7 +573,7 @@ jobs:
test "$PARITY_RESULT" = success

result:
needs: [admit, preflight, build-x86-gcc133, legs]
needs: [admit, preflight, build-x86-gcc133, build-tests, build-tests-result, legs]
if: always()
runs-on: ubuntu-24.04
permissions: {contents: read}
Expand Down Expand Up @@ -597,6 +665,8 @@ jobs:
ALLOWED: ${{ needs.admit.outputs.allowed }}
PREFLIGHT_RESULT: ${{ needs.preflight.result }}
X86_RESULT: ${{ needs.build-x86-gcc133.result }}
BUILD_TESTS_RESULT: ${{ needs.build-tests.result }}
BUILD_TESTS_UNION_RESULT: ${{ needs.build-tests-result.result }}
LEGS_RESULT: ${{ needs.legs.result }}
ADMIT_DOCS_ONLY: ${{ needs.admit.outputs.docs_only }}
ADMIT_GITHUB_ONLY: ${{ needs.admit.outputs.github_only }}
Expand All @@ -612,6 +682,8 @@ jobs:
test "$ALLOWED" = true || fail "admission did not allow the head"
test "$PREFLIGHT_RESULT" = success || fail "preflight did not pass"
test "$X86_RESULT" = success || fail "native x86 GNU 13.3.0 build did not pass"
test "$BUILD_TESTS_RESULT" = success || fail "Release test build did not pass"
test "$BUILD_TESTS_UNION_RESULT" = success || fail "Release target union did not pass"
test "$SECOND_DOCS_ONLY" = "$ADMIT_DOCS_ONLY" || fail "docs-only classification changed"
test "$SECOND_GITHUB_ONLY" = "$ADMIT_GITHUB_ONLY" || fail "github-only classification changed"
test "$SECOND_ARM_RELEVANT" = "$ADMIT_ARM_RELEVANT" || fail "arm relevance classification changed"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ version number follows semantic versioning over the surfaces the

- Checkpoints for `ta.sma`, biased `ta.stdev`, `ta.bb`, `math.sum` and `ta.change` now copy contiguous owning window buffers and reuse them on restore, preserving the arithmetic and rewind rules (#809).
- Explicit `strategy.order()` quantities now floor executable units at declared decimal quantity steps while preserving the source quantity; the boundary control is not measured against TradingView (#716 item 2).
- Corrected the parity grading for the historical population reported in [#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836) on 2026-11-11: counting unmatched trades net instead of gross overstated the excellent tier by 10 of 312 reference probes (311 instead of 301) and by 24 of 7,989 graded probes. The trade data is unchanged.
- The corpus grader counts every unmatched gated trade on either side as a gross mismatch. One engine-only trade and one TradingView-only trade count as two mismatches, so equal list sizes cannot satisfy the excellent count gate. The same gross count, divided by the larger gated trade count (zero for two empty pools), supplies the percentage for strong-tier grading and fragmented-FIFO eligibility; thresholds are unchanged (#836).
- The prebuilt Linux archives need glibc 2.35 or newer (for example Ubuntu 22.04 or Debian 12 and later), and the release check now refuses an archive that needs a newer glibc.
- Multi-day charts restart their trading-date grid each year; measured on 24x7 daily input for chart bars, last_bar_index, barstate.islast and the open-trade report row. Streams keep the previous chart path; selected windows on generated N-day chart partitions are refused. Time offsets, exchange calendars and intraday input are not measured against TradingView.
- `str.match` no longer reports "no match" after a memory failure; the failure now reaches `out_of_memory`.
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ the affected scripts and how to recognise it.

**Measured <!-- pf:scoreboard.date -->2026-11-12<!-- /pf -->** on engine <!-- pf:scoreboard.engineCommit|short-code -->`6e27d0f2`<!-- /pf --> with codegen-oss <!-- pf:scoreboard.codegenCommit|short-code -->`126e055f`<!-- /pf --> (baseline <!-- pf:scoreboard.id|code -->`pineforge-parity-baseline-20261112-release-tag-cd9c85a6`<!-- /pf -->, snapshot <!-- pf:scoreboard.snapshotSha256|short-code -->`cd9c85a6`<!-- /pf -->): **<!-- pf:scoreboard.graded|int -->7,989<!-- /pf --> graded probes, <!-- pf:scoreboard.excellent|int -->7,983<!-- /pf --> excellent + <!-- pf:scoreboard.strong|int -->6<!-- /pf --> strong**, <!-- pf:scoreboard.belowStrong|int -->0<!-- /pf --> below strong and <!-- pf:scoreboard.engineErrors|int -->0<!-- /pf --> engine errors across <!-- pf:scoreboard.lanes|int -->18<!-- /pf --> market/timeframe lanes. The historical release 1.0.1 inventory holds <!-- pf:inventory.tvTrades|int -->4,776,328<!-- /pf --> trades.

For the population reported in [#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836) on **2026-11-11**, the historical gross-count regrade measured **7,959 excellent / 30 strong**: 24 probes moved from excellent to strong and none lower. That regrade and the dated scoreboard above describe their recorded pair and population; they are not a fresh measurement of this revision. The grader uses gross counting. Recorded release results remain historical measurements.

Release **1.4.0 (2026-10-08)** maps to **<!-- pf:releases[1.4.0].scoreboard.excellent|int -->7,983<!-- /pf --> excellent / <!-- pf:releases[1.4.0].scoreboard.strong|int -->6<!-- /pf --> strong** on <!-- pf:releases[1.4.0].scoreboard.graded|int -->7,989<!-- /pf --> graded probes (baseline <!-- pf:releases[1.4.0].scoreboard.id|code -->`pineforge-parity-baseline-20261007-engine-b3192bfc`<!-- /pf -->, promoted <!-- pf:releases[1.4.0].scoreboard.date -->2026-10-07<!-- /pf --> UTC), with <!-- pf:releases[1.4.0].scoreboard.belowStrong|int -->0<!-- /pf --> below strong and <!-- pf:releases[1.4.0].scoreboard.engineErrors|int -->0<!-- /pf --> engine errors. These are recorded grading outcomes for that pair and population.

Release **1.3.0 grades <!-- pf:releases[1.3.0].scoreboard.excellent|int -->7,982<!-- /pf --> excellent / <!-- pf:releases[1.3.0].scoreboard.strong|int -->7<!-- /pf --> strong until the next release**, on <!-- pf:releases[1.3.0].scoreboard.graded|int -->7,989<!-- /pf --> probes (baseline <!-- pf:releases[1.3.0].scoreboard.id|code -->`pineforge-parity-baseline-20261006-engine-7a1f01c0`<!-- /pf -->, <!-- pf:releases[1.3.0].scoreboard.date -->2026-10-06<!-- /pf -->). A main scoreboard advance does not change release results.
Expand All @@ -312,9 +314,11 @@ The quantities above render from the public [facts tokens](https://github.com/pi

| Board | Test set | Result |
|---|---|---|
| **Public** — [open corpus](https://github.com/pineforge-4pass/pineforge-corpus) | 312 reference strategies on BINANCE:ETHUSDT.P 15m, Apache-2.0, reproducible by anyone | this repository's sweep of the v1.0.1 library: **311 excellent + 1 declared anomaly**; the <!-- pf:scoreboard.corpusProbes\|int -->309<!-- /pf --> of them in the measured population: **<!-- pf:scoreboard.scopes.corpus.excellent\|int -->309<!-- /pf --> excellent** |
| **Public** — [open corpus](https://github.com/pineforge-4pass/pineforge-corpus) | 312 reference strategies on BINANCE:ETHUSDT.P 15m, Apache-2.0, reproducible by anyone | reference sweep **2026-11-16** ([#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836), [#883](https://github.com/pineforge-4pass/pineforge-engine/issues/883)): **301 excellent + 9 strong + 1 moderate + 1 declared anomaly**; the <!-- pf:scoreboard.corpusProbes\|int -->309<!-- /pf --> of them in the dated scoreboard above: **<!-- pf:scoreboard.scopes.corpus.excellent\|int -->309<!-- /pf --> excellent** |
| **Closed test** | <!-- pf:inventory.closedProbes\|int -->7,680<!-- /pf --> probes of <!-- pf:inventory.closedScripts\|int -->741<!-- /pf --> TradingView scripts across the <!-- pf:scoreboard.lanes\|int -->18<!-- /pf --> lanes: <!-- pf:inventory.communityScripts\|int -->680<!-- /pf --> community-shared scripts (<!-- pf:inventory.communityProbes\|int -->7,179<!-- /pf --> probes), private under TradingView's Terms of Service, and <!-- pf:inventory.probeScripts\|int -->61<!-- /pf --> probe scripts the maintainers wrote (<!-- pf:inventory.probeScriptProbes\|int -->501<!-- /pf --> probes) | **<!-- pf:scoreboard.scopes.closed.excellent\|int -->7,674<!-- /pf --> excellent + <!-- pf:scoreboard.scopes.closed.strong\|int -->6<!-- /pf --> strong** |

The gross count percentage in [#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836) exposes an unchanged trade mismatch in `validation/mtf-triple-tf-macd-hist-confluence-01`, which remains **Moderate** in the 2026-11-16 reference sweep. Aggregate reference verification accepts only that full id at Moderate under a dated floor exception that ends when [#883](https://github.com/pineforge-4pass/pineforge-engine/issues/883) closes. Every other strategy keeps the Strong floor; missing inputs or lower tiers still fail. This reference measurement is separate from the dated scoreboard metadata above; baseline promotion requires its own verification.

### Lane by lane

<!-- pf:scoreboard|lanes-all -->
Expand All @@ -336,10 +340,19 @@ The hard lane combines <!-- pf:scoreboard.hardLane.corpusProbes|int -->309<!-- /

Every script is exported from TradingView as-is (its own inputs, its own defaults) with the chart's trade list at full precision, transpiled with [`pineforge-codegen`](https://github.com/pineforge-4pass/pineforge-codegen-oss), and run by this engine on the same OHLCV bars. The two trade lists are aligned trade-for-trade and graded by [`scripts/verify_corpus.py`](scripts/verify_corpus.py):

- **excellent** — the same number of trades, ≥ 99% of TradingView's trades matched, the distinct-entry identity check passed, entry and exit prices within 0.01% and PnL within 1% at the 90th percentile (trailing-stop scripts are graded on the *production* profile: exits within 0.02% and PnL within 1%, since a trail fill depends on TradingView's sub-bar path);
- **strong** — ≥ 95% matched, trade count within 6%, entries within 0.1% and exits within 0.5% at p90;
- **excellent** — zero unmatched gated trades on either side, ≥ 99% of TradingView's trades matched, the distinct-entry identity check passed, entry and exit prices within 0.01% and PnL within 1% at the 90th percentile (trailing-stop scripts are graded on the *production* profile: exits within 0.02% and PnL within 1%, since a trail fill depends on TradingView's sub-bar path);
- **strong** — ≥ 95% matched, gross unmatched trades below 6% of the larger gated trade count, entries within 0.1% and exits within 0.5% at p90;
- **moderate** — ≥ 75% coverage with ≥ 90% of the in-window trades matched; **weak** — at least one match; **minimal** — none.

The absolute mismatch metric, `count_abs_delta` (printed as `abs`), adds every
unmatched gated TradingView trade and every unmatched gated engine trade.
The separate `net_count_abs_delta` (`net`) reports the difference in list sizes
for diagnostics only.
Excellent requires the absolute mismatch count to be zero. The percentage
metric, `count_delta`, divides that same gross count by the larger gated trade
count, with zero for two empty pools. Strong-tier grading and fragmented-FIFO
metric eligibility use this same percentage and retain their thresholds.

The closed-test grades are the maintainers' own measurement of a fixed population; only the public board can be re-run from this repository.

### Distinct-entry identity
Expand Down
Loading
Loading