gunk-dev/the-valley

bd-c324184-occ-starvation-under-contention.md

sourcedfb348e147ebmain's published tip history
2.7 KiB · Rendered
1---
2type: bug
3id: bd-c324184
4status: open
5title: "Repeated changes to shared check inputs can starve pending work"
6created: 2026-09-01
7source: knowledge base design review, 2026-09-01
8---
9
10# Repeated changes to shared check inputs can starve pending work
11
12A pending change can repeatedly lose usable check evidence if other landings keep changing the
13inputs its checks depend on. When producing fresh evidence takes longer than the interval between
14those invalidations, the change may make no progress toward integration.
15
16This is a possible starvation condition in the optimistic integration rules of
17[[dcr-439b771]](../decisions/dcr-439b771-integration-occ-over-content-addressed-evidence.md). It
18depends on overlap between check inputs, landing order, and verification time. Concurrent
19contributions alone do not establish starvation.
20
21## How it occurs
22
23The integrator compares each pure check's attested input-closure digest with the digest for the
24candidate tree.
25
26A change to a shared dependency, root schema, or build helper can alter that digest for several
27pending changes. A broad source closure may make even a small edit relevant to many checks. Only
28checks whose inputs change become stale.
29
30For example, A lands while B and C are being checked. Both need fresh evidence because A changed
31shared inputs. B finishes and lands first. If B also changes inputs used by C, C must repeat the
32work again. Continued invalidation of that kind can prevent C from landing.
33
34A clean textual merge does not avoid the problem. The check may depend on files that do not overlap
35the proposed edit.
36
37## Evidence needed
38
39The graph identifies the failure condition but does not establish its frequency in the deployed
40system. Useful measurements include invalidations per request, repeated invalidations of the same
41request, time spent producing fresh evidence, and which inputs cause the churn.
42
43## Candidate responses
44
45Batch pending changes into a candidate tree that can be checked together. This needs an execution
46arrangement outside the integrator's serialized decision step.
47
48Narrow input closures where the true dependencies permit it. Omitting a real dependency would make
49evidence reuse unsound.
50
51Give repeatedly invalidated work a bounded reservation or other fairness rule. This can improve its
52chance of landing but delays competing work.
53
54Share builders and caches to reduce the cost of producing fresh evidence. That can shorten the
55vulnerable interval without guaranteeing fairness on its own.
56
57The queue policy remains undecided. [integration.md](../../design/integration.md) and
58[requirements.md](../../design/requirements.md) provide the protocol and latency requirements
59against which to evaluate it.