Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
50aa92e
Require internal R stack candidate invariant trace
OVVO-Financial Jul 13, 2026
cb90c08
Repin repaired R parity workflow to latest merged reference
OVVO-Financial Jul 13, 2026
44e5a6a
Consume hidden R stack trace for parity invariants
OVVO-Financial Jul 13, 2026
1228619
Remove stale raw parity log
OVVO-Financial Jul 13, 2026
92296d6
Remove stale raw full-suite log
OVVO-Financial Jul 13, 2026
36a706f
Repin repaired R fixture generator schema
OVVO-Financial Jul 13, 2026
6f6d519
Restore and repin repaired R fixture generator
OVVO-Financial Jul 13, 2026
60fbe2e
Repin repaired R fixture verifier
OVVO-Financial Jul 13, 2026
955a4cc
Repin repaired R fixture importer
OVVO-Financial Jul 13, 2026
86f848b
Add latest repaired R fixture namespace
OVVO-Financial Jul 13, 2026
e90e039
Add pooled OOF Method 1 selector
OVVO-Financial Jul 13, 2026
506d18f
Test pooled OOF Method 1 selection invariants
OVVO-Financial Jul 13, 2026
6f3ddba
Add public Method 1 integration parity tests
OVVO-Financial Jul 13, 2026
fed15ef
Pass candidate identity into pooled Method 1 scoring
OVVO-Financial Jul 13, 2026
7e0e5d0
Implement complete pooled OOF Method 1 runtime
OVVO-Financial Jul 13, 2026
5fb0f31
Install repaired Method 1 stack implementation
OVVO-Financial Jul 13, 2026
1cf94e9
Update pooled Method 1 evaluator tests
OVVO-Financial Jul 13, 2026
93c6f35
Stabilize Method 1 public integration invariants
OVVO-Financial Jul 13, 2026
88c00a3
Make CI parity failures concise and actionable
OVVO-Financial Jul 13, 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
21 changes: 13 additions & 8 deletions .github/workflows/native-backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,38 @@ jobs:

- name: Install build tools
run: |
python -m pip install -U pip
python -m pip install -q -U pip
# numpy pinned <2.5: the R parity cache keys hash test inputs generated via
# multivariate_normal (LAPACK SVD). numpy 2.5.x bundles an OpenBLAS whose SVD
# kernels differ on some runner CPUs, changing inputs bit-for-bit and causing
# cache misses. Re-evaluate at the next full live-R cache regeneration.
python -m pip install build scikit-build-core nanobind pytest ruff mypy "numpy<2.5" scipy
python -m pip install hypothesis pytest-benchmark pytest-xdist
python -m pip install -q build scikit-build-core nanobind pytest ruff mypy "numpy<2.5" scipy
python -m pip install -q hypothesis pytest-benchmark pytest-xdist

- name: Install package editable
run: python -m pip install -e .
run: python -m pip install -q -e .

- name: Run native import smoke test
run: python -c "import nns._nnscore as c; print(c.lpm(2.0, 0.0, [-2.0, -1.0, 0.5, 3.0]))"

- name: Run invariants without Rscript
run: python -m pytest -q tests/invariants
run: |
set +e
python -m pytest -q --tb=short tests/invariants > invariant-results.txt 2>&1
status=$?
cat invariant-results.txt
exit $status

- name: Run parity from committed R cache
run: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity
run: NNS_R_CACHE_ONLY=1 python -m pytest -q --tb=short tests/parity

- name: Run plotting color-fidelity tests
run: python -m pytest -q tests/plotting
run: python -m pytest -q --tb=short tests/plotting

- name: Run vignette examples
run: |
if [ -f tests/docs/test_vignette_examples.py ]; then
python -m pytest -q tests/docs/test_vignette_examples.py
python -m pytest -q --tb=short tests/docs/test_vignette_examples.py
else
echo "No docs vignette test present; skipping."
fi
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/repaired-r-parity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Repaired R parity fixtures

