Content-addressed result cache with dependency tracking for lanekeep.
A single-file, content-addressed store holding the violations, facts and tracked read dependencies of each file.
The cache is disposable by design: any read error means a cold recompute, never a failure. That is what makes a purpose-built on-disk format acceptable rather than reckless — nothing here can break a run, so the worst a format bug can do is cost time.
A hit needs two things
- The key matches — same engine, same host API, same grammar, same ruleset, same
config, same path, same bytes. See [
key]. - Every dependency still hashes the same — because
ctx.readFilelets a result depend on files other than the one being checked. See [validate].
The second is what makes the first safe. Without it a rule that read package.json would
keep its verdict after package.json changed, and nothing about the checked file would
have changed to say otherwise.
The asymmetry that shapes everything here
Over-invalidating costs a recompute. Under-invalidating reports a stale answer and gives no sign it did — the output looks exactly like a correct one. So every doubtful input goes in the key, one damaged entry discards the whole file, and a dependency that cannot be hashed counts as changed.