Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d64b509
docs: record quantbt engine packaging baseline
BobbyAxerol Jul 31, 2026
1dd351d
build: add quantbt python package layout
BobbyAxerol Aug 1, 2026
fdf1235
ci: prepare quantbt engine release workflow
BobbyAxerol Aug 1, 2026
e320d05
test: freeze native event behavior baseline
BobbyAxerol Aug 1, 2026
7d898f8
perf: optimize native event python hot path
BobbyAxerol Aug 1, 2026
7b8701b
build: add PyO3 native event R0 scaffold
BobbyAxerol Aug 1, 2026
417e01a
feat: add PyO3 native event R1 POC
BobbyAxerol Aug 1, 2026
c9c47dc
feat: add PyO3 R2 lifecycle slice and wheel gate
BobbyAxerol Aug 1, 2026
e1f7f6b
fix: lock native event reactive parity and source sync
BobbyAxerol Aug 1, 2026
a125087
perf: add direct native event score and prepared Rust market core
BobbyAxerol Aug 1, 2026
0fbf7ed
build: add local PyO3 native evidence gate
BobbyAxerol Aug 1, 2026
be55d27
release: certify quantbt-engine core packaging
BobbyAxerol Aug 1, 2026
91dcf30
docs: add native event continuation phase plan
BobbyAxerol Aug 1, 2026
c93c9f6
perf: add zero-object native event score path
BobbyAxerol Aug 1, 2026
0912ced
feat: add Rust batched full-tape runner
BobbyAxerol Aug 1, 2026
685d3d3
feat: add sparse Rust native event release gate
BobbyAxerol Aug 1, 2026
e387ae9
docs: plan final dual backend and PyPI upgrade
BobbyAxerol Aug 1, 2026
56e6bef
feat: certify phase 46a native event parity contract
BobbyAxerol Aug 1, 2026
033d993
test: record phase 46a parity evidence
BobbyAxerol Aug 1, 2026
5281887
feat: add apples-to-apples scalar score benchmark
BobbyAxerol Aug 1, 2026
cf30e72
test: record phase 46b score rss evidence
BobbyAxerol Aug 1, 2026
fb1db5b
feat: lower phase 46c import rss floor
BobbyAxerol Aug 1, 2026
e414e72
feat: optimize phase 46d rust ownership and hot state
BobbyAxerol Aug 1, 2026
3da6117
perf: refine phase 46d native event score path
BobbyAxerol Aug 1, 2026
d295cac
feat: complete phase 46e dual backend release gate
BobbyAxerol Aug 1, 2026
1a6027b
feat: finalize phase 46f pypi release gate
BobbyAxerol Aug 1, 2026
e9a8c9a
docs: report native benchmark throughput clearly
BobbyAxerol Aug 1, 2026
5c33c12
chore: align package version with v1.0.7 release
BobbyAxerol Aug 1, 2026
d0f5f87
docs: plan final grid python rust contract upgrade
BobbyAxerol Aug 2, 2026
36a0b21
feat: lock phase 47a grid scalar adapter
BobbyAxerol Aug 2, 2026
dcb2833
feat: implement phase 47b rust full event contract
BobbyAxerol Aug 2, 2026
c382ab6
feat: implement phase 47c grid parity and rss benchmark
BobbyAxerol Aug 2, 2026
5976333
test: record phase 47c grid benchmark evidence
BobbyAxerol Aug 2, 2026
54525d3
fix: make phase 47c rss leak gate warm-state aware
BobbyAxerol Aug 2, 2026
f7d9c47
test: finalize phase 47c benchmark artifacts
BobbyAxerol Aug 2, 2026
7043c3f
docs: clarify phase 47c rss certification boundary
BobbyAxerol Aug 2, 2026
344e675
feat: certify phase 47d grid optimizer path
BobbyAxerol Aug 2, 2026
ae285b5
docs: plan final release endpoint packaging audit
BobbyAxerol Aug 2, 2026
e24fcb8
release: certify phase 48a native api 0.4 surfaces
BobbyAxerol Aug 2, 2026
1c6c19f
chore: certify phase 48b repository hygiene
BobbyAxerol Aug 2, 2026
43eeb90
feat: add stable event-driven facade
BobbyAxerol Aug 2, 2026
0121163
perf: certify phase 48c event facade benchmark
BobbyAxerol Aug 2, 2026
4ebd393
perf: certify pre-48e native event pass
BobbyAxerol Aug 2, 2026
9ae2b48
feat: complete phase 48e native event certification
BobbyAxerol Aug 2, 2026
0271c6a
docs: track phase 48e1 native production closure
BobbyAxerol Aug 2, 2026
9ba1663
feat: close phase 48e1 native production contract
BobbyAxerol Aug 2, 2026
24fa36b
fix: close phase 48e1 margin and wheel evidence
BobbyAxerol Aug 2, 2026
e09b8fa
release: close phase 48f artifact gate and handoff
BobbyAxerol Aug 2, 2026
f91bd24
release: prepare quantbt-engine 1.0.7rc1 packaging
BobbyAxerol Aug 3, 2026
82f9c65
ci: fix portable release and native workflow gates
BobbyAxerol Aug 3, 2026
14e2205
ci: remove runner-dependent tracked-file guard
BobbyAxerol Aug 3, 2026
c4e2729
ci: build release artifacts from a clean directory
BobbyAxerol Aug 3, 2026
9630e03
ci: run release scanners with matrix Python
BobbyAxerol Aug 3, 2026
29548fa
ci: validate tracked release plan from git object
BobbyAxerol Aug 3, 2026
0b510f5
ci: keep tracked release-plan check minimal
BobbyAxerol Aug 3, 2026
49a216d
ci: use absolute release scanner paths
BobbyAxerol Aug 3, 2026
9b30b6c
ci: use synced interpreter for release test jobs
BobbyAxerol Aug 3, 2026
412d21b
test: skip native closure module without optional wheel
BobbyAxerol Aug 3, 2026
9514622
ci: isolate native event suite behind wheel gate
BobbyAxerol Aug 3, 2026
8b5bae1
ci: keep native full suite on default backend
BobbyAxerol Aug 3, 2026
1aafe71
test: keep Rust score checks optional in core CI
BobbyAxerol Aug 3, 2026
98ae5ea
test: allow external grid fixtures to skip in CI
BobbyAxerol Aug 3, 2026
fb9e700
ci: isolate external grid fixtures from public workflows
BobbyAxerol Aug 3, 2026
0751497
test: use tracked release tooling import path
BobbyAxerol Aug 3, 2026
de4c727
ci: support detached pull request release manifests
BobbyAxerol Aug 3, 2026
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
78 changes: 64 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,87 @@ name: CI

