You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kernel: an issue's ceilings are asked about the Run it wants, not the Run in flight #171
Part of the epic "Epic: slice 0, foundations. The repo holds the line, its context is tested, and the platform facts are recorded".
Why. Found by the review of #169, "Kernel: under a Pause, a spent count holds the item with no Run in flight too".
With a Run in flight, kernel/issue.py (about lines 640-646) asks the ceilings about the Intent of the Run in flight, not about the Run the State wants now. The pull-request side asks about the wanted Run (#158's ruling 1, #169's ruling 3). So an issue whose State no longer wants that Run is held at the Run ceiling while the Run waits, then leaves the Hold when it completes. Nobody acts.
Example.
label_events: ACCEPTED + [labelled(READY, minute=30), unlabelled(READY, minute=31)]. A person added factory:ready and then removed it.
Runs: one investigation completed at minute 3, then max_runs_per_item - 1judge-readiness Runs failed with outcome="environment", then one judge-readiness Run queued at minute 40.
Case
Gives
While the Run is queued, paused or not
held / run_ceiling / hold / needs_you
With no Run in flight
triage / ready_removed / nothing
Once the queued Run completes
triage / ready_removed / nothing
The last row is held → triage with no person. lifecycle/issue.json declares that move only by a person. test_transitions.py's issue exploration is synthetic, so no test catches it. Without a Pause, the merge base c094a8b already makes this move.
Done when
issue.decide asks the ceilings, while a Run is in flight, about the Run or act the State wants now, as the pull-request side does. Where no Run is wanted, the Run ceiling holds nothing.
A boundary test for the example above, with both sides, and a mutant.
Solution Architect, delegated. On main at c094a8b (#170), with #172 (kernel/pause-holds-spent-count at 1660755) and #165 (kernel/issue-stale at dd61adc) applied, since this lands after both.
The cause. While a Run is in flight, issue.decide asks brakes.on_run once for each Run in flight, using that Run's Intent, and keeps any Hold. It never asks what the issue's State wants now. decide.py asks the ceilings about _wanted_run(state, reason), and asks none when that gives None (#158's ruling 1, #169's ruling 3). So on an issue, the Run in flight can hold an issue whose State wants no Run. The Hold then ends when that Run completes, with no person. That is the Factory leaving held, which lifecycle/issue.json lists in person_only_exits.
The issue's example reproduces on the copy. With the Run queued, paused or not, it gives held / run_ceiling / hold / needs_you. With none in flight, and once the Run completes, it gives triage / ready_removed / nothing. But the example's facts cannot occur. A person who removes factory:ready has acted, so last_writer_action_at is minute 31 or later, and every Run started before it drops out of the count. Correct that one fact and the issue reads triage / triage / nothing / working with the Run queued, and admits an investigation without it. There is no Hold. The example stays as a boundary test of what the Kernel reads, but it needs a real case beside it.
A real case exists. Take an outsider's admitted issue in triage, one Run short of the Run ceiling. A readiness Run is admitted. The next pass does not see it, because it is listed late (P-22) or listed without its name (P-17), so the pass admits it again. The first Run fails, which reaches the ceiling. The outsider then edits the issue. Acceptance lapses, and derive gives new / acceptance_lapsed, which wants no Run. Today, while the second Run is queued, the issue reads held / run_ceiling: the ceiling of a readiness Run nobody wants. When that Run completes, the issue reads new. On the copy, a rough exploration of the issue found this as new → held by factory, which the Lifecycle does not declare. With ruling 1 it reads new / acceptance_lapsed / nothing / working, and then needs_you.
1. While a Run is in flight, the ceilings are asked about the Run the State wants. Find that Run the way the no-flight path finds it. Then ask brakes.run_ceilings on its own, with that Run's Intent and the Runs completed since a writer acted, as decide.py does. In kernel/issue.py:
Move the checks between the flight check and _wanted into one helper, _run_wanted(facts, state, reason, evidence, mine, config). These are: in review or a linked draft; issues.intents unreadable; two Intents sharing a Role; two sharing an App. The helper returns _wanted's (role, intent, carried), or the Decision that admits nothing. The no-flight path calls it and behaves as it does now.
The comment above the block says three things. A Run in flight admits nothing. The ceilings are asked on their own, about the Run the State wants. None is asked where no Run is wanted. decide.py and brakes.py are not edited.
Why: §4.1 says "The Kernel holds an item at a ceiling only while the action that ceiling bounds is wanted". apply already asks the question this way. It asks the Kernel again with its own Run left out (I-38), which is the no-flight path, and that path asks about the wanted Run. The reading while a Run is in flight should match the answer apply will get. Call run_ceilings, not on_run, as decide.py does. After #172, on_run gives the same Holds, but it also reads the Pause, which a Run in flight must never show. _wanted reads nothing that a Run in flight wrote. That Run's record is kept and has not succeeded, so neither its comment nor its label stands in for a completed Run.
2. An issue State that wants no Run is not held by the Run ceiling, with a Run in flight or without one. These States want no Run:
new, which wants at most one act, accept;
in_review;
in_progress / linked_draft;
any State for which _run_wanted gives a Decision: judged, ready_removed, no_statement, intent_undeclared, branch_unreadable, and the three intents_* deferrals.
With no Run in flight, each of these gives what it gives now. With a Run in flight, each gives working. in_progress / opening_run does want a Run, the opening Run, because _wanted reaches its opening branch. So spent opening attempts still hold it while the opening Run waits.
Why: the Run ceiling is the cost ceiling (FR-39), and an item that wants no Run spends nothing. This is the same rule as #169's ruling 3, so the two item types read alike. No person is left out. Each of these States that needs a person already says so with no Run in flight: acceptance_lapsed, judged, ready_removed, no_statement, intent_undeclared and the intents_* reasons are all in NEEDS_YOU_REASONS. Only a Run in flight hides that, and only while it runs.
One assertion changes. tests/test_issue.py::test_opening_attempts_are_bounded_and_hold_even_while_an_opening_run_is_in_flight ends with "The brakes' Hold on a Run in flight does not wait on its Intent being declared". Its facts are: opening attempts spent, the opening Run queued, and opening set to null. It expects held / attempts_exhausted. With no Run in flight, the same facts read ready / intent_undeclared / nothing / needs_you. So that Hold is exactly the split this issue closes. The assertion becomes in_progress / opening_run / nothing / working. The lines above it, where the Intent is declared, still give held / attempts_exhausted. Decision 0031's row naming this test still reads true: a Run in flight hides no Hold the issue would have without it.
§4.1's derivation table puts "or its Run ceiling is reached" in row 4, above row 5's "not accepted". Change it to "or its Run ceiling is reached while it wants a Run (decision 0003)". The Kernel already reads it this way when no Run is in flight; the text should say so. This changes the wording of a design rule, not the rule, so it needs no record.
3. An outsider's edit may take a ceiling-held issue to new. Derive's row 5 is read before the brakes. So when an outsider edits an admitted issue that is held at a ceiling, the issue becomes new / acceptance_lapsed / nothing / needs_you. That is held → new, made by someone who is not a person, and it stays. Why: §4.1 says that after the outsider's edit the issue is new again "whatever Factory labels it carries". A Hold of the brakes is a reading, not a label. Nothing is admitted in new, and the issue is assigned to the Maintainer. The spent count stands until a person with write access acts, and admitting the issue again is such an act. person_only_exits stays true of the data: no transition out of held is declared for anyone but human. The exploration in ruling 6 asserts the narrower rule that does hold: an outsider moves an issue only to new, with acceptance_lapsed.
4. Boundary tests, written first. In tests/test_issue.py, in a class WantedRun. Every Run starts after last_writer_action_at.
test_the_ceilings_are_asked_about_the_run_the_issue_wants, the real case. The facts:
an outsider's issue, with factory:admit added by the Maintainer at minute 1 and factory:triage added by the Controller at minute 2;
last_writer_action_at at minute 1, and the investigating App's comment at minute 3;
Runs: an investigation that succeeded at minute 3, then max_runs_per_item - 1 readiness Runs that failed for the environment, starting at minute 4. That makes max_runs_per_item completed Runs. Use environment, not superseded, so this test does not wait on Kernel: spent attempts hold the item even while a refused Run is queued #158's ruling 3. Then one readiness Run queued at minute 21;
the outsider's edit at minute 25: a new content_id, and content_changed_at at minute 25.
The expected readings:
With the Run queued and paused False, True or None: new / acceptance_lapsed / nothing / working.
With none in flight, and once the queued Run completes for the environment: new / acceptance_lapsed / nothing / needs_you.
The other side, without the edit: held / run_ceiling / hold / needs_you, with the Run queued and with none in flight, paused or not.
The issue's own example, as written. With the Run queued, whatever the Pause: triage / triage / nothing / working. With none in flight, and after the Run completes: triage / ready_removed / nothing / needs_you, as now. A comment says its last_writer_action_at cannot happen.
A writer's issue in new / acceptance_due (no label), with max_runs_per_item completed Runs and one queued: new / acceptance_due / nothing / working. With none in flight: act / accept. This test kills the mutant that lets new want a Run.
test_the_run_ceiling_holds_no_issue_that_wants_no_run. Each of these, at the Run ceiling with one Run queued, gives working and never hold: in_review / linked_ready, in_progress / linked_draft, triage / judged, ready / no_statement, and intents_unreadable (issues.intents null). With none in flight, each gives what it gives now.
The other side. Each of these, at the Run ceiling with one Run queued, gives held / run_ceiling / hold / needs_you: triage wanting an investigation, triage wanting a verdict, ready wanting the opening Run, and in_progress / opening_run.
The changed assertion from ruling 2.
I ran the real case, the issue's example and the new case on a copy with ruling 1's change, and each read as stated above. make verify passes on that copy at 40 seeds, with only the one changed assertion. No other test checked the old reading.
5. Mutants, in ISSUE, each with text that appears once in kernel/issue.py. The old in-flight mutants lose their text, and each is replaced one for one:
"an issue's ceilings are asked about the Run in flight": the old behaviour back. Three lines, from if isinstance(wanted, tuple):\n to ...wanted[1], done, limits)\n, become if True:\n, the same done line, and run_ceilings(..., flight[0]["intent"], done, limits). The real case and the opening test kill it.
"the Run ceiling holds an issue that wants no Run while a Run waits": the same if line becomes if True:\n, and in the run_ceilings line wanted[1] becomes (wanted[1] if isinstance(wanted, tuple) else ""). The real case kills it.
"an issue's ceilings are asked of another Intent": wanted[1], done, limits) becomes INVESTIGATE, done, limits). It replaces "the brakes are asked of another Intent than the Run in flight's". The opening test kills it.
"a Run in flight is counted against itself": the done line, now indented 12 spaces, becomes done = since_writer(mine, facts)\n.
"a Pause is read for a Run in flight": the run_ceilings line becomes held = brakes.on_run(_decision, facts, state, evidence, context, wanted[1], done, limits). It replaces "a Pause is taken for the Hold of a Run in flight". test_a_run_in_flight_admits_nothing_and_the_brakes_hold_still_applies kills it.
"a Run in flight hides the brakes' Hold": if held:\n return held\n becomes nothing.
"a Run in flight on an issue does not stop another": if flight:\n held = None\n becomes if False:\n held = None\n.
"an issue in new wants a Run while a Run waits": wanted = None if state == NEW else _run_wanted( becomes wanted = _run_wanted(. The new / acceptance_due test kills it.
On the copy, I applied each mutant by hand and ran tests.test_issue. The first seven were killed. The last survived until the new test was written, which is why ruling 4 includes that test. The text of "an issue in review or with a linked draft reads the Intents" and of "Intents that cannot be read are trusted" moves into _run_wanted unchanged, and still appears once.
6. The exploration reaches a real case. Replace the synthetic AnyLifecycle.test_an_issue_explored_is_held_to_the_issue_lifecycle with a test that explores issue.decide over real issue facts, using explore(bases, moves, judge) as it stands.
The judge: issue.decide(facts, runs, context(passes_since=now), config, now), with issues served and all three Intents declared.
The bases, built with tests/test_issue.py's builders:
a writer's issue in new;
triage before any investigation;
triage investigated, with a successful Run and its comment;
the same, one Run short of the Run ceiling;
triage, one investigation attempt short;
ready by a person's label, one Run short;
an outsider's admitted issue in triage, investigated, one Run short;
new, one act short.
The moves, each named for who makes it:
human: a person adds or removes factory:ready, factory:triage or factory:hold, comments, or marks the linked pull request ready, closes it or merges it. Each of these renews last_writer_action_at and acts_since_writer.
stranger: the outsider edits their own issue.
platform: another App adds factory:hold.
factory: the Controller admits the Run or makes the act the Kernel asks for. A Run listed late is admitted again: with the newest Run in flight left out, the Kernel admits the same Intent (P-22, and P-17's window). The oldest Run in flight succeeds, fails for the item, or fails for the environment.
A Run's success passes through apply's question, with its own Run left out. If that question does not admit the same Intent for the same content, the Run concludes failure / superseded. Otherwise its Effects happen: the investigation adds its App's comment, the readiness Run adds factory:ready by its App, and the opening Run opens the Factory's draft.
Depth 4. On the copy, a rough version ran in half a second.
The test asserts three things:
every transition made by human, factory or platform is declared in lifecycle/issue.json;
every transition made by stranger ends in new, with acceptance_lapsed;
the path to the real case is explored.
The first mutant of ruling 5 is killed by this test too, so name it in that mutant as a second killer.
On the copy, the rough version found other undeclared moves, all of them already on main. Each is what §4.1 already says, so declare each in lifecycle/issue.json in this change:
new, triage, ready, in_progress and in_review → held by platform, bound person. A Hold holds whoever added it (row 4: "whoever added it"), as the pull request's Lifecycle already declares.
in_progress → ready, and in_progress → triage, by human: a person closes the linked draft unmerged. §4.1 draws this move, but the data names only factory. Declare the same moves from in_review if the exploration reaches them.
in_progress → new by factory, bound null. A person removed factory:ready while the opening Run was running, and the issue shows new once apply refuses that Run. Every cycle through this move passes triage → ready, which is bounded.
If the exploration reaches it, new → held by factory, bound max_acts_per_item: the act ceiling on an issue that still wants accept.
Do not declare anything else the exploration finds just to make the test pass. Stop and bring it back with its example.
lifecycle/issue.json is a protected path, so the hook will ask the Maintainer at the edit. That question approves the edit. It is not a question of scope.
7. The simulator. It does not change. sim/world.py models only pull requests. Until it models issues, the exploration in ruling 6 is what covers the issue side.
8. Record. No new record: this applies decision 0003, as #172's row does for a pull request. Add one Boundary row to 0003, after #172's two:
"On an issue too, while a Run is in flight, the attempts and the Run ceiling are asked about the Run its State wants, found as with none in flight, and not about the Run in flight; an issue that wants no Run, or one its configuration or facts cannot name, is not held by them, with a Run in flight or none". It names tests/test_issue.py::test_the_ceilings_are_asked_about_the_run_the_issue_wants, tests/test_issue.py::test_the_run_ceiling_holds_no_issue_that_wants_no_run, tests/test_issue.py::test_opening_attempts_are_bounded_and_hold_even_while_an_opening_run_is_in_flight and tests/test_transitions.py::test_an_issue_explored_is_held_to_the_issue_lifecycle.
Do not touch the Boundary cell of #172's row. Make the §4.1 change from ruling 2 in the same change.
The other half of the exploration: reaching every declared issue transition, keeping the rest in UNREACHED with a reason, and giving facts for every reason. That is a follow-on issue.
Applying "a Hold no person makes names what bounds it" to the issue Lifecycle, whose factory Holds have a null bound today. Also a follow-on.
Activity
Kernel: the Run ceiling's row names a pull request, and an unreadable…
don-petry commentedon Oct 18, 2026
Working rulings (overturnable in review)
Solution Architect, delegated. On main at c094a8b (#170), with #172 (
kernel/pause-holds-spent-countat 1660755) and #165 (kernel/issue-staleat dd61adc) applied, since this lands after both.The cause. While a Run is in flight,
issue.decideasksbrakes.on_runonce for each Run in flight, using that Run's Intent, and keeps any Hold. It never asks what the issue's State wants now.decide.pyasks the ceilings about_wanted_run(state, reason), and asks none when that gives None (#158's ruling 1, #169's ruling 3). So on an issue, the Run in flight can hold an issue whose State wants no Run. The Hold then ends when that Run completes, with no person. That is the Factory leavingheld, whichlifecycle/issue.jsonlists inperson_only_exits.The issue's example reproduces on the copy. With the Run queued, paused or not, it gives
held / run_ceiling / hold / needs_you. With none in flight, and once the Run completes, it givestriage / ready_removed / nothing. But the example's facts cannot occur. A person who removesfactory:readyhas acted, solast_writer_action_atis minute 31 or later, and every Run started before it drops out of the count. Correct that one fact and the issue readstriage / triage / nothing / workingwith the Run queued, and admits an investigation without it. There is no Hold. The example stays as a boundary test of what the Kernel reads, but it needs a real case beside it.A real case exists. Take an outsider's admitted issue in
triage, one Run short of the Run ceiling. A readiness Run is admitted. The next pass does not see it, because it is listed late (P-22) or listed without its name (P-17), so the pass admits it again. The first Run fails, which reaches the ceiling. The outsider then edits the issue. Acceptance lapses, and derive givesnew / acceptance_lapsed, which wants no Run. Today, while the second Run is queued, the issue readsheld / run_ceiling: the ceiling of a readiness Run nobody wants. When that Run completes, the issue readsnew. On the copy, a rough exploration of the issue found this asnew → heldbyfactory, which the Lifecycle does not declare. With ruling 1 it readsnew / acceptance_lapsed / nothing / working, and thenneeds_you.1. While a Run is in flight, the ceilings are asked about the Run the State wants. Find that Run the way the no-flight path finds it. Then ask
brakes.run_ceilingson its own, with that Run's Intent and the Runs completed since a writer acted, asdecide.pydoes. Inkernel/issue.py:_wantedinto one helper,_run_wanted(facts, state, reason, evidence, mine, config). These are: in review or a linked draft;issues.intentsunreadable; two Intents sharing a Role; two sharing an App. The helper returns_wanted's(role, intent, carried), or the Decision that admits nothing. The no-flight path calls it and behaves as it does now.decide.pyandbrakes.pyare not edited.Why: §4.1 says "The Kernel holds an item at a ceiling only while the action that ceiling bounds is wanted".
applyalready asks the question this way. It asks the Kernel again with its own Run left out (I-38), which is the no-flight path, and that path asks about the wanted Run. The reading while a Run is in flight should match the answerapplywill get. Callrun_ceilings, noton_run, asdecide.pydoes. After #172,on_rungives the same Holds, but it also reads the Pause, which a Run in flight must never show._wantedreads nothing that a Run in flight wrote. That Run's record is kept and has not succeeded, so neither its comment nor its label stands in for a completed Run.2. An issue State that wants no Run is not held by the Run ceiling, with a Run in flight or without one. These States want no Run:
new, which wants at most one act,accept;in_review;in_progress / linked_draft;_run_wantedgives a Decision:judged,ready_removed,no_statement,intent_undeclared,branch_unreadable, and the threeintents_*deferrals.With no Run in flight, each of these gives what it gives now. With a Run in flight, each gives
working.in_progress / opening_rundoes want a Run, the opening Run, because_wantedreaches its opening branch. So spent opening attempts still hold it while the opening Run waits.Why: the Run ceiling is the cost ceiling (FR-39), and an item that wants no Run spends nothing. This is the same rule as #169's ruling 3, so the two item types read alike. No person is left out. Each of these States that needs a person already says so with no Run in flight:
acceptance_lapsed,judged,ready_removed,no_statement,intent_undeclaredand theintents_*reasons are all inNEEDS_YOU_REASONS. Only a Run in flight hides that, and only while it runs.tests/test_issue.py::test_opening_attempts_are_bounded_and_hold_even_while_an_opening_run_is_in_flightends with "The brakes' Hold on a Run in flight does not wait on its Intent being declared". Its facts are: opening attempts spent, the opening Run queued, andopeningset to null. It expectsheld / attempts_exhausted. With no Run in flight, the same facts readready / intent_undeclared / nothing / needs_you. So that Hold is exactly the split this issue closes. The assertion becomesin_progress / opening_run / nothing / working. The lines above it, where the Intent is declared, still giveheld / attempts_exhausted. Decision 0031's row naming this test still reads true: a Run in flight hides no Hold the issue would have without it.3. An outsider's edit may take a ceiling-held issue to
new. Derive's row 5 is read before the brakes. So when an outsider edits an admitted issue that is held at a ceiling, the issue becomesnew / acceptance_lapsed / nothing / needs_you. That isheld → new, made by someone who is not a person, and it stays. Why: §4.1 says that after the outsider's edit the issue isnewagain "whatever Factory labels it carries". A Hold of the brakes is a reading, not a label. Nothing is admitted innew, and the issue is assigned to the Maintainer. The spent count stands until a person with write access acts, and admitting the issue again is such an act.person_only_exitsstays true of the data: no transition out ofheldis declared for anyone buthuman. The exploration in ruling 6 asserts the narrower rule that does hold: an outsider moves an issue only tonew, withacceptance_lapsed.4. Boundary tests, written first. In
tests/test_issue.py, in a classWantedRun. Every Run starts afterlast_writer_action_at.test_the_ceilings_are_asked_about_the_run_the_issue_wants, the real case. The facts:factory:admitadded by the Maintainer at minute 1 andfactory:triageadded by the Controller at minute 2;last_writer_action_atat minute 1, and the investigating App's comment at minute 3;max_runs_per_item - 1readiness Runs that failed for the environment, starting at minute 4. That makesmax_runs_per_itemcompleted Runs. Useenvironment, notsuperseded, so this test does not wait on Kernel: spent attempts hold the item even while a refused Run is queued #158's ruling 3. Then one readiness Run queued at minute 21;content_id, andcontent_changed_atat minute 25.The expected readings:
pausedFalse, True or None:new / acceptance_lapsed / nothing / working.new / acceptance_lapsed / nothing / needs_you.held / run_ceiling / hold / needs_you, with the Run queued and with none in flight, paused or not.The issue's own example, as written. With the Run queued, whatever the Pause:
triage / triage / nothing / working. With none in flight, and after the Run completes:triage / ready_removed / nothing / needs_you, as now. A comment says itslast_writer_action_atcannot happen.A writer's issue in
new / acceptance_due(no label), withmax_runs_per_itemcompleted Runs and one queued:new / acceptance_due / nothing / working. With none in flight:act / accept. This test kills the mutant that letsnewwant a Run.test_the_run_ceiling_holds_no_issue_that_wants_no_run. Each of these, at the Run ceiling with one Run queued, givesworkingand neverhold:in_review / linked_ready,in_progress / linked_draft,triage / judged,ready / no_statement, andintents_unreadable(issues.intentsnull). With none in flight, each gives what it gives now.The other side. Each of these, at the Run ceiling with one Run queued, gives
held / run_ceiling / hold / needs_you:triagewanting an investigation,triagewanting a verdict,readywanting the opening Run, andin_progress / opening_run.The changed assertion from ruling 2.
I ran the real case, the issue's example and the
newcase on a copy with ruling 1's change, and each read as stated above.make verifypasses on that copy at 40 seeds, with only the one changed assertion. No other test checked the old reading.5. Mutants, in
ISSUE, each with text that appears once inkernel/issue.py. The old in-flight mutants lose their text, and each is replaced one for one:if isinstance(wanted, tuple):\nto...wanted[1], done, limits)\n, becomeif True:\n, the samedoneline, andrun_ceilings(..., flight[0]["intent"], done, limits). The real case and the opening test kill it.ifline becomesif True:\n, and in therun_ceilingslinewanted[1]becomes(wanted[1] if isinstance(wanted, tuple) else ""). The real case kills it.wanted[1], done, limits)becomesINVESTIGATE, done, limits). It replaces "the brakes are asked of another Intent than the Run in flight's". The opening test kills it.doneline, now indented 12 spaces, becomesdone = since_writer(mine, facts)\n.run_ceilingsline becomesheld = brakes.on_run(_decision, facts, state, evidence, context, wanted[1], done, limits). It replaces "a Pause is taken for the Hold of a Run in flight".test_a_run_in_flight_admits_nothing_and_the_brakes_hold_still_applieskills it.if held:\n return held\nbecomes nothing.if flight:\n held = None\nbecomesif False:\n held = None\n.wanted = None if state == NEW else _run_wanted(becomeswanted = _run_wanted(. Thenew / acceptance_duetest kills it.On the copy, I applied each mutant by hand and ran
tests.test_issue. The first seven were killed. The last survived until thenewtest was written, which is why ruling 4 includes that test. The text of "an issue in review or with a linked draft reads the Intents" and of "Intents that cannot be read are trusted" moves into_run_wantedunchanged, and still appears once.6. The exploration reaches a real case. Replace the synthetic
AnyLifecycle.test_an_issue_explored_is_held_to_the_issue_lifecyclewith a test that exploresissue.decideover real issue facts, usingexplore(bases, moves, judge)as it stands.The judge:
issue.decide(facts, runs, context(passes_since=now), config, now), with issues served and all three Intents declared.The bases, built with
tests/test_issue.py's builders:new;triagebefore any investigation;triageinvestigated, with a successful Run and its comment;triage, one investigation attempt short;readyby a person's label, one Run short;triage, investigated, one Run short;new, one act short.The moves, each named for who makes it:
human: a person adds or removesfactory:ready,factory:triageorfactory:hold, comments, or marks the linked pull request ready, closes it or merges it. Each of these renewslast_writer_action_atandacts_since_writer.stranger: the outsider edits their own issue.platform: another App addsfactory:hold.factory: the Controller admits the Run or makes the act the Kernel asks for. A Run listed late is admitted again: with the newest Run in flight left out, the Kernel admits the same Intent (P-22, and P-17's window). The oldest Run in flight succeeds, fails for the item, or fails for the environment.apply's question, with its own Run left out. If that question does not admit the same Intent for the same content, the Run concludesfailure / superseded. Otherwise its Effects happen: the investigation adds its App's comment, the readiness Run addsfactory:readyby its App, and the opening Run opens the Factory's draft.Depth 4. On the copy, a rough version ran in half a second.
The test asserts three things:
human,factoryorplatformis declared inlifecycle/issue.json;strangerends innew, withacceptance_lapsed;The first mutant of ruling 5 is killed by this test too, so name it in that mutant as a second killer.
On the copy, the rough version found other undeclared moves, all of them already on main. Each is what §4.1 already says, so declare each in
lifecycle/issue.jsonin this change:new,triage,ready,in_progressandin_review→heldbyplatform, boundperson. A Hold holds whoever added it (row 4: "whoever added it"), as the pull request's Lifecycle already declares.in_progress→ready, andin_progress→triage, byhuman: a person closes the linked draft unmerged. §4.1 draws this move, but the data names onlyfactory. Declare the same moves fromin_reviewif the exploration reaches them.in_progress→newbyfactory, bound null. A person removedfactory:readywhile the opening Run was running, and the issue showsnewonceapplyrefuses that Run. Every cycle through this move passestriage → ready, which is bounded.new→heldbyfactory, boundmax_acts_per_item: the act ceiling on an issue that still wantsaccept.Do not declare anything else the exploration finds just to make the test pass. Stop and bring it back with its example.
lifecycle/issue.jsonis a protected path, so the hook will ask the Maintainer at the edit. That question approves the edit. It is not a question of scope.7. The simulator. It does not change.
sim/world.pymodels only pull requests. Until it models issues, the exploration in ruling 6 is what covers the issue side.8. Record. No new record: this applies decision 0003, as #172's row does for a pull request. Add one Boundary row to 0003, after #172's two:
tests/test_issue.py::test_the_ceilings_are_asked_about_the_run_the_issue_wants,tests/test_issue.py::test_the_run_ceiling_holds_no_issue_that_wants_no_run,tests/test_issue.py::test_opening_attempts_are_bounded_and_hold_even_while_an_opening_run_is_in_flightandtests/test_transitions.py::test_an_issue_explored_is_held_to_the_issue_lifecycle.Do not touch the Boundary cell of #172's row. Make the §4.1 change from ruling 2 in the same change.
9. Out of scope.
UNREACHEDwith a reason, and giving facts for every reason. That is a follow-on issue.factoryHolds have a null bound today. Also a follow-on.Needs the Maintainer? None.
Kernel: #171 fix round: the Run wanted is found with the opening Run …
Lifecycle: an outsider's edit is held to the issue Lifecycle, and lea…