Implement hash-based test cache invalidation so incremental CI can safely write git notes without false positive cache hits.
Currently, incremental CI only tests changed files. If we wrote notes, a commit could appear to pass full CI when only 1 file was tested. Dependent files that might fail would never be caught.
A file's test is only valid if the file AND all its transitive dependencies haven't changed since the test ran.
1. Compute "test hash" for each file:
test-hash(Foo.hs) = sha256(content of Foo.hs + all transitive imports)
2. Store hash in git notes:
Test-is: good
Test-hash: a1b2c3d4...
Test-files: Omni/Foo.hs
3. On CI run:
Haskell: bild already parses imports via buildHsModuleGraph. Extend to:
Python: Need to parse imports. Could use:
import X, from X import Y)detectPythonImports in Bild.hsNix: Harder due to dynamic imports. Options:
import ./path.nix statementscallPackage patterns1. Omni/Bild.hs: Add getTransitiveDeps :: Namespace -> IO [Namespace]
2. Omni/Ci.hs:
3. Consider: Separate refs/notes/ci-hashes for hash data
Pipeline: build verification passed
Pipeline: integrated into live at 7b9403555964f7a7a37008530ab8b53947d5287a
Pipeline: dev completed (run=dev-t-471-1771529317, cost=0.0c)