ci(core): avoid rehashing the screenshots
What changed, and why it matters
This is a small internal CI script cleanup. It removes an unused import and switches from manually re-computing a file hash to using a hash that was already computed and stored in the test result object. There is no user-facing change and no security relevance.
No security action needed. This is a routine CI maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies ci/prepare_ui_artifacts.py. It removes the import of _hash_files from tests.ui_tests.common and instead uses result.actual_hash, which is already available on the TestResult object. This avoids redundant hashing of screenshot directories during CI artifact preparation. The change is purely a refactoring/optimization in test infrastructure code.
Changed components
ci/prepare_ui_artifacts.pyInspect captured patch +2 / −4
diff --git a/ci/prepare_ui_artifacts.py b/ci/prepare_ui_artifacts.py
index 74d0a580..a613b380 100644
--- a/ci/prepare_ui_artifacts.py
+++ b/ci/prepare_ui_artifacts.py
@@ -5,9 +5,7 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(ROOT))
-# Needed for setup purposes, filling the FILE_HASHES dict
-from tests.ui_tests.common import TestResult, _hash_files # isort:skip
-from tests.ui_tests.common import get_current_fixtures # isort:skip
+from tests.ui_tests.common import TestResult, get_current_fixtures # isort:skip
FIXTURES = get_current_fixtures()
@@ -17,7 +15,7 @@ def compute_hash(result: TestResult) -> TestResult | None:
print("WARNING: skipping failed test", result.test.id)
return None
- actual_hash = _hash_files(result.test.actual_dir)
+ actual_hash = result.actual_hash
expected_hash = (
FIXTURES.get(result.test.model, {})
.get(result.test.group, {})
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.