@sjawhar/pi-legion 10.19.6 → 10.19.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/legion.js
CHANGED
|
@@ -16932,7 +16932,7 @@ async function bootLegionClaim(host2) {
|
|
|
16932
16932
|
// package.json
|
|
16933
16933
|
var package_default = {
|
|
16934
16934
|
name: "@sjawhar/pi-legion",
|
|
16935
|
-
version: "10.19.
|
|
16935
|
+
version: "10.19.8",
|
|
16936
16936
|
license: "Apache-2.0",
|
|
16937
16937
|
type: "module",
|
|
16938
16938
|
omp: {
|
|
@@ -445,7 +445,7 @@ active phase worker.
|
|
|
445
445
|
| `design-approved` | Its `version` is the approved one. A human approved the root spec document at its current version; the gate is open. Proceed to section 2 — except on a root whose catch-up said `handed_over`: its workers already run their phases, so start nothing; the approval releases any READY the gate refused. One whose `version` is the version a human's own answer to a decision block wrote, after an earlier approval (Dispatch carried that approval to it, section 1), opens nothing new: carry on, and release no wave because of it. |
|
|
446
446
|
| `design-changes-requested` | Its `version` and `reason`. A human asked for changes to the root spec at `version`, for `reason`. Revise the spec as the reason asks and request approval again as section 1 says; stay parked; the gate is closed. |
|
|
447
447
|
| `phase-finished` | The daemon has already moved the issue to its next phase by its fixed table and started that phase's role; you start nothing. Read the committed handoff for the finishing phase; if it shows unresolved gaps, tell the role now working the issue (`envoy_publish` to its role topic). A `planner` notice that names a departure from the spec's design defers to section 1's full condition: when the approved Summary, Acceptance, scope and settled decisions still hold, the plan is the record; otherwise change the root spec and request approval again as section 1 says. A `reviewer` notice whose GitHub review is `CHANGES_REQUESTED` needs nothing from you: the daemon has returned the issue to `implementing` (Dispatch `in_progress`) and started the **implementer**, whose correction goes through the tester and the reviewer again, never straight to retro. A `reviewer` notice with an `APPROVED` review means the issue is in `accepting` and the acceptance is yours (section 6): read the evidence, then `sign_off` or send it back with `request_backward_move`. A `tester` notice with `verdict: "fail"` — its handoff carries `implementerProof.verdict: "rejected"`, or a failure naming the production-like proof — has gone back to the **implementer** by the daemon's table; never supply the proof from another role. A worker that reports no surface reaches the changed path sends that report instead of completing its phase, so the daemon starts nothing more on that issue and the worker stays idle in its session, not suspended: file a child issue in this tree to build the surface (infrastructure, tooling, or a skill), and when that child's `child-closed` arrives, tell the waiting worker to continue with `envoy_publish` to its role topic. That report is never a reason to advance the phase. |
|
|
448
|
-
| `pr-blocked` | Its `reason` names the pull request and the `max_fix_attempts` it reached, or reads `Issue reached review_round_cap=<N>.` (the end of this row). The count is of heads pushed onto a red verdict that changed something outside `.legion/` — handoff-only pushes (`.legion/` paths only) never count, a push by the review App (a planner's, tester's, reviewer's or architect's) never counts, and the head after a red the tester's red tests earned (a review-App push that changed a path outside `.legion/`, however many handoff-only pushes follow it) does not count either — so after the tester's handoff-only push onto the implementer's red, the implementer's next push does count; a push the daemon cannot classify (a listener without `changed_paths`, a list the listener stopped at 100 paths or 32,768 runes of text, a push listing no commits) does. Published once per exhausted count, not on every later red verdict for that count. Read the failed CI evidence and recovery attempts. The notice moves nothing, and no later CI red within the attempt that ran the count out (the counted head, and every head pushed on top of it until a push lands on a head CI judged green, the tester's red tests and handoff onto the held red included) sends the work back from `testing`, `reviewing`, `accepting`, `retro` or `merging` either: the issue stays in its phase until you move it, or a worker's own decision does (a tester's `fail`, a reviewer's request for changes). A head pushed onto green CI leaves that attempt, so its red still comes as a `checks-red`. In `implementing`, give the implementer the failing checks (`envoy_publish` to its role topic). In any later phase a worker holds, tell that worker (`envoy_publish` to its role topic) to move the issue back to `implementing` with `request_backward_move`, naming the failing checks, and the daemon starts the implementer; or file a corrective child. In `accepting`, where no worker holds a phase, the move is yours: `request_backward_move` with `issue`, naming the failing checks. In `awaiting_merge`, where no worker holds a phase and a backward move is refused, open a `dispatch ask` naming the failing checks for the human who merges, as section 6 does for a conflict there. Do not treat the blocked PR as final. A `review_round_cap` reason is the implementer's round count instead: every move back to an earlier phase counts one, and the notice comes again with each round past the cap. It moves nothing either, since the round that reached the cap has already started its worker. Tell the rounds apart by what announced each: a tester's fail by its `phase-finished` with `verdict: "fail"`; a request for changes by the reviewer's `phase-finished` over a `CHANGES_REQUESTED` review; the daemon's own move by a `checks-red` notice, whose reason names a conflict (`the head conflicts with <base>`), the required checks that failed (`CI is red at <head>`), or the merge queue's failed merge and its failing run (`the merge queue took pull request #<n> out at READY's head …`); a worker's `request_backward_move` by a `phase-finished` from the role that asked, whose reason reaches only the task of the worker the move started, so ask that worker; your own send-back from `accepting` by the reason you gave. Judge the cap by the rounds that are not conflicts. Conflict returns need nothing from you beyond the next round. Tester fails, requests for changes and CI-red returns (a `checks-red` notice is raised for CI only when a required check fails on code the branch pushed, or when the merge queue fails the merge) are the
|
|
448
|
+
| `pr-blocked` | Its `reason` names the pull request and the `max_fix_attempts` it reached, or reads `Issue reached review_round_cap=<N>.` (the end of this row). The count is of heads pushed onto a red verdict that changed something outside `.legion/` — handoff-only pushes (`.legion/` paths only) never count, a push by the review App (a planner's, tester's, reviewer's or architect's) never counts, and the head after a red the tester's red tests earned (a review-App push that changed a path outside `.legion/`, however many handoff-only pushes follow it) does not count either — so after the tester's handoff-only push onto the implementer's red, the implementer's next push does count; a push the daemon cannot classify (a listener without `changed_paths`, a list the listener stopped at 100 paths or 32,768 runes of text, a push listing no commits) does. Published once per exhausted count, not on every later red verdict for that count. Read the failed CI evidence and recovery attempts. The notice moves nothing, and no later CI red within the attempt that ran the count out (the counted head, and every head pushed on top of it until a push lands on a head CI judged green, the tester's red tests and handoff onto the held red included) sends the work back from `testing`, `reviewing`, `accepting`, `retro` or `merging` either: the issue stays in its phase until you move it, or a worker's own decision does (a tester's `fail`, a reviewer's request for changes). A head pushed onto green CI leaves that attempt, so its red still comes as a `checks-red`. In `implementing`, give the implementer the failing checks (`envoy_publish` to its role topic). In any later phase a worker holds, tell that worker (`envoy_publish` to its role topic) to move the issue back to `implementing` with `request_backward_move`, naming the failing checks, and the daemon starts the implementer; or file a corrective child. In `accepting`, where no worker holds a phase, the move is yours: `request_backward_move` with `issue`, naming the failing checks. In `awaiting_merge`, where no worker holds a phase and a backward move is refused, open a `dispatch ask` naming the failing checks for the human who merges, as section 6 does for a conflict there. Do not treat the blocked PR as final. A `review_round_cap` reason is the implementer's round count instead: every move back to an earlier phase counts one, and the notice comes again with each round past the cap. It moves nothing either, since the round that reached the cap has already started its worker. Tell the rounds apart by what announced each: a tester's fail by its `phase-finished` with `verdict: "fail"`; a request for changes by the reviewer's `phase-finished` over a `CHANGES_REQUESTED` review; the daemon's own move by a `checks-red` notice, whose reason names a conflict (`the head conflicts with <base>`), the required checks that failed (`CI is red at <head>`), or the merge queue's failed merge and its failing run (`the merge queue took pull request #<n> out at READY's head …`); a worker's `request_backward_move` by a `phase-finished` from the role that asked, whose reason reaches only the task of the worker the move started, so ask that worker; your own send-back from `accepting` by the reason you gave. Judge the cap by the rounds that are not conflicts. Conflict returns need nothing from you beyond the next round. Tester fails, requests for changes and CI-red returns (a `checks-red` notice is raised for CI only when a required check fails on code the branch pushed, or when the merge queue fails the merge) are the rounds the cap is for. Each `review_round_cap` notice is a decision you make in the turn it wakes, never one left for the next round to make: read what every counted round found, choose one of the three below, act on it in the same turn, and post it as a `dispatch comment` on the issue naming the rounds you read and the choice. **Narrow**: the change itself is sound but each round finds more around it; tell the implementer and the reviewer (`envoy_publish` to each one's role topic) which acceptance lines the next round answers; a correctness finding is still fixed in this pull request, and only naming, duplication or wording cleanup moves to the `Fast-follow:` line. **Split**: part of the work cannot settle in this pull request; file that part as an issue of its own, never a child of this one (a parent waits in `accepting` for every child, and the split part usually builds on this pull request's unmerged code): `dispatch issue --project <project> --title '<outcome>' --blocked-by <this issue> --spec-file -`, a child of this issue's parent when it has one (`--parent <parent>`, released with `release_children` once this issue closes). Tell the implementer and the reviewer that this pull request no longer carries it. **Accept the rounds**: each round found less than the one before it, and the last found no defect in the change itself (a stale line, a comment that states an old default); let the loop run and say why in the comment. A later notice is a new decision: accept again only when its round found less than the round you last accepted, and otherwise narrow or split. A finding that changes what the spec accepts is a decision block in the root spec (section 1), and `dispatch ask` is only for a decision that needs a human's authority; neither replaces the choice. Judge a worker's backward move by the reason that worker gives. A move you ordered for a conflict found before `awaiting_merge` (section 6) is a conflict return. The merger's move back to `reviewing` for a READY refusal (`READY_UNREVIEWED_CHANGE`, or `READY_NOT_APPROVED` when its task names no approved head), and the reviewer's no-fix request for changes that follows it so the tester runs the head, are not the work going in circles either. A move that sends back code found wrong counts with the tester fails. |
|
|
449
449
|
| `pr-merged` | Its `reason` names the pull request. The PR merged, under the repository's rules, before the issue reached `awaiting_merge`. The workflow runs on and asks no one to merge it: the merge closes the issue the moment it reaches `awaiting_merge` (section 7), and you start nothing; the production check after the close is the implementer's, on the pull request, and asks nothing of you. Until then the phases run as they would, your acceptance included. |
|
|
450
450
|
| `pr-closed-unmerged` | Decide from current scope whether the work is reopened, started over (`park_child` then `rerun_child`, for a child), or ended with a reason. Delegate the repository action to the responsible phase worker and keep ownership. |
|
|
451
451
|
| `merge-refused` | Its `reason` names the pull request, READY's head, what the daemon asked GitHub to do (merge, enqueue, or enable auto-merge for it), and GitHub's refusal, which a retry would meet again (squash merges disabled, a permission the implement App lacks). The daemon has stopped submitting that merge; the issue stays in `awaiting_merge`. The cause is a repository setting or an App permission, a person's to change: ask one with `dispatch ask`, naming the refusal and the pull request at READY's head, which that person merges under the repository's rules once it is fixed. The merge closes the issue. Never bypass a rule. |
|
|
@@ -298,6 +298,8 @@ line), the full definition of a proof, what the tester verifies, and the simplif
|
|
|
298
298
|
- **No deferrals.** A finding that changes
|
|
299
299
|
behaviour, hides an error, or breaks a gate is fixed in this pull request; naming, duplication,
|
|
300
300
|
or wording cleanup is batched into the one `Fast-follow:` line instead of iterating per push.
|
|
301
|
+
- **The implementer pushes, then completes; it never waits for, watches or polls CI**, and never
|
|
302
|
+
sleeps in a loop: `skill://legion-worker/references/pr-body.md` (*Never waiting on CI*).
|
|
301
303
|
- **A red CI job** that failed on its own is re-run with
|
|
302
304
|
`gh run rerun <run-id> --failed`, never by pushing a new commit or bringing in the base.
|
|
303
305
|
- **A conflict or a retarget** is the only reason to bring the base into the branch, always as a
|
|
@@ -50,6 +50,28 @@ Verified the implementer's proof by <re-running its command | driving the same s
|
|
|
50
50
|
**Chain:** stacked on <base bookmark> frozen at <sha> / not stacked.
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
The `CI` line names the runs GitHub started for the code head, by run id, with each run's state
|
|
54
|
+
as GitHub shows it when the line is written: `success`, a failure, or `queued` / `in progress`
|
|
55
|
+
at <head-sha>, or `no run yet` when GitHub has started none. The implementer writes it at its completion from one `gh run list --commit <head-sha>`
|
|
56
|
+
and never waits for a run to finish to fill it in: the daemon reads every settlement itself, and a
|
|
57
|
+
check or workflow the base branch requires that settles red sends the work back to `implementing`,
|
|
58
|
+
before or after that completion. A later role that reads CI on GitHub updates the line's states to
|
|
59
|
+
what it read.
|
|
60
|
+
|
|
61
|
+
## Never waiting on CI
|
|
62
|
+
|
|
63
|
+
The implementer runs the repository's fast local checks for the paths it changed before the push,
|
|
64
|
+
then pushes and completes. It never waits for, watches or polls the pull request's remote CI
|
|
65
|
+
(`gh run watch`, `gh pr checks --watch`, `sleep` around `gh run view`) and never sleeps in a loop.
|
|
66
|
+
Under the Go daemon a check or workflow the base branch requires that settles red on the head,
|
|
67
|
+
before the completion or after it, sends the work back to `implementing` with the failing checks
|
|
68
|
+
named, until `max_fix_attempts` is spent, when the architect decides. The one CI result an implementer waits for is a re-run: when its task names a red that
|
|
69
|
+
failed on its own, it re-runs the failed jobs once (`gh run rerun <run-id> --failed`) and completes once
|
|
70
|
+
the re-run settles green, woken by the pull request's checks event (`skill://envoy`, *Waiting for
|
|
71
|
+
CI or a merge*: subscribe, then end the turn), never by a sleep loop. A completion while that red
|
|
72
|
+
still stands is sent back, at once for a required check and at the daemon's next read of the runs
|
|
73
|
+
(within two minutes) for a required workflow.
|
|
74
|
+
|
|
53
75
|
## The brief for the human
|
|
54
76
|
|
|
55
77
|
`## For the reviewer` is written for the person who merges; `## Verification` below it stays the
|
|
@@ -96,7 +118,9 @@ and the tester's proof below are both this proof.
|
|
|
96
118
|
second and the concurrent run, the party it must refuse — judge whether the implementer's tests
|
|
97
119
|
would catch the ways it breaks, writing the red test for one that none would, and
|
|
98
120
|
read CI for everything static: lint, types and the unit and integration suites are CI's, cited
|
|
99
|
-
from the `CI` line, and no CI lane is rerun as evidence.
|
|
121
|
+
from the `CI` line, and no CI lane is rerun as evidence. A lane the line shows `queued` or
|
|
122
|
+
`in progress` is cited as such: the tester never waits for it, since a required red that settles
|
|
123
|
+
sends the work back from `testing` and the reviewer reads the head's checks before it approves.
|
|
100
124
|
A test handoff whose predecessor carried no proof is a test failure, not a gap for the tester to fill:
|
|
101
125
|
record it in `failures` with `implementerProof.verdict: "rejected"`, complete the phase with
|
|
102
126
|
`verdict: "fail"`, and the daemon returns the issue to the implementer — the agent that developed the change owns
|