on:
pull_request:
branches: [dev]
branches: [dev, main]
push:
branches: [dev]
branches: [dev, main]
workflow_dispatch:

permissions:
contents: read

jobs:
tests:
name: Python tests
package:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install dependencies
# The shared suite exercises Optuna, reporting, and plotting APIs.
# Keep the heavyweight optional Nautilus validation extra out of this
# matrix; it has its own gate and creates avoidable RSS pressure.
run: uv sync --extra optimization --extra reports --extra viz --dev

- name: Test
run: >-
.venv/bin/python -m pytest -q
--ignore=tests/test_real.py
--ignore=tests/test_real_endpoints.py
--ignore=tests/native_event
--ignore=tests/test_phase47a_grid_adapter.py
--ignore=tests/test_phase47c_grid_parity.py
--ignore=tests/test_phase47d_grid_optimizer.py

- name: Build package
run: |
python -m pip install -U pip
python -m pip install numpy pandas numba matplotlib seaborn pytest
rm -rf dist
uv build

- name: Validate distribution metadata
run: uv run twine check dist/*

- name: Run core tests
env:
PYTHONPATH: ${{ github.workspace }}/..
- name: Check repository visibility and release artifacts
run: |
pytest tests \
--ignore=tests/test_real.py \
--ignore=tests/test_real_endpoints.py \
--ignore=tests/test_phase5_nautilus_adapter.py
git ls-files --error-unmatch upgrade/implement.md
python "$GITHUB_WORKSPACE/tools/scan_public_secrets.py" --root "$GITHUB_WORKSPACE"
python "$GITHUB_WORKSPACE/tools/check_release_artifacts.py" --dist "$GITHUB_WORKSPACE/dist"

- name: Clean wheel install smoke
shell: bash
run: |
python -m venv /tmp/quantbt-wheel-smoke
/tmp/quantbt-wheel-smoke/bin/python -m pip install --upgrade pip
/tmp/quantbt-wheel-smoke/bin/python -m pip install dist/quantbt_engine-*.whl
/tmp/quantbt-wheel-smoke/bin/python -m pip check
cd /tmp
/tmp/quantbt-wheel-smoke/bin/python -c "from quantbt import QuantBTEndpoint; print(QuantBTEndpoint)"

- name: Clean sdist install smoke
shell: bash
run: |
python -m venv /tmp/quantbt-sdist-smoke
/tmp/quantbt-sdist-smoke/bin/python -m pip install --upgrade pip
/tmp/quantbt-sdist-smoke/bin/python -m pip install dist/quantbt_engine-*.tar.gz
/tmp/quantbt-sdist-smoke/bin/python -m pip check
cd /tmp
/tmp/quantbt-sdist-smoke/bin/python -c "from quantbt import QuantBTEndpoint; print(QuantBTEndpoint)"

- name: Pool Alpha import compatibility smoke
run: uv run python -c "from quantbt import QuantBTEndpoint; print(QuantBTEndpoint)"
122 changes: 122 additions & 0 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Native Event API 0.4 Gate

on:
pull_request:
branches: [dev, main]
push:
branches: [dev, main]
workflow_dispatch:

permissions:
contents: read

jobs:
native-event-api-04:
name: Native Event API 0.4 / CPython ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install core test environment
# The native gate needs the optimization dependencies used by the
# shared test suite, but not the optional Nautilus/report/viz extras.
# Keeping those out avoids importing a large third-party stack in
# every CPython matrix job.
run: uv sync --extra optimization --dev

- name: Rust format, lint, and tests
working-directory: rust/native_event
run: |
cargo fmt --check
cargo clippy -- -D warnings
cargo test

- name: Build core wheel from this ref
run: uv build --out-dir dist/core

- name: Build native wheel
uses: PyO3/maturin-action@v1
with:
command: build
args: >-
--release
--manifest-path rust/native_event/Cargo.toml
--interpreter python${{ matrix.python-version }}
--out dist/native
manylinux: "2014"

- name: Clean combined core and native wheel install smoke
shell: bash
run: |
python -m venv /tmp/quantbt-native-combined-smoke
/tmp/quantbt-native-combined-smoke/bin/python -m pip install --upgrade pip
/tmp/quantbt-native-combined-smoke/bin/python -m pip install dist/core/quantbt_engine-*.whl dist/native/quantbt_native-*.whl
/tmp/quantbt-native-combined-smoke/bin/python -m pip check
cd /tmp
/tmp/quantbt-native-combined-smoke/bin/python - <<'PY'
from quantbt import QuantBTEndpoint
import _quantbt_native

assert _quantbt_native.api_version() == "0.4"
required = {
"native_event_v2_full_contract",
"native_event_v2_multisymbol",
"native_event_v2_funding",
"native_event_v2_liquidation",
"native_event_v2_cancel_all_oco",
"native_event_v2_tif_expiry",
"native_event_v2_relationships",
"native_event_v2_quantity_preflight",
}
capabilities = _quantbt_native.capabilities()
missing = {
key for key in required if not capabilities.get(key, False)
}
assert not missing, sorted(missing)
print(QuantBTEndpoint)
print("Native Event API 0.4 capabilities: PASS")
PY

- name: Install native wheel into core test environment
run: uv pip install --python .venv/bin/python --no-deps dist/native/quantbt_native-*.whl

- name: Native Event full suite
run: .venv/bin/python -m pytest -q tests/native_event

- name: API 0.4 full-contract closure tests
env:
QUANTBT_NATIVE_BACKEND: rust
run: |
.venv/bin/python -m pytest -q \
tests/native_event/test_phase48e1_closure.py \
tests/native_event/contract/test_phase47b_full_contract.py \
tests/native_event/test_reactive_callback_contract.py

- name: Prepared score RSS and parity gate
run: |
.venv/bin/python benchmarks/run_phase45b_native_event_score_rss.py --rows 1000 --repeats 25 --json-out /tmp/phase45b-score-rss.json
.venv/bin/python -c "import json; p=json.load(open('/tmp/phase45b-score-rss.json')); assert p['parity']; assert p['score_faster_than_audit']; assert p['score_rss_not_higher_than_audit']"

- name: Rust RSS benchmark smoke
env:
QUANTBT_NATIVE_BACKEND: rust
run: .venv/bin/python benchmarks/native_event/benchmark_reactive_session.py --backend rust
161 changes: 161 additions & 0 deletions .github/workflows/publish-testpypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: Publish quantbt-engine to TestPyPI

on:
workflow_dispatch:
inputs:
ref:
description: "Release tag containing the RC version, for example v1.0.7rc1"
required: true
type: string
push:
tags:
- "v*rc*"

permissions:
contents: read

jobs:
build:
name: Build and test release candidate
runs-on: ubuntu-latest

steps:
- name: Checkout release candidate
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref_name }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install core development environment
run: uv sync --extra optimization --extra reports --extra viz --dev

- name: Check RC version against tag
env:
GITHUB_REF_NAME: ${{ inputs.ref || github.ref_name }}
run: uv run python tools/check_release_version.py

- name: Run regression
run: >-
.venv/bin/python -m pytest -q
--ignore=tests/test_real.py
--ignore=tests/test_real_endpoints.py
--ignore=tests/native_event
--ignore=tests/test_phase47a_grid_adapter.py
--ignore=tests/test_phase47c_grid_parity.py
--ignore=tests/test_phase47d_grid_optimizer.py

- name: Clean build directory
run: rm -rf dist release-manifest.json

- name: Build distributions
run: uv build --out-dir dist

- name: Validate distribution metadata
run: uv run twine check --strict dist/*

- name: Inspect release surfaces
run: |
git ls-files --error-unmatch upgrade/implement.md
test -n "$(find dist -maxdepth 1 -type f -name 'quantbt_engine-*.tar.gz' -print -quit)"
test -n "$(find dist -maxdepth 1 -type f -name 'quantbt_engine-*-py3-none-any.whl' -print -quit)"
if find dist -maxdepth 1 -type f \( -iname '*quantbt_native*' -o -iname '*manylinux*' \) | grep -q .; then
echo "ERROR: native artifact found in core TestPyPI release"
exit 1
fi
python "$GITHUB_WORKSPACE/tools/scan_public_secrets.py" --root "$GITHUB_WORKSPACE"
python "$GITHUB_WORKSPACE/tools/check_release_artifacts.py" --dist "$GITHUB_WORKSPACE/dist"

- name: Clean wheel install smoke
shell: bash
run: |
python -m venv /tmp/quantbt-testpypi-wheel-smoke
/tmp/quantbt-testpypi-wheel-smoke/bin/python -m pip install --upgrade pip
/tmp/quantbt-testpypi-wheel-smoke/bin/python -m pip install dist/quantbt_engine-*.whl
/tmp/quantbt-testpypi-wheel-smoke/bin/python -m pip check
cd /tmp
/tmp/quantbt-testpypi-wheel-smoke/bin/python - <<'PY'
import pathlib
import quantbt

path = pathlib.Path(quantbt.__file__).resolve()
assert "site-packages" in path.parts, path
print(path)
PY

- name: Clean sdist install smoke
shell: bash
run: |
python -m venv /tmp/quantbt-testpypi-sdist-smoke
/tmp/quantbt-testpypi-sdist-smoke/bin/python -m pip install --upgrade pip
/tmp/quantbt-testpypi-sdist-smoke/bin/python -m pip install dist/quantbt_engine-*.tar.gz
/tmp/quantbt-testpypi-sdist-smoke/bin/python -m pip check
cd /tmp
/tmp/quantbt-testpypi-sdist-smoke/bin/python - <<'PY'
import pathlib
import quantbt

path = pathlib.Path(quantbt.__file__).resolve()
assert "site-packages" in path.parts, path
print(path)
PY

- name: Create release manifest
env:
GITHUB_REF_NAME: ${{ inputs.ref || github.ref_name }}
run: >-
uv run python tools/create_release_manifest.py
--dist dist
--output release-manifest.json
--require-clean

- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: testpypi-dist
path: dist/*
if-no-files-found: error

- name: Upload release manifest
uses: actions/upload-artifact@v4
with:
name: testpypi-release-manifest
path: release-manifest.json
if-no-files-found: error

publish:
name: Publish release candidate to TestPyPI
needs: build
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
contents: read
id-token: write

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: testpypi-dist
path: dist

- name: Download release manifest
uses: actions/download-artifact@v4
with:
name: testpypi-release-manifest
path: release-evidence

- name: Publish with TestPyPI trusted publishing
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
Loading
Loading