Skip to content
Closed
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
21 changes: 20 additions & 1 deletion .github/workflows/inspect-r-api-update.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Regenerate R parity cache

on:
# One-shot integration audit: run against the complete Python PR stack.
push:
branches: [integration/r14-parity-on-python-stack-20261106]
paths: [.github/workflows/inspect-r-api-update.yml]
repository_dispatch:
types: [nns-r-package-updated]
workflow_dispatch:
Expand Down Expand Up @@ -55,6 +59,13 @@ jobs:
r_version="${{ github.event.client_payload.r_version }}"
source_tarball="${{ github.event.client_payload.source_tarball }}"
windows_binary="${{ github.event.client_payload.windows_binary }}"
elif [ "${{ github.event_name }}" = "push" ]; then
# The pinned upstream release for the full-stack parity audit.
r_repo="OVVO-Financial/NNS"
r_commit="7b07a837c130ba7220dbe16c584221508757d5ae"
r_version="14.0"
source_tarball="NNS_14.0.tar.gz"
windows_binary="NNS_14.0.zip"
else
r_repo="OVVO-Financial/NNS"
r_commit="${{ inputs.r_commit }}"
Expand Down Expand Up @@ -327,12 +338,16 @@ jobs:
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.OVVO_SYNC_TOKEN || github.token }}
branch: automation/r-cache-nns-${{ steps.package.outputs.r_version }}
# A separate PR against the full-stack audit branch; never overwrite #190.
branch: ${{ github.event_name == 'push' && 'automation/r14-stack-cache-20261106' || format('automation/r-cache-nns-{0}', steps.package.outputs.r_version) }}
base: ${{ github.event_name == 'push' && 'integration/r14-parity-on-python-stack-20261106' || github.event.repository.default_branch }}
delete-branch: true
commit-message: Regenerate R parity cache for NNS ${{ steps.package.outputs.r_version }}
title: Regenerate R parity cache for NNS ${{ steps.package.outputs.r_version }}
body: |
Automatic parity-cache refresh from the R source of truth.
For the one-shot stack audit, this PR targets draft #191 (all port PRs
through #189). Do NOT merge until deterministic parity is verified.

- R repository: `${{ steps.package.outputs.r_repo }}`
- R commit: `${{ steps.package.outputs.r_commit }}`
Expand All @@ -357,3 +372,7 @@ jobs:
echo "Live regeneration outcome: ${{ steps.regenerate.outcome }}"
echo "Cache-only verification outcome: ${{ steps.verify.outcome }}"
echo "The regenerated R cache has been preserved in its pull request."
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
6 changes: 3 additions & 3 deletions sync/nns_source.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"r_repo": "OVVO-Financial/NNS",
"r_commit": "82a92eb45c1a1892acce82e66175cf2e29434b65",
"r_version": "13.3",
"r_commit": "7b07a837c130ba7220dbe16c584221508757d5ae",
"r_version": "14.0",
"r_src_tree_hash": "1c82fa36a4af3ce6359cc34b3d841afa6bdd1815",
"core_repo": "OVVO-Financial/NNS-core",
"core_commit": "a0d3b93b6ac451bd38e5e9375ef06e6d0d314b9d",
Expand All @@ -11,5 +11,5 @@
"vendored_r_path": "tools/NNS",
"vendored_r_tarball": "tools/NNS_13.0.tar.gz",
"r_cache_path": "tests/_r_cache",
"notes": "NNS-python consumes accepted NNS-core snapshots for native code and verifies public Python behavior against live or cached R NNS. r_commit/r_version record the R 13.3 commit (82a92eb) whose behavior the parity cache encodes. core_commit is the vendored NNS-core snapshot (extern/NNS-core = CMakeLists.txt, include/, src/ of that commit); it ports the R 13.3 src tree (NNS-core sync/nns_r_source.json) plus the R bug fixes listed there and the core counterparts of the R patches for the mode reducer, the degree-0 nD/dependence tie split and the copula_signed sign and exact count compare, and the core ports of the later R fixes (pairwise SD test, NNS.seas scoring every component series, equal ARMA seasonal weights when they sum to zero, Rmath's dt in the M.reg kernels). The vendored R snapshot (tools/NNS, r_src_tree_hash, tarball) is still the 13.0 tree; re-syncing it is a separate R snapshot update. Parity cache provenance: the shards in tests/_r_cache were regenerated from R NNS 13.3 plus the fixes in OVVO-Financial/NNS pull requests #73-#92; see docs/parity.md, 'Cache provenance: R 13.3 + patches'."
"notes": "R 14.0 parity cache was freshly generated in OVVO-Financial/NNS-python PR #190, from OVVO-Financial/NNS commit 7b07a837c130ba7220dbe16c584221508757d5ae (NNS_14.0.tar.gz). This integration branch overlays those 59 generated cache shards onto the cumulative Python implementation stack through #189, preserving its newer parity helper and its accepted vendored NNS-core commit a0d3b93b6ac451bd38e5e9375ef06e6d0d314b9d. R 14.0 parity is under evaluation; regeneration and cache-only parity currently fail on Python main, and some oracle entries are missing. The vendored R snapshot, r_src_tree_hash, and tarball remain at their older 13.0 lineage pending separate sync, and do not identify the live-R behavioral oracle."
}
2 changes: 1 addition & 1 deletion tests/_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
_CACHE_DIR = Path(__file__).with_name("_r_cache")
_LOCK_PATH = Path(__file__).with_name("_r_cache.lock")
_SCHEMA_VERSION = 2
_NNS_VERSION = '13.3'
_NNS_VERSION = '14.0'
_KEY_SEPARATOR = "|"
JsonValue: TypeAlias = str | float | list["JsonValue"] | dict[str, "JsonValue"] | None
RValue: TypeAlias = (
Expand Down
Loading
Loading