diff --git a/internal/engine/phase.go b/internal/engine/phase.go index 610ade7..a5cbf18 100644 --- a/internal/engine/phase.go +++ b/internal/engine/phase.go @@ -46,15 +46,8 @@ const phaseStatusSkipped = "skipped" // attempt. Every send is checked against it before the subprocess starts, and // exceeding it ends the attempt with its own terminal cause. // -// TODO(protocol): WorstCaseSendCount understates the ladder. The constant in -// internal/protocol declares gate_budget × parse_budget = 6 and is referenced -// by no code; the ladder the engine actually walks is -// parse(budget+1 emissions) × gate(budget+1 emissions) × crash -// re-entries(budget+1) × repair edge(budget+1 self runs plus budget target -// dispatches) — roughly 252 sends for a single phase at budget 3, and more -// once several phases carry edges. Until that constant is corrected (it lives -// in a package this pass does not own) the real bound is the one enforced -// here. +// This is the real upper bound on sends within one attempt; the parse, gate, +// crash-reentry and repair-edge ladders all count against it. const defaultMaxAttemptSends = 64 // maxPhaseEnvelopeBytes caps the envelope blob one phase result may embed in diff --git a/internal/protocol/limits.go b/internal/protocol/limits.go index d44be43..98f1319 100644 --- a/internal/protocol/limits.go +++ b/internal/protocol/limits.go @@ -77,13 +77,6 @@ const ( // emissions a gate violation may request before the phase fails (R7, R9). DefaultPhaseRetryBudget = 2 - // WorstCaseSendCount is the maximum number of prompt sends one phase can - // issue at the default budgets: gate_budget × parse_budget, because every - // gate correction opens a fresh per-emission parse budget. A definition - // that raises either budget raises this product; the per-attempt - // wall-clock ceiling bounds total cost regardless. - WorstCaseSendCount = DefaultPhaseRetryBudget * ParseBudgetPerEmission - // DefaultPhaseTimeout is the wall-clock ceiling for a single phase. A // phase that exceeds it is killed by process group, consumes one phase // retry, and restarts from the pre-phase snapshot with a fresh session