Ray's Knowledge Base
Unlock

rvow hooks cache nothing that could turn enforcement off or hide drift

DecisionVerified 5 Nov 2026Holds project: rvow
Decision. The context, the choice, why, and the options that were turned down.

Context#

A performance change added caches to the hooks, gate and daemon. Independent reviews found that some could give a wrong answer.

Decision#

Remove these caches:

  • the "no store here" cache (a store can arrive later by git pull, or from an older rvow);
  • the base_ref cache (the base branch can move while HEAD does not);
  • the env command cache (it does not see a tool upgrade);
  • the empty-tree id cache (it saves one git call).

Keep the caches that cannot switch enforcement off. Do not trust a file that changed in the last 2 seconds (the rule git uses for its index). Keep three tests that a store made after a miss is found, so no later cache brings the bug back.

Why#

Correct enforcement comes before speed. A stale "no store" answer means the hooks do not enforce, with no warning. A stamp file in the home folder did not close the gap, and no cheap check was always right.

Rejected options#

  • A stamp file touched on each store creation, checked on a cached miss: a store from git pull still hid.

Also found by searching

  • can the hook cache that there is no rvow store here
  • why did rvow drop the base_ref cache
  • which caches are safe in rvow hooks