From db31e31ef04b6a458c0740e28f1491a27aa753ff Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 02:18:10 +0000 Subject: [PATCH 1/3] Re-apply the 14.2 builder and reproduction workflows #204 merged after the workflow baseline bot had restored the protected workflows, so main lacks the two changes it carried: - inspect-r-api-update.yml runs every live R sweep (scripts/live_parity) in both modes after regenerating the cache, uploads the log and reports, puts the summary table in its pull request and fails on any difference; - r14-reproduction.yml bundles and builds NNS_14.2.tar.gz at f0387ed (sha256 a4e04b26...). This reverts commit ff416399d7c04b792f546c5a76f28c1922cff04f. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt --- .github/workflows/inspect-r-api-update.yml | 41 ++++++++++++++++++++++ .github/workflows/r14-reproduction.yml | 14 ++++---- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/.github/workflows/inspect-r-api-update.yml b/.github/workflows/inspect-r-api-update.yml index dbe20dee..ab52e420 100644 --- a/.github/workflows/inspect-r-api-update.yml +++ b/.github/workflows/inspect-r-api-update.yml @@ -370,6 +370,36 @@ jobs: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity } 2>&1 | tee committed-cache-verification.log + # Thousands of generated cases per area, compared with the new oracle at + # exact equality, with and without the native extension + # (scripts/live_parity/README.md). + - name: Run live R sweeps + id: sweeps + if: always() + continue-on-error: true + shell: bash + env: + NNS_LIVE_OUT: live-parity-reports + run: | + set -o pipefail + python scripts/live_parity/run.py --mode both --jobs 4 \ + --summary live-parity-summary.md 2>&1 | tee live-parity.log + + - name: Collect live sweep summary + id: sweepsummary + if: always() + shell: bash + run: | + { + echo 'summary<> "$GITHUB_OUTPUT" + - name: Upload parity diagnostics if: always() uses: actions/upload-artifact@v4 @@ -378,6 +408,9 @@ jobs: path: | parity-regeneration.log committed-cache-verification.log + live-parity.log + live-parity-summary.md + live-parity-reports/ if-no-files-found: warn # Rebuild directly on the existing #192 branch. Do not let the @@ -421,10 +454,13 @@ jobs: - Windows binary verified: `${{ steps.package.outputs.windows_binary }}` - Live regeneration result: `${{ steps.regenerate.outcome }}` - Cache-only verification result: `${{ steps.verify.outcome }}` + - Live R sweeps result: `${{ steps.sweeps.outcome }}` The exact R source package was installed and the committed parity cache was regenerated. `sync/nns_source.json` records this R commit as the behavioral-truth provenance. Any remaining Python/R parity mismatches are retained in the workflow diagnostics and should be repaired against this R-authored baseline. ${{ steps.cachediff.outputs.summary }} + + ${{ steps.sweepsummary.outputs.summary }} add-paths: | tests/_r.py tests/_r_cache/** @@ -436,8 +472,13 @@ jobs: run: | echo "Live regeneration outcome: ${{ steps.regenerate.outcome }}" echo "Cache-only verification outcome: ${{ steps.verify.outcome }}" + echo "Live R sweeps outcome: ${{ steps.sweeps.outcome }}" echo "The regenerated R cache has been preserved on the audit branch or in its PR." if [ "${{ steps.regenerate.outcome }}" != "success" ] || [ "${{ steps.verify.outcome }}" != "success" ]; then echo "::error::The oracle regeneration or its offline verification failed; generated cache is for review, not release." exit 1 fi + if [ "${{ steps.sweeps.outcome }}" != "success" ]; then + echo "::error::The live R sweeps found differences from the new oracle; see live-parity.log in the diagnostics." + exit 1 + fi diff --git a/.github/workflows/r14-reproduction.yml b/.github/workflows/r14-reproduction.yml index be0e678f..3955c374 100644 --- a/.github/workflows/r14-reproduction.yml +++ b/.github/workflows/r14-reproduction.yml @@ -25,8 +25,8 @@ jobs: git archive --format=tar.gz --output=reproduction/python-source.tar.gz HEAD git rev-parse HEAD > reproduction/python-commit.txt curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ - --output reproduction/NNS_14.0.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ + --output reproduction/NNS_14.2.tar.gz sha256sum reproduction/*.tar.gz > reproduction/SHA256SUMS python -m pip download --only-binary=:all: --dest reproduction/wheels \ hypothesis pytest-benchmark pytest-xdist nanobind scikit-build-core ruff mypy @@ -50,12 +50,12 @@ jobs: ca-certificates curl r-base-core r-base-dev r-cran-rcpp \ r-cran-rcppparallel r-cran-jsonlite r-cran-mass r-cran-mlbench curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ - --output /tmp/NNS_14.0.tar.gz - echo '754dad65629b95bf3ddca9bf9018ef197f5c346dd12dcfb49e505835920bc5cb /tmp/NNS_14.0.tar.gz' | sha256sum -c - - MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.0.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ + --output /tmp/NNS_14.2.tar.gz + echo 'a4e04b26b3ea01aeae1d6676448194b275bdd3f2aacbafd78b82ba5c2a649201 /tmp/NNS_14.2.tar.gz' | sha256sum -c - + MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.2.tar.gz mkdir -p oracle-runtime/dependent-libraries - Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.0"); sessionInfo()' > oracle-runtime/session-info.txt + Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.2"); sessionInfo()' > oracle-runtime/session-info.txt find /usr/lib/R /usr/local/lib/R -name '*.so' -print0 | \ xargs -0 -r ldd 2>/dev/null | awk '/=> \/.* \(/{print $3}' | sort -u > oracle-runtime/library-paths.txt while IFS= read -r lib; do From 074035493c15ebf1802f033d40c55c74803df928 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 02:18:41 +0000 Subject: [PATCH 2/3] Restore protected workflow baseline --- .github/workflows/inspect-r-api-update.yml | 41 ---------------------- .github/workflows/r14-reproduction.yml | 14 ++++---- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/.github/workflows/inspect-r-api-update.yml b/.github/workflows/inspect-r-api-update.yml index ab52e420..dbe20dee 100644 --- a/.github/workflows/inspect-r-api-update.yml +++ b/.github/workflows/inspect-r-api-update.yml @@ -370,36 +370,6 @@ jobs: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity } 2>&1 | tee committed-cache-verification.log - # Thousands of generated cases per area, compared with the new oracle at - # exact equality, with and without the native extension - # (scripts/live_parity/README.md). - - name: Run live R sweeps - id: sweeps - if: always() - continue-on-error: true - shell: bash - env: - NNS_LIVE_OUT: live-parity-reports - run: | - set -o pipefail - python scripts/live_parity/run.py --mode both --jobs 4 \ - --summary live-parity-summary.md 2>&1 | tee live-parity.log - - - name: Collect live sweep summary - id: sweepsummary - if: always() - shell: bash - run: | - { - echo 'summary<> "$GITHUB_OUTPUT" - - name: Upload parity diagnostics if: always() uses: actions/upload-artifact@v4 @@ -408,9 +378,6 @@ jobs: path: | parity-regeneration.log committed-cache-verification.log - live-parity.log - live-parity-summary.md - live-parity-reports/ if-no-files-found: warn # Rebuild directly on the existing #192 branch. Do not let the @@ -454,13 +421,10 @@ jobs: - Windows binary verified: `${{ steps.package.outputs.windows_binary }}` - Live regeneration result: `${{ steps.regenerate.outcome }}` - Cache-only verification result: `${{ steps.verify.outcome }}` - - Live R sweeps result: `${{ steps.sweeps.outcome }}` The exact R source package was installed and the committed parity cache was regenerated. `sync/nns_source.json` records this R commit as the behavioral-truth provenance. Any remaining Python/R parity mismatches are retained in the workflow diagnostics and should be repaired against this R-authored baseline. ${{ steps.cachediff.outputs.summary }} - - ${{ steps.sweepsummary.outputs.summary }} add-paths: | tests/_r.py tests/_r_cache/** @@ -472,13 +436,8 @@ jobs: run: | echo "Live regeneration outcome: ${{ steps.regenerate.outcome }}" echo "Cache-only verification outcome: ${{ steps.verify.outcome }}" - echo "Live R sweeps outcome: ${{ steps.sweeps.outcome }}" echo "The regenerated R cache has been preserved on the audit branch or in its PR." if [ "${{ steps.regenerate.outcome }}" != "success" ] || [ "${{ steps.verify.outcome }}" != "success" ]; then echo "::error::The oracle regeneration or its offline verification failed; generated cache is for review, not release." exit 1 fi - if [ "${{ steps.sweeps.outcome }}" != "success" ]; then - echo "::error::The live R sweeps found differences from the new oracle; see live-parity.log in the diagnostics." - exit 1 - fi diff --git a/.github/workflows/r14-reproduction.yml b/.github/workflows/r14-reproduction.yml index 3955c374..be0e678f 100644 --- a/.github/workflows/r14-reproduction.yml +++ b/.github/workflows/r14-reproduction.yml @@ -25,8 +25,8 @@ jobs: git archive --format=tar.gz --output=reproduction/python-source.tar.gz HEAD git rev-parse HEAD > reproduction/python-commit.txt curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ - --output reproduction/NNS_14.2.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ + --output reproduction/NNS_14.0.tar.gz sha256sum reproduction/*.tar.gz > reproduction/SHA256SUMS python -m pip download --only-binary=:all: --dest reproduction/wheels \ hypothesis pytest-benchmark pytest-xdist nanobind scikit-build-core ruff mypy @@ -50,12 +50,12 @@ jobs: ca-certificates curl r-base-core r-base-dev r-cran-rcpp \ r-cran-rcppparallel r-cran-jsonlite r-cran-mass r-cran-mlbench curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ - --output /tmp/NNS_14.2.tar.gz - echo 'a4e04b26b3ea01aeae1d6676448194b275bdd3f2aacbafd78b82ba5c2a649201 /tmp/NNS_14.2.tar.gz' | sha256sum -c - - MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.2.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ + --output /tmp/NNS_14.0.tar.gz + echo '754dad65629b95bf3ddca9bf9018ef197f5c346dd12dcfb49e505835920bc5cb /tmp/NNS_14.0.tar.gz' | sha256sum -c - + MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.0.tar.gz mkdir -p oracle-runtime/dependent-libraries - Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.2"); sessionInfo()' > oracle-runtime/session-info.txt + Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.0"); sessionInfo()' > oracle-runtime/session-info.txt find /usr/lib/R /usr/local/lib/R -name '*.so' -print0 | \ xargs -0 -r ldd 2>/dev/null | awk '/=> \/.* \(/{print $3}' | sort -u > oracle-runtime/library-paths.txt while IFS= read -r lib; do From e0ec3e2fb2f69f21a8356426f966991743904155 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 02:20:18 +0000 Subject: [PATCH 3/3] Restore the 14.2 workflow changes after the label The workflow baseline bot restored the protected workflows when this PR opened, before workflow-change-approved was added. With the label in place, this puts back the builder's live-sweep step and the 14.2 reproduction pin. This reverts commit 0740354. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt --- .github/workflows/inspect-r-api-update.yml | 41 ++++++++++++++++++++++ .github/workflows/r14-reproduction.yml | 14 ++++---- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/.github/workflows/inspect-r-api-update.yml b/.github/workflows/inspect-r-api-update.yml index dbe20dee..ab52e420 100644 --- a/.github/workflows/inspect-r-api-update.yml +++ b/.github/workflows/inspect-r-api-update.yml @@ -370,6 +370,36 @@ jobs: NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity } 2>&1 | tee committed-cache-verification.log + # Thousands of generated cases per area, compared with the new oracle at + # exact equality, with and without the native extension + # (scripts/live_parity/README.md). + - name: Run live R sweeps + id: sweeps + if: always() + continue-on-error: true + shell: bash + env: + NNS_LIVE_OUT: live-parity-reports + run: | + set -o pipefail + python scripts/live_parity/run.py --mode both --jobs 4 \ + --summary live-parity-summary.md 2>&1 | tee live-parity.log + + - name: Collect live sweep summary + id: sweepsummary + if: always() + shell: bash + run: | + { + echo 'summary<> "$GITHUB_OUTPUT" + - name: Upload parity diagnostics if: always() uses: actions/upload-artifact@v4 @@ -378,6 +408,9 @@ jobs: path: | parity-regeneration.log committed-cache-verification.log + live-parity.log + live-parity-summary.md + live-parity-reports/ if-no-files-found: warn # Rebuild directly on the existing #192 branch. Do not let the @@ -421,10 +454,13 @@ jobs: - Windows binary verified: `${{ steps.package.outputs.windows_binary }}` - Live regeneration result: `${{ steps.regenerate.outcome }}` - Cache-only verification result: `${{ steps.verify.outcome }}` + - Live R sweeps result: `${{ steps.sweeps.outcome }}` The exact R source package was installed and the committed parity cache was regenerated. `sync/nns_source.json` records this R commit as the behavioral-truth provenance. Any remaining Python/R parity mismatches are retained in the workflow diagnostics and should be repaired against this R-authored baseline. ${{ steps.cachediff.outputs.summary }} + + ${{ steps.sweepsummary.outputs.summary }} add-paths: | tests/_r.py tests/_r_cache/** @@ -436,8 +472,13 @@ jobs: run: | echo "Live regeneration outcome: ${{ steps.regenerate.outcome }}" echo "Cache-only verification outcome: ${{ steps.verify.outcome }}" + echo "Live R sweeps outcome: ${{ steps.sweeps.outcome }}" echo "The regenerated R cache has been preserved on the audit branch or in its PR." if [ "${{ steps.regenerate.outcome }}" != "success" ] || [ "${{ steps.verify.outcome }}" != "success" ]; then echo "::error::The oracle regeneration or its offline verification failed; generated cache is for review, not release." exit 1 fi + if [ "${{ steps.sweeps.outcome }}" != "success" ]; then + echo "::error::The live R sweeps found differences from the new oracle; see live-parity.log in the diagnostics." + exit 1 + fi diff --git a/.github/workflows/r14-reproduction.yml b/.github/workflows/r14-reproduction.yml index be0e678f..3955c374 100644 --- a/.github/workflows/r14-reproduction.yml +++ b/.github/workflows/r14-reproduction.yml @@ -25,8 +25,8 @@ jobs: git archive --format=tar.gz --output=reproduction/python-source.tar.gz HEAD git rev-parse HEAD > reproduction/python-commit.txt curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ - --output reproduction/NNS_14.0.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ + --output reproduction/NNS_14.2.tar.gz sha256sum reproduction/*.tar.gz > reproduction/SHA256SUMS python -m pip download --only-binary=:all: --dest reproduction/wheels \ hypothesis pytest-benchmark pytest-xdist nanobind scikit-build-core ruff mypy @@ -50,12 +50,12 @@ jobs: ca-certificates curl r-base-core r-base-dev r-cran-rcpp \ r-cran-rcppparallel r-cran-jsonlite r-cran-mass r-cran-mlbench curl --fail --location --retry 3 \ - https://raw.githubusercontent.com/OVVO-Financial/NNS/9c8bd21a77b377cb49d43fececc662d62b00a94e/NNS_14.0.tar.gz \ - --output /tmp/NNS_14.0.tar.gz - echo '754dad65629b95bf3ddca9bf9018ef197f5c346dd12dcfb49e505835920bc5cb /tmp/NNS_14.0.tar.gz' | sha256sum -c - - MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.0.tar.gz + https://raw.githubusercontent.com/OVVO-Financial/NNS/f0387ed857de3d3bf047fa581b854dc5e3d0c3a6/NNS_14.2.tar.gz \ + --output /tmp/NNS_14.2.tar.gz + echo 'a4e04b26b3ea01aeae1d6676448194b275bdd3f2aacbafd78b82ba5c2a649201 /tmp/NNS_14.2.tar.gz' | sha256sum -c - + MAKEFLAGS=-j2 R CMD INSTALL /tmp/NNS_14.2.tar.gz mkdir -p oracle-runtime/dependent-libraries - Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.0"); sessionInfo()' > oracle-runtime/session-info.txt + Rscript -e 'library(NNS); stopifnot(packageVersion("NNS") == "14.2"); sessionInfo()' > oracle-runtime/session-info.txt find /usr/lib/R /usr/local/lib/R -name '*.so' -print0 | \ xargs -0 -r ldd 2>/dev/null | awk '/=> \/.* \(/{print $3}' | sort -u > oracle-runtime/library-paths.txt while IFS= read -r lib; do