Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/inspect-r-api-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<LIVE_SWEEPS_EOF'
if [ -f live-parity-summary.md ]; then
cat live-parity-summary.md
else
echo '_The live R sweeps produced no summary; see the workflow diagnostics._'
fi
echo 'LIVE_SWEEPS_EOF'
} >> "$GITHUB_OUTPUT"

- name: Upload parity diagnostics
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -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
Expand Down Expand Up @@ -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/**
Expand All @@ -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
14 changes: 7 additions & 7 deletions .github/workflows/r14-reproduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading