gunk-dev/the-valley

bd-5cb2034-unbounded-loops-under-demand-pressure.md

source57064e55f18fmain's published tip history
2.7 KiB · Rendered
1---
2type: bug
3id: bd-5cb2034
4status: open
5title: "Automatic redispatch needs cumulative budgets and limits on decomposition"
6created: 2026-09-01
7source: knowledge base design review, 2026-09-01
8---
9
10# Automatic redispatch needs cumulative budgets and limits on decomposition
11
12A scheduler that keeps redispatching unfinished work can spend resources indefinitely when a task
13cannot succeed. A scheduler that also lets runs create further dependencies can keep expanding the
14work beyond the original request.
15
16This is a design risk in the continuing reconciliation proposed by
17[[ida-3145b7a]](../ideas/ida-3145b7a-demand-pressure.md) and
18[[ida-eac723e]](../ideas/ida-eac723e-outcome-dag.md). The autonomous outcome scheduler is not yet
19implemented. The existing sketches mention budgets and loop limits, but do not define a complete
20cumulative enforcement mechanism.
21
22## Failure conditions
23
24A run may fail because its task is unsatisfiable, its environment is broken, or its output
25repeatedly fails verification. If lease expiry simply makes the same outcome eligible again, each
26individually budgeted run can start another individually budgeted run. Per-run limits do not bound
27their total cost.
28
29Decomposition can create a similar problem. A run adds prerequisite outcomes, those outcomes become
30eligible for dispatch, and later runs add more. Without limits or review, the graph can accumulate
31redundant work or drift from the intended result.
32
33These failures depend on the scheduler's retry and authorization rules. They are not inevitable
34consequences of representing dependencies as a graph.
35
36## Candidate controls
37
38- Enforce a shared spending or execution budget across runs, with a defined stop and reset
39 condition.
40- Count attempts per outcome and use backoff. Repeated failure should stop automatic retries and
41 request intervention.
42- Limit or require approval for decomposition, using limits on depth, breadth, or cumulative work.
43- Give persistently failing outcomes an explicit state that excludes them from automatic redispatch
44 until reviewed.
45
46Specific thresholds remain undecided. The limit must be enforced where dispatch or expenditure can
47actually be refused;
48[[ida-f1b39e8]](../ideas/ida-f1b39e8-outbound-effects-pass-through-an-actuator.md) is a possible
49part of that boundary.
50
51## Work needed
52
53Define how budgets apply across child outcomes, concurrent runs, retries, and controller restarts.
54Define how stopped work becomes eligible again.
55
56Then exercise repeated failure and recursive decomposition to show that the controller stops at the
57declared limits and reports the reason.
58[Feedback and incident memory](../../design/roadmap.md#phase-7--feedback-and-incident-memory) should
59preserve what was learned from those failures.