Review report

bitcoin/bitcoin: PR #36082

5 suggestions

Optional improvements

Link

[suggestion] · Guix CI adds undocumented substitute trust and a mandatory key fetch

CI trusts an externally operated signing key without documenting its operator, and fetching that pinned key on every run makes the primary substitute server an installation dependency.

Location: .github/install-guix.sh:36 (head).

Details and suggested fix

The hash check authenticates the downloaded key, but it does not constrain what its holder can sign. Authorizing it trusts that holder to supply toolchains used for the tested binaries, which can also influence the writable BASE_CACHE saved on successful default-branch pushes. Document the operator and CI trust model, including whether guix2.fish.foo uses the same key; the repository currently establishes neither. This is a CI trust decision, not a demonstrated compromise or a change to release builds.

Commit the pinned public key and retain its hash check to remove the runtime fetch without changing the trust decision. Currently, a primary-server outage after retries aborts installation under errexit, before --fallback can help. Missing substitutes instead require source builds within the 360-minute job budget; the cold-build duration is unknown. If key rotation should invalidate built-depends caches, include the key hash in both the primary cache key and restore prefix, since changing only the primary key still admits older entries.


Link

[suggestion] · One host's build failure skips all Guix binary tests

Default build-matrix fail-fast cancels unfinished sibling builds, while needs: guix skips every native test leg after any build failure, even when other hosts uploaded their packages.

Location: .github/workflows/guix.yml:49 (head).

Details and suggested fix

A host-specific SDK download error or build failure triggers GitHub's default fail-fast: true for guix. The test matrix depends on the entire build matrix, so its own fail-fast: false cannot preserve testing after a build leg fails. Cancelled build legs also miss subsequent cache-save steps on eligible default-branch pushes. Set fail-fast: false on the build matrix and decouple each host's tests from unrelated build failures, for example with separate build and test jobs per host. Keeping the current behavior saves runner time for failures shared by all hosts, but sacrifices independent host results.


Link

[suggestion] · Guix functional-test failures do not preserve node logs

The functional run omits --combinedlogslen and uploads no failed-test directories, so node debug logs are unavailable after the CI runner is discarded.

Location: .github/ci-guix-test.py:75 (head).

Details and suggested fix

test_runner.py defaults --combinedlogslen to zero. It prints a failed test's captured stdout and stderr, but only appends the combined framework and node logs when that option is nonzero. Retaining the failed-test directory locally does not help after this workflow discards the runner, since no step uploads it. Add --combinedlogslen=99999999, as the existing CI functional-test callers do, so failures specific to the Guix release binaries retain their node-log diagnostics without changing the tests or binaries selected.


Link

[suggestion] · The macOS SDK download has no transient-failure recovery

On an SDK cache miss, one transient download error fails the darwin build because this fetch bypasses the configured CI retry helper.

Location: .github/workflows/guix.yml:116 (head).

Details and suggested fix

The new SDK step invokes plain curl --location --fail, unlike the downloads in install-guix.sh and the equivalent SDK fetch in ci/test/01_base_install.sh. Sourcing the macOS setup file does not add retries. A transfer error therefore fails this build immediately and, with the current matrix settings, cancels unfinished sibling builds and skips the native tests. Invoke "$CI_RETRY_EXE" curl --location --fail ... here, leaving checksum verification and extraction unchanged.


Link

[suggestion] · The macOS SDK cache can accumulate obsolete SDK versions

After an SDK-name change, restoring an older cache and saving the whole SDK directory preserves obsolete versions, increasing cache usage and transfer time.

Location: .github/workflows/guix.yml:105 (head).

Details and suggested fix

The guix-macos-sdk- restore prefix admits caches from earlier Xcode versions or build IDs. Installation adds the current SDK beside any restored versions without removing them, and a successful default-branch cache miss saves all of SDK_PATH under the new key. Repeating this sequence carries obsolete SDKs forward even though guix-build selects only the current path from darwin.mk. Prune directories other than $sdk_name before saving. The cost arises on SDK-name changes when an older cache is restored and the run reaches the save step; exact hits and cache eviction can interrupt accumulation.


Coverage details