Skip to content

[ci] Vendor RADE Opus snapshot for offline builds#1151

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:codex/vendor-rade-opus
Apr 11, 2026
Merged

[ci] Vendor RADE Opus snapshot for offline builds#1151
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:codex/vendor-rade-opus

Conversation

@jensenpat

Copy link
Copy Markdown
Collaborator

Summary

This PR vendors the pinned RADE Opus snapshot into the repository and updates the RADE build to consume that local snapshot instead of downloading Opus and its neural model at build time.

It also removes the CI and Docker model pre-cache workaround that existed only to reduce flakiness from those network fetches.

What changed

  • vendor a prepared RADE-compatible Opus snapshot under third_party/opus-rade/
  • switch third_party/radae/cmake/BuildOpus.cmake to build from the vendored archive via CMake instead of downloading upstream Opus during the build
  • keep PatchOpusNnet.cmake as a refresh helper for updating the vendored snapshot, not as a normal build step
  • update build messaging and README to reflect the new offline RADE dependency path
  • remove CI and Docker pre-cache steps that were only there to paper over the Opus/model download dependency

Why

The old RADE path depended on build-time network downloads.

That created two recurring problems:

  1. Local agent builds from Codex and Claude needed explicit sandbox approval before they could finish the Opus fetch, and failed downloads wasted time and tokens.
  2. GitHub Actions could stall or fail on the Opus/model download path, which made CI slower and less reliable.

Vendoring the exact pinned snapshot keeps behavior deterministic while removing the network dependency from normal builds.

Benefits

  • Faster RADE builds: the original download-based full RADE build completed in 67.16s wall-clock when run with unrestricted network access, while the vendored build completed in 53.34s, a 13.82s improvement or about 20.6% faster on the test machine.
  • Better reliability: the original path did not complete inside a normal sandboxed agent build and failed in the build_opus download step after 86.11s; the vendored path completed fully offline.
  • Easier local agent use: Codex and Claude no longer need sandbox approval just to fetch Opus before they can compile RADE-enabled builds.
  • Cleaner GitHub CI: builds no longer depend on opportunistic external downloads or the Docker image model cache workaround.
  • Lower token cost and operator overhead: fewer stalled agent runs, fewer retry loops, and fewer approval/download waits means less wasted inference time when builds are kicked off from local coding agents.
  • More reproducible builds: RADE now builds from the exact vendored snapshot that the project has chosen to support.

Validation

  • cmake -B build-vendor-test -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
  • cmake --build build-vendor-test --target build_opus -j4
  • cmake --build build-vendor-test -j4
  • cmake -B build-no-rade-test -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_RADE=OFF
  • cmake --build build-no-rade-test -j4
  • baseline benchmark from a clean export of HEAD: cmake -B build-bench -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build-bench -j4
  • vendored benchmark from this branch: cmake -B build-bench-current -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build-bench-current -j4

Tradeoffs

  • the repository grows by about 51 MB because the prepared Opus snapshot is now stored locally
  • GitHub warns that the archive is above the recommended 50 MB file size threshold, although it is still below the hard file size limit

👨🏼‍💻 Generated with OpenAI Codex (GPT-5.3 Pro) and tested by @jensenpat

@jensenpat jensenpat requested a review from ten9876 as a code owner April 10, 2026 23:00

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on this — the approach is clean and the motivation is solid. Removing the fragile pre-cache CI workaround in favour of a fully offline build is the right call. A few notes:

BuildOpus.cmake — CMake variable names for DRED/OSCE

The old autotools path used --enable-osce --enable-dred. The new path uses -DOPUS_DRED=ON -DOPUS_OSCE=ON. These match the variable names in Opus's CMakeLists from around the pinned commit (940d4e5), so they should be correct — but it's worth a quick sanity check against third_party/opus-rade's extracted CMakeLists.txt if you hit unexpected link errors on a clean build. This is the only point I'd verify if CI hasn't run the full matrix yet.

macOS universal — lipo paths

The old code referenced .libs/libopus.a (autotools output convention). The new code references <BINARY_DIR>/libopus.a (CMake ExternalProject convention). That's correct for the CMake build. The DEPENDS build_opus_arm build_opus_x86 wiring on the add_custom_command looks right.

Cross-compilation

The old code forwarded --host=${CMAKE_C_COMPILER_TARGET} to autotools. The new code passes CMAKE_TOOLCHAIN_FILE and CMAKE_C_COMPILER — which is the correct idiom for CMake-based cross builds. Looks fine.

Binary size

The 51 MB archive in git is acknowledged in the PR description. It's below GitHub's hard limit. One thing to consider for the future: a .gitattributes entry marking the .tar.gz as binary (-diff -merge) prevents git from attempting text diffs on it and can make git log -p less noisy. Not blocking, just a quality-of-life suggestion.

SHA256 verification

URL_HASH on the ExternalProject_Add calls is good — any corrupted or replaced archive will fail loudly at CMake configure time rather than producing a subtly broken build.

Scope

All 11 changed files are within the stated scope. No C++ source changes; the review checklist for AetherSDR conventions (AppSettings, RAII, C++20) doesn't apply here.

Overall this is ready to go once the maintainer is satisfied with CI results. Thanks for the contribution, @jensenpat!

@ten9876 ten9876 merged commit 022d704 into aethersdr:main Apr 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants