Kernel: a Role's Run that spent no model is counted apart from the Run ceiling (#757, record 0202)
Closes #757 ("A Run that ended environment does not use up the item's run ceiling"). It stacks on #770 ("A Run's outcome says whether its Engine step started"), whose two commits it carries, and is rebased onto main once #770 merges. This pull request was rebuilt in place by the Factory Builder's rulings of 2026-11-12: its first version counted every environment Run apart, under 20, as record 0196, a number main now holds for another record.
This changes config/defaults.json, a model Lens's input: the Maintainer approves it by hand as donpetry-bot, and the Factory never approves it. It is held factory:hands-off.
What changes
| Before | After | |
|---|---|---|
A Role's Run that ended environment before its Engine step started (engine_started false, record 0201) | Toward the Run ceiling, max_runs_per_item (10) | Toward max_environment_runs_per_item (30), counted apart |
A Role's Run GitHub started no job of, with no outcome (never_ran, decision 0116) | Toward the Run ceiling | Counted apart, with the above |
| A Role's Run that reached its Engine step, or does not say, whatever its outcome or reason | Toward the Run ceiling | Unchanged: an item can slow its own Run to engine_timeout or the step limit, both environment |
| An approval, resolution, enqueue or dequeue job that did not land, whatever its fault | Toward the Run ceiling | Unchanged: the automatic pause stops no act |
| The Hold at the new bound | — | environment_ceiling, named after the Run ceiling where both are reached, needs a person, asked what run_ceiling asks (config/feed.json); a writer's action renews both counts |
| The Lifecycle | — | max_environment_runs_per_item is a counter for each item (tools/check_lifecycle.py); a Hold at it from verifying, addressing and adjudicating names it |
The record is docs/decisions/0202-…. 0202 is the Factory Builder's number, after #770's 0201. Until 0197 to 0201 merge, the checks legs are red on "records are numbered from 0001 with no gap", and nothing else fails. The number is confirmed before the final push.
Why 30, and why only Runs that never reached the Engine
A Run that failed before its Engine step spent runner minutes and no model, so its bound may be set above the cost ceiling. It only has to end a cause that never lapses on one item, which the automatic pause, needing faults on 2 items, cannot see. This pull request's first version counted every environment Run apart. Its security pass showed that an item can cause environment itself after the model has read it, which would have let a slow or hostile item buy model Runs past FR-39's ceiling. #770 makes the run record say whether the Engine step started, and only a Run that never reached it moves apart.
Checks
- Boundary tests, written first and watched failing:
tests/test_decide.py::test_a_run_that_spent_no_model_is_counted_apart_from_the_run_ceiling. It covers ten such Runs admissible once the automatic pause lapses and waiting while it holds; ten that count still holding at the ceiling; anenvironmentRun that reached the Engine, or does not say, counting toward the ceiling; the bound apart, its edge, its renewal, and its order against the ceiling; and every act's job. An issue's Hold at the bound calls a person (tests/test_issue.py). The transitions explore eleven new bases and a move for pull requests, and a base and a move for issues, "a Run fails before its Engine step", which reach the Hold from verifying, addressing and adjudicating. - Tests that filled the run ceiling with
environmentRuns now usecapacityRuns, which still count.tests/test_adapters.py's first-attemptskippedcase now finds that Run under the bound apart. - The simulators' ceiling invariants count the two kinds apart, and
CEILINGSnames the new Hold. - 28 new mutants and 4 retargeted, each killed; every mutant of
kernel/brakes.py(59) is killed.make checksis clean but for the provisional numbers. - About 38,000 changed characters on its own. Until #770 merges, the diff also carries #770's.
Protected paths
kernel/brakes.py, config/defaults.json, config/feed.json, lifecycle/, sim/, tests/, tools/ and docs/decisions/ are protected or reported paths: pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder (its rulings of 2026-11-12 on #757). config/defaults.json is a model Lens's input, so the Maintainer approves this pull request by hand.
Reviews
Read on this version, and on the first version's head bf5c7dca where they bear on the counting part, which this change keeps:
| Reader | Head | Findings | Disposition |
|---|---|---|---|
| Claude security pass | d6e5a751 | 0 | clean |
| Claude review | d6e5a751 | 1 major, 1 minor | Fixed in 9c26a754: a Hold at the bound by a Lens or the platform from verifying is declared, each with a mutant; the simulators now make Runs that failed before the Engine and Runs that never started, by the count of Runs, so no seed draws differently |
| Muse (muse-wonder-full-1.0) | 9c26a754 | 1 major | Fixed in d655492c: the Hold at the bound from addressing, adjudicating, converged and queued by the platform, and from adjudicating by a Lens, is declared, and so is a Lens taking the item out of it, each with a mutant and a base that reaches it |
| Claude security pass, first version | bf5c7dca | 1 major, 1 minor | The item-caused environment gap: resolved by design. Only a Run whose Engine step never started moves apart (records 0201 and 0202). token_not_revoked comes after the Engine, so it counts toward the ceiling |
| Claude review, first version | bf5c7dca | 3 minor, 1 info | Fixed: enqueue and dequeue jobs are tested, with a mutant each; the order of the two bounds is tested, with a mutant; the design and L-03 say which bound a Run that spent no model counts toward; the simulator's CEILINGS names the new Hold |
| Muse (muse-wonder-full-1.0), first version | bf5c7dca | 1 major, 2 minor | Fixed: a resolution's job is tested, with a mutant; the order of the bounds; CEILINGS |
| Carbon (gemini-4-carbon-high) | 51d199e8 | 7 major, 3 minor; part 8 of 12 came back empty and was read again: 1 major, the issue exploration, fixed in 44dbc701 with Astra's | Fixed in 10230a4e: a Run of any outcome but environment beside engine_started false, and a Run with no outcome that GitHub started, each count toward the ceiling, with a mutant; an approval's job has a mutant of its own; the question a person is asked at the bound is tested against run_ceiling's, with a mutant; an issue's bound apart is tested (one short, at it, both reached, renewed); L-03 names the boundary test; the test's cases carry engine_started false where they mean to. The Lifecycle findings were fixed in 9c26a754 and d655492c |
| Astra (gpt-6-astra) | 10230a4e | 1 major | Fixed in 44dbc701: the issue exploration has a base one Run short of the bound apart and a move, "the oldest Run in flight fails before its Engine step"; it reaches environment_ceiling by the Factory's Hold from triage, which the issue Lifecycle declares, and the brakes' Holds an outsider's edit reads past include it. The issue Lifecycle names no counter on any Hold, the Run ceiling's among them, since only a person leaves one |
🤖 Generated with Claude Code