Repository navigation
Description
Problem
FastLED's test entry point checks fingerprints for every scope up front, then calls FingerprintManager.save_all(status) once at the end. That stamps every checked scope with the invocation's final status, including scopes that the selected command never executed.
For example:
- Change inputs covered by the C++ and Python fingerprints.
- Run
bash test --py. test.pychecksall,cpp,examples,python, andwasmfingerprints while planning the run.- Only Python tests execute.
- The final
save_all("success")writes success for every fingerprint collected during planning. - A subsequent
bash test --cppcan report that there is nothing to run even though no C++ build/test validated the changed inputs.
This caused a false-green incremental result while validating #4528; a forced clean combined rebuild then compiled all affected targets.
Relevant code:
test.py:448-494: constructs the manager and checks all scopes during planning.test.py:745: applies one final status throughsave_all(status).ci/util/fingerprint.py:141-180:check()records calculated scopes andsave_all()marks every recorded scope with the same status.
Ownership
FastLED should fix its call pattern so only operations that actually ran can receive a new success stamp. The zccache API could also be hardened against this class of misuse; that upstream discussion is tracked in forge-ci/zccache#1650.
This issue is intentionally local/actionable even if upstream changes: callers must not certify work they did not execute.
Suggested direction
Track scope execution separately from scope checking/planning, then persist status only for executed scopes. Cache hits may preserve prior successful metadata, but must not advance or replace a scope's validation record because an unrelated scope passed.
Avoid treating a global process exit code as evidence for every planned fingerprint.
Acceptance criteria
- Add a regression that changes both Python- and C++-covered inputs, runs the Python-only path, then proves the C++ path still requires execution.
- Add the inverse/mixed-scope coverage needed to prevent one selected test mode from certifying another.
- A failed selected scope must not overwrite unrelated scopes' last-known-good records.
- Existing legitimate cache hits keep their prior metadata and remain skippable.
bash test --py,bash test --cpp, and the fingerprint-focused CI tests pass.- Documentation distinguishes "checked/planned," "executed," and "persisted successful" scopes.
Reproduction evidence
The behavior was reproduced directly through the manager lifecycle and in the real command sequence during #4528 validation. The clean native gate subsequently passed 311/311 unit suites and 95/95 host examples, confirming the initial "nothing to run" result was a bookkeeping false green rather than proof those targets had run.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Sep 24, 2026
Investigation: this is a selective-persistence bug, not a missing database dimension.
The test entry point already stores separate JSON records in
.cache/fingerprint/:cpp_test_<build_mode>.json,examples_<build_mode>.json,python_test.json,wasm.json, andall.json(ci/util/fingerprint.py::_get_fingerprint_file). C++ and example records also separate quick/debug/release modes. Lint has separatecpp_lint.jsonandpython_lint.jsonthroughTwoLayerFingerprintCache; each lint stage checks and marks its own record. There is no shared test/lint success bit that requires a consolidated DB.The failure is that
test.pychecks all five test records during planning, whileFingerprintManager.check()(and the mtime fast path) put every checked value in_fingerprints. The finalsave_all(status)then rewrites every one with the invocation status. Thusbash test --pycan certify changed C++/examples/WASM inputs; a failed Python run can also mark unrelated good scopes failed. The separate files already contain the right granularity, but the write path discards it.Recommended local fix:
save_all(status)at the test entry point with explicit per-scope completion/commit. Checking a fingerprint means only "planned"; a successful record should be written only after its corresponding full scope actually completed successfully. On a cache hit, leave the previous successful file untouched (including metadata and the start-of-run mtime watermark). If the invocation fails, do not rewrite unrelated scopes. A failed executed scope may be recorded as failed, or its prior record may be left intact if the changed hash still forces a retry.--unitvalidates C++ unit tests,--examplesvalidates examples, and--cppcan validate both through Meson; do not infer example success merely because the C++ process was selected. The--fullprocess-group path also needs explicit completion reporting. Keep the existing guard against persisting filtered test/example runs as full coverage.all.jsonas a derived/default-run summary or remove it from the no-argument early-exit prerequisite. There is noalloperation in the active normal runner to commit independently. The no-argument early exit inci/early_exit_cache.pycurrently checksall, C++, examples, and Python but reports WASM skipped without checkingwasm.json; include a validated WASM record in that gate. Avoid refreshing any record on a skipped run.save_allmay already claim work that never ran. Add cross-mode regressions: changed Python + C++ inputs followed by--pymust still require--cpp; test the inverse and WASM/examples; failures and cache hits must leave unrelated records intact.No new combined fingerprint database or sophisticated change-measurement scheme is needed for #4550. Shared
src/hashing is already memoized per process inci/util/test_types.py::_hash_directory; measuring only selected scopes could be a separate performance cleanup. The minimal correctness change is to stop using blanketsave_alland commit only the scopes proven by completed work.fix(ci): persist only completed fingerprint scopes (#4553)
chore(ci): measure observed Actions runner time across workflows (#4546)