Skip to content

Fix ViennaRNA download and cache recovery in WASM builds - #292

Merged
martin-raden merged 4 commits into
feat/287-visualization-archivefrom
fix/291-wasm-build
Oct 23, 2026
Merged

martin-raden merged 4 commits into
feat/287-visualization-archivefrom
fix/291-wasm-build

Conversation

@Alexander-Mitrofanov

@Alexander-Mitrofanov Alexander-Mitrofanov commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

PR #291's WASM build stops before compilation because the university ViennaRNA download endpoint returns a 15-byte HTTP 200 text response instead of the pinned archive. The previous downloader also caches that response before checking its checksum, leaving subsequent builds stuck on the same invalid file.

Use ViennaRNA's official GitHub release asset for 2.7.0 with its SHA-256 pinned. The GitHub and university archives have different packaging/checksums; comparison of the enabled RNAlib C/C++ sources found no changes. Verify incoming files before promoting them into the cache, discard invalid cached archives, and remove partial downloads on failure. Add local-HTTP regression coverage to the WASM workflow and document cache recovery.

This follow-up targets feat/287-visualization-archive, the head branch of #291, so its diff contains only the build repair.

Validation:

  • python3 scripts/wasm/test-downloads.py: all 3 test groups pass, covering verified-cache reuse, corrupt/stale-cache recovery, HTTP 200 invalid bodies, 404 responses, truncated transfers and a successful retry.
  • npm test --prefix webinterface: all 12 groups pass.
  • Bash/Python syntax, workflow YAML and git diff --check: pass.
  • JOBS=4 bash scripts/wasm/build.sh with Emscripten 4.0.23: passes with fresh dependency sources/libraries and a fresh IntaRNA build. Seeded the download cache with the original 15-byte response to verify automatic recovery; the script downloads and verifies the official release asset successfully.
  • node scripts/wasm/smoke.mjs: native-reference coordinates/energies, accessibility, suboptimals and C++ error handling pass using the newly compiled engine.
  • node scripts/wasm/smoke-protocol.mjs: prediction/evaluation and all exported parameter replay checks pass, including byte-identical CSV, auxiliary outputs, probability SVG and text reports.
  • bash scripts/wasm/stage.sh: passes, including compiled-asset provenance/hash checks.

@martin-raden

Copy link
Copy Markdown
Member

@Alexander-Mitrofanov

thanks, please revise:

  • check whether the most recent viennarna version 2.7.2 can also be used for building the WASM
  • if so, use the most recent package version
    • if possible, rewrite the github action such that it always uses the most recent 2.* release from viennarna instead of a fixed version (version 3 is in preparation, thus ensure the most recent version 2)

Build WASM with the latest stable ViennaRNA 2.x
@martin-raden
martin-raden merged commit d7f0511 into feat/287-visualization-archive Oct 23, 2026
5 checks passed
@martin-raden
martin-raden deleted the fix/291-wasm-build branch October 23, 2026 08:30
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