on:
workflow_dispatch:
pull_request:
paths:
- "src/nns/**"
- "tests/parity/**"
- ".github/workflows/repaired-r-parity.yml"

jobs:
repaired-r-fixtures:
runs-on: ubuntu-latest
env:
R_NNS_REPOSITORY: OVVO-Financial/NNS
REPAIRED_NNS_R_SHA: "21be6d92d8ad23f0848191b094aded0dd6df8f74"
FIXTURE_DIR: tests/parity/fixtures/repaired_r_13_1_21be6d92
R_VALIDATION_LOG_DIR: artifacts/repaired-r-validation
PYTEST_LOG: pytest-21be6d92.txt
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- uses: astral-sh/setup-uv@v5

- name: Install Python dependencies
run: uv sync --all-extras --dev

- name: Install R dependencies
run: |
Rscript -e 'install.packages(c("devtools", "Rcpp", "jsonlite", "remotes", "digest", "desc"), repos = "https://cloud.r-project.org")'

- name: Validate pinned R SHA variable
run: |
if ! printf '%s' "${REPAIRED_NNS_R_SHA}" | grep -Eq '^[0-9a-f]{40}$'; then
echo "REPAIRED_NNS_R_SHA must be a 40-character lowercase git SHA" >&2
exit 1
fi

- name: Checkout repaired R NNS reference
run: |
git clone https://github.com/${R_NNS_REPOSITORY}.git ../NNS-r
cd ../NNS-r
git checkout "${REPAIRED_NNS_R_SHA}"
test "$(git rev-parse HEAD)" = "${REPAIRED_NNS_R_SHA}"
echo "R_NNS_COMMIT=${REPAIRED_NNS_R_SHA}" >> "$GITHUB_ENV"

- name: Validate repaired R package
working-directory: ../NNS-r
run: |
mkdir -p "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}"
Rscript "${GITHUB_WORKSPACE}/tests/parity/check_repaired_r_docs.R" 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/00-doc-contract-before-document.log"
Rscript -e 'Rcpp::compileAttributes()' 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/01-compileAttributes.log"
Rscript -e 'devtools::document()' 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/02-document.log"
Rscript "${GITHUB_WORKSPACE}/tests/parity/check_repaired_r_docs.R" 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/02b-doc-contract-after-document.log"
Rscript -e 'devtools::load_all()' 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/03-load_all.log"
Rscript -e 'devtools::test()' 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/04-test.log"
Rscript -e 'devtools::check(error_on = "error", document = FALSE)' 2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/05-check.log"

- name: Validate repaired R stack candidate invariants
working-directory: ../NNS-r
run: |
mkdir -p "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}"
Rscript "${GITHUB_WORKSPACE}/tests/parity/check_repaired_r_stack_invariants.R" \
"${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}" \
2>&1 | tee "${GITHUB_WORKSPACE}/${R_VALIDATION_LOG_DIR}/06-stack-invariants.log"

- name: Generate repaired R fixtures with reference backend
run: |
Rscript tests/parity/generate_repaired_r_fixtures.R \
--r-repo ../NNS-r \
--out "${FIXTURE_DIR}" \
--commit "${R_NNS_COMMIT}"

- name: Verify repaired R fixtures
run: uv run python tests/parity/verify_repaired_r_fixtures.py "${FIXTURE_DIR}"

- name: Run Python parity tests against repaired fixtures
run: uv run pytest -q tests/parity -m parity 2>&1 | tee "${PYTEST_LOG}"

- name: Upload R validation logs
if: always()
uses: actions/upload-artifact@v4
with:
name: repaired-r-validation-${{ env.R_NNS_COMMIT }}
path: ${{ env.R_VALIDATION_LOG_DIR }}
if-no-files-found: error

- name: Upload repaired fixture artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: repaired-r-13-1-21be6d92-fixtures-${{ env.R_NNS_COMMIT }}
path: |
${{ env.FIXTURE_DIR }}
${{ env.PYTEST_LOG }}
if-no-files-found: warn
Loading
Loading