From 126b5c119ccb568284b425094aadac4d7c735a7f Mon Sep 17 00:00:00 2001 From: DanGould Date: Tue, 4 Aug 2026 17:42:06 +0800 Subject: [PATCH] Trigger JavaScript CI on dependency manifest changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The JavaScript workflow is the only place the tree is compiled for wasm32-unknown-unknown. It builds through payjoin-ffi's `wasm_js` feature, which resolves to `getrandom/js` — the browser entropy backend behind the input/output shuffle in payjoin/src/core/receive/common/mod.rs. That backend is supplied entirely by the dependency graph, so a dependency bump can drop it without touching a single file under payjoin-ffi/ and the workflow's path filter would skip the build. The concrete case ahead of us is bitcoin 0.33, which moves rand 0.8 -> 0.9 and getrandom 0.2 -> 0.3, where the `js` feature is replaced by `wasm_js` *plus* a required RUSTFLAGS='--cfg getrandom_backend="wasm_js"'. A feature-only declaration silently stops being sufficient. Gate on the manifests and the lockfile so any dependency change runs the wasm build. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/javascript.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index c116525ca..8f9705f38 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -12,6 +12,15 @@ on: # change this workflow's environment. - flake.nix - flake.lock + # This is the only workflow that compiles for wasm32-unknown-unknown, + # and the wasm build pulls in the core crates via payjoin-ffi's + # `wasm_js` feature (-> `getrandom/js`), which is what supplies + # browser entropy for the input/output shuffle in + # payjoin/src/core/receive/common/mod.rs. A dependency bump can drop + # that backend without touching payjoin-ffi/, so gate on the + # manifests and the lockfile as well. + - "**/Cargo.toml" + - Cargo.lock jobs: build-js-and-test: