4 suggestions
Optional improvements
[suggestion] · Linux stale-cache read coverage misses the Qt ≥ 6.6 AOT policy
The real smoke runs on Linux with Qt 6.4 and on macOS without read monitoring, leaving the Qt ≥ 6.6 AOT branch without a CI stale-cache-open check.
Location: test/CMakeLists.txt:11 (head).
Details and suggested fix
bitcoinqml_cache_policy_checks runs the Python monitor regression with launch() mocked out. The real application smoke runs only in artifacts.yml: Ubuntu 24.04 uses Qt 6.4 and therefore the disable-cache branch, while macOS skips inotify monitoring. The Qt 6.10 and depends jobs run CTest rather than this smoke. The C++ test verifies environment values, and the integration suite loads generated units, but neither checks access to a seeded stale cache. A regression in Qt's handling of those environment values could therefore escape these checks. Add the existing real smoke step to the Qt 6.10 Linux job, with BITCOIN_CORE_APP pointing to its built executable, so CI exercises stale-cache open/read detection under QML_DISK_CACHE=aot.
[suggestion] · Cache smoke test never confirms preinit.qml was loaded
The upgrade smoke accepts five seconds of process survival without confirming that preinit.qml loaded, so a startup stall before the load could make its stale-cache assertions pass vacuously.
Location: test/functional/qml_test_cache_policy.py:127 (head).
Details and suggested fix
launch() only polls for early process exit before terminating the application, but the upgrade fixture seeds a stale unit specifically for preinit.qml. If startup stalls before engine->load, or a later change skips onboarding for these arguments, the cache assertions can pass without exercising that document's cache lookup. Today the fresh explicit datadir selects onboarding, and a completed root-creation failure causes an exit that the smoke catches, so no current false pass is shown. Wait with a bounded timeout for an observable readiness signal emitted after the preinit root is created, and report captured output if it never arrives. Add an alive-but-not-ready control; the existing mocked read control verifies only the filesystem monitor.
[suggestion] · Cold-launch cache isolation relies on macOS default-path resolution
The cold smoke scans only its temporary root without explicitly placing the QML cache there, leaving its macOS cache isolation dependent on unverified default-path behavior.
Location: test/functional/qml_test_cache_policy.py:158 (head).
Details and suggested fix
launch() clears inherited QML_DISK_CACHE_PATH, and the cold call supplies no replacement. It relies on HOME and XDG_CACHE_HOME to keep Qt's default cache under the scanned temporary root. If macOS resolves that location elsewhere, the launch could use an existing cache or write outside the assertion's scope. Actual macOS resolution under this overridden HOME remains unverified, so no missed write is claimed. Pass an explicitly created empty directory such as root / "cold-cache" as cache_path, without force_host_cache, to make the fixture deterministic rather than platform-dependent.
[suggestion] · Top-level compat resource aliases are overwritten by the helper
The two top-level compat alias blocks duplicate values that the shared helper sets for every consumer, creating an inert second definition.
Location: CMakeLists.txt:104 (head).
Details and suggested fix
bitcoin_qml_add_application_sources() maps the selected compat files to qml/controls/<file> and sets QT_RESOURCE_ALIAS immediately before creating each module. This overwrites the top-level values for production and defines the properties in the test directories independently. The remaining manual resource file does not consume either compat QML file. Delete the two top-level set_source_files_properties blocks and keep the helper as the single alias definition; current resource URLs remain unchanged.