Review report

bitcoin-core/gui-qml: PR #863

4 suggestions

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Linux stale-cache monitoring misses the Qt ≥ 6.6 AOT policy

The configured CI jobs never run the Linux stale-cache open/read detector against the QML_DISK_CACHE=aot branch used by Qt ≥ 6.6 builds.

Location: .github/workflows/artifacts.yml:66 (head).

Details and suggested fix

The real smoke runs only in artifacts.yml, whose Linux job uses Ubuntu 24.04 distro Qt, identified as Qt 6.4 in ci.yml. That exercises the disable-cache branch. The macOS job skips read monitoring, and the newer Linux jobs run CTest, whose Python cache-policy entry mocks launch(); the C++ policy test checks environment values only. Add the existing smoke step to the Linux Qt 6.10 job with BITCOIN_CORE_APP pointing to its built executable. This would check actual stale-file access under the AOT policy rather than only the selected environment values. Whether Qt 6.4 honors the fixture's cache path and computed filename remains unverified.


Link

[suggestion] · Cache smoke can pass before its watched QML document loads

Five seconds of process survival does not establish that preinit.qml loaded, so the smoke can pass without exercising the cache lookup it intends to test.

Location: test/functional/qml_test_cache_policy.py:127 (head).

Details and suggested fix

launch() only rejects an early process exit, then terminates the child and discards its output. A live process stalled before engine->load therefore satisfies the cache-inactivity assertions. The fresh explicit datadir normally selects onboarding because qml_onboarded defaults to false, and failed root creation produces an exit the smoke rejects; no current false pass is established. Wait with a bounded timeout for an acknowledgment emitted after the preinit root exists, report captured output if it never arrives, and add an alive-but-not-ready control that must fail. The read-only mocked control validates inotify, not Qt's lookup path; an optional policy-bypassed positive control could also validate the hard-coded cache filename, which is not established to be wrong.


Link

[suggestion] · Forced AOT leaves the documented disable-cache setting inert

On Qt ≥ 6.6, the application removes QML_DISABLE_DISK_CACHE, so the README integration commands and shared CTest environment still advertise a setting that no longer affects the QML-loading executables.

Location: qml/qmlcachepolicy.cpp:17 (head).

Details and suggested fix

ConfigureQmlCachePolicy() unconditionally removes QML_DISABLE_DISK_CACHE and replaces QML_DISK_CACHE with aot on Qt 6.6 and newer. Both the component runner and integration children apply this policy, so their inherited disable-cache setting is silently discarded and cannot serve as an explicit AOT opt-out. Retain forced AOT to keep these tests exercising generated units, but document the environment override and remove the inert setting from the README commands and the environments of executables that apply the policy. Unit and bootstrap tests can keep their existing setting. This resolves the inconsistency without changing the deployment policy or relying on unverified alternative Qt opt-out semantics.


Link

[suggestion] · Compat resource aliases are defined twice

The top-level compat alias assignments duplicate values that the shared helper sets before every QML-module call, leaving two definitions of the same mapping.

Location: CMakeLists.txt:104 (head).

Details and suggested fix

The two set_source_files_properties blocks map the selected compat files to qml/controls/AppSettings.qml and qml/controls/BitcoinAmountDigit.qml. Every consumer then calls bitcoin_qml_add_application_sources(), which derives and assigns those same aliases before qt6_add_qml_module. The remaining manual resource file does not consume these QML files. Remove the two top-level property blocks and keep the helper as the single definition of the mapping; the resource URLs remain unchanged.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.