1 major finding · 6 suggestions
Findings
[major] · Input-free builds now depend on both asset uploads
Nine matrix entries that consume no qa-assets now wait for preparation and can be skipped on its failure; unit-test consumers also depend on the complete fuzz-corpus upload.
Location: .github/workflows/ci.yml:421 (head).
Details and suggested fix
needs: test-assets gates all 23 expanded dependents until both datasets have been prepared and uploaded. This includes iwyu, tidy, 32-bit ARM, both macOS cross-builds, the three BSD cross-builds, and riscv32, which disable unit and fuzz tests. Previously these entries skipped asset acquisition entirely. A failure in either preparation or upload, or the producer's 30-minute timeout, now prevents those independent checks from running. The added wait is structural, but its duration and hosted skips were not measured or observed. Move input-free entries to an ungated matrix and give unit and fuzz consumers separate preparation dependencies, passing one selected qa-assets SHA to both producers. A condition on restoration alone cannot remove the job-level dependency.
Optional improvements
[suggestion] · Fresh fuzz consumers hash the corpus three times
Each fresh fuzz consumer hashes the restored corpus twice and the working copy once, adding a redundant full-byte pass whose wall-clock cost has not been measured.
Location: test/download_utils.py:166 (head).
Details and suggested fix
The restore action verifies every file before the build. download_fuzz_assets later repeats source verification, copies every file, and hashes the staged copy before renaming it. Keep the early failure and post-copy validation, but let the action explicitly mark its inputs as already verified so the helper can omit the second source-byte hash in that mode. Retain revision, inventory, and symlink checks, plus full validation of any existing working corpus. The staged hash comparison still rejects copied bytes that differ from the manifest; direct helper use should continue to perform full source verification.
[suggestion] · Standalone acquisition changes are buried in the artifact handoff commit
Commit 7e7d363410fd6b83baf6a225d819ce88403199c9 changes standalone download behavior alongside the Actions handoff, making the two independently testable changes harder to review separately.
Location: test/download_utils.py:145 at 7e7d363410fd (commit) (commit).
Details and suggested fix
With QA_ASSETS_DIR unset, 7e7d363410fd6b83baf6a225d819ce88403199c9 changes the download host, reuses existing JSON lists, publishes downloads through temporary files, and changes failure reporting. It also replaces shell and Windows acquisition commands with common Python helpers. Split those changes, their required imports and validation, the unit/fuzz CLI, and the caller updates into a preparatory commit whose message describes the behavior changes. Follow it with the manifest, prepared-input branches, restore action, mounts, and workflow handoff. The standalone preparation does not require artifacts, so this ordering preserves working intermediate states and leaves the final tree unchanged.
[suggestion] · Prepared-input rejection guarantees lack regression tests
The tooling has no tests distinguishing corrupt prepared inputs from valid ones, so weakened revision, inventory, or no-fallback checks could pass ordinary workflow execution.
Location: test/download_utils.py:82 (head).
Details and suggested fix
The workflow supplies matching manifests and files, so its success path does not exercise the rejection conditions in verify_qa_assets or preservation of a differing working corpus. Add a hermetic test that commits a temporary asset repository containing LICENSE, valid unit JSON, and a fuzz seed, then prepares and verifies it. Independently change a byte, add or remove a file, supply a wrong revision, and introduce a symlink, asserting rejection each time. With QA_ASSETS_DIR set, also assert that invalid prepared inputs never reach network acquisition and that a differing working corpus remains untouched. The current post-copy comparison already catches copy omissions; the missing coverage concerns rejection behavior and weakening of the checks themselves.
[suggestion] · Standalone Windows preparation silently keeps cached vectors
Standalone Windows preparations now reuse an existing JSON list, whereas the Python helper previously refreshed it and the README describes snapshots selected afresh each run.
Location: test/download_utils.py:142 (head).
Details and suggested fix
Without QA_ASSETS_DIR, rerunning either Windows preparation script in the same workspace returns at this check and keeps the earlier script_assets_test.json. Parsing it as a list establishes neither freshness nor a source revision, and the helper gives no reuse message. The shell already cached its inputs before this change; Actions uses the prepared-input branch, so this behavior change is confined to standalone Windows use. Document the reuse policy and how to refresh the cached file, and scope the README's fresh-snapshot statement to Actions.
[suggestion] · Prepared-input errors undergo network-style retries
Deterministic prepared-input failures incur ten retries and about 196 seconds of sleeps, although Actions normally catches initially corrupt artifacts earlier in the restore action.
Location: ci/test/03_test_script.sh:63 (head).
Details and suggested fix
With QA_ASSETS_DIR set, these helper calls only verify and copy local files. An existing differing working corpus or a persistent manifest mismatch cannot be repaired by rerunning the same command, but CI_RETRY_EXE executes it up to eleven times. Content mismatches can also repeat corpus hashing. This affects the documented local prepared workflow and failures arising after Actions restoration. Invoke the helper without the retry wrapper in prepared mode, retaining retries for direct network acquisition.
[suggestion] · Artifact selection duplicates the test-mode configuration
All current entries agree, but artifact selection uses an env-file-name convention instead of the test flags already sourced during configuration.
Location: .github/workflows/ci.yml:573 (head).
Details and suggested fix
contains(matrix.file-env, 'fuzz') selects the artifact, while 03_test_script.sh selects acquisition from RUN_FUZZ_TESTS and RUN_UNIT_TESTS. This requires readers and configuration changes to preserve two separate descriptions of the same mode. The preceding configure-environment action already sources 00_setup_env.sh; export its resolved RUN_FUZZ_TESTS through GITHUB_ENV and use that value to choose the artifact kind. This preserves current behavior without making filename spelling part of the mode contract.
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
The shared fuzz corpus serves deterministic regression coverage, which is distinct from continuous fuzzing's search for new coverage and rare failures.
In qa-assets issue #130, maflcko explicitly distinguished reasonable, deterministic CI inputs from continuous fuzzing. This explains why the affected CI paths acquire an existing corpus rather than generate all inputs anew. At the pinned head, the workflow distributes that corpus to platform consumers; this changes test-input delivery, not Bitcoin consensus or network behavior.
Asset preparation is necessary for meaningful script-vector coverage: successfully running the unit-test executable does not by itself establish that these external tests executed.
Issue #34670 documented Windows script_assets_tests doing no assertions when DIR_UNIT_TEST_DATA was unset. PR #34679 introduced the common Python acquisition helper, while #31576 made absent-asset execution visibly report as skipped. The pinned consumer still obtains its JSON through DIR_UNIT_TEST_DATA, so the shell and Windows acquisition paths affected here supply actual test coverage rather than merely optional download conveniences.
Source 1 · Source 2 · Source 3
Corpus acquisition and processing costs have historically been balanced against coverage, usability and contribution costs.
The qa-assets size discussion identified CI downloads as overhead, but also objected that compressed corpus storage would impair per-input tracking, deduplication and browsing. Later work reported smaller corpora and shorter iteration times, and #32083 justified shallow cloning because cloning was slow. These precedents explain the base's shallow fuzz clones and the longstanding incentive to avoid unnecessarily repeating large input transfers.
Source 1 · Source 2 · Source 3
The historical proposal for same-run asset sharing was to reduce repeated external requests, provide identical inputs to consumers and concentrate acquisition failures in preparation—not to eliminate the initial network dependency.
Issue #36814 reported several independent downloads failing with HTTP 504 before tests started, while another consumer eventually downloaded the same asset and passed. Its proposed dependent-job artifact handoff directly supplies the system-design motivation for the head's test-assets job and restore action, replacing the base's independent shell and Python downloads.
Integrity checking and permanent dependency pinning address different concerns; historical CI policy accepted corruption checks while resisting blanket hash pins because of update delays, review overhead and incomplete reproducibility.
In #35754, maflcko supported SDK hashes as protection against corruption not caught by curl, but distinguished that from pinning images and tools whose runtime dependencies remain mutable. A later comment explicitly identified delayed normal/security updates and recurring maintenance as costs. The pinned base README already records this distinction. The head's freshly selected qa-assets revision and generated file hashes can therefore be understood separately from a permanently committed dependency pin.
Source 1 · Source 2 · Source 3
Ralph's inferences
A fresh snapshot per run, held constant within that run, separates input freshness from cross-platform comparability.
The base independently fetched a moving branch or repository tip. The head selects one revision, exports it to consumers and checks the prepared file inventory and hashes. My interpretation is that this preserves ongoing corpus updates without requiring a source-tree pin bump, while removing independently selected snapshots as a source of within-run variation. The historical identical-input proposal and pin-maintenance discussion support this interpretation; they do not establish full reproducibility or authenticate the upstream corpus independently of the preparation environment.
Separating an immutable prepared corpus from writable fuzz working directories reconciles stable regression inputs with a stateful fuzzing workflow.
The inspected fuzz runner creates per-target directories, and its generation and merge modes write corpus state. At the head, containers mount prepared inputs read-only and the helper copies fuzz files into a distinct writable directory. I infer that this separates the reference snapshot from execution state, so local corpus changes need not redefine the shared inputs. Earlier discussion likewise distinguishes deterministic CI assets from evolving fuzz corpora, but does not document this exact implementation.
Unresolved disagreements
The inspected precursor discussion does not resolve whether the availability problem is best understood as avoidable repeated acquisition or primarily as an unreliable upstream host.
In #36814, jaromil distinguished intermittent asset-download failures from a total GitHub outage and favored an Actions-based handoff. maflcko argued that workflow changes cannot restore an unavailable upstream server and suggested changing the asset host if necessary. Contributor accessibility through permissionless hosted CI was also raised as a platform tradeoff. These positions delimit the historical motivation for sharing assets; neither establishes the present implementation's effectiveness.