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
No activity yet.