Skip to content

Commit f35cb07

Browse files
committed
docs(adr): ADR-0156 D5 renews only what the confirmation observed
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oyZgRX9Qc1ZHsMRQp
1 parent 8f788dc commit f35cb07

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎docs/adr/0156-compiled-metadata-answer-cache-every-source-counts-its-own-changes.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ What is cached is a result that every caller of the environment would receive be
6565

6666
When an entry's time bound passes, the cache first confirms that nothing it depends on moved: every in-process counter at its stamped value, and one read that observes the out-of-process writers the bound exists for (the stored rows). If nothing moved, the entry is kept for another bound. Only a moved counter or a moved store reading recompiles.
6767

68+
The confirmation must observe every out-of-process change D1 (b) names for the sources the entry read. ⛔ An entry that read a source the confirmation cannot observe (a loader reading files a deployment can edit under a running process, with no watcher telling this process) is recompiled at its bound and never renewed; or that source makes the cache decline. A renewal is a claim that nothing moved, and it may be made only about what was looked at.
69+
6870
The confirmation must be strictly cheaper than the compile it avoids; if it is not, the cache has no reason to exist. This clause is what makes the cache serve the customer's usual path (a reload after the bound) and not only a warm repeat.
6971

7072
### D6 — The knob is deployment config, and `0` is a real path
@@ -80,7 +82,8 @@ Per ADR-0127 D9, the implementing change carries, at least:
8082
- the registry populated after a hit (D4);
8183
- a source with its counter hidden makes the cache decline (D2);
8284
- at `0`, the uncached read sequence (D6);
83-
- on expiry with nothing moved, no recompile; with the store moved, a recompile (D5).
85+
- on expiry with nothing moved, no recompile; with the store moved, a recompile (D5);
86+
- an entry that read a source the confirmation cannot observe is recompiled at its bound, not renewed (D5).
8487

8588
A revocation-shaped pin asserts the end of the chain: the changed metadata is in the next answer, not merely that an entry was cleared.
8689

0 commit comments

Comments
 (0)