@sjawhar/pi-legion 11.5.1 → 11.5.3
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 +1 -1
- package/dist/skills/legion-architect/SKILL.md +1 -1
- package/dist/skills/legion-architect/references/design-gate.md +7 -0
- package/dist/skills/legion-architect/references/wake-routing.md +1 -1
- package/dist/skills/legion-worker/SKILL.md +1 -1
- package/dist/skills/legion-worker/references/tools.md +50 -1
- package/package.json +1 -1
package/dist/legion.js
CHANGED
|
@@ -61,7 +61,7 @@ The reviewer's `phase-finished` with an `APPROVED` review puts the issue in `acc
|
|
|
61
61
|
- the tester's handoff, `.legion/<issue>/test.json` at the approved head;
|
|
62
62
|
- the pull request body's `E2E (implementer)` and `E2E (tester)` lines;
|
|
63
63
|
- the reviewer's approval of that head by SHA (`gh api --paginate repos/<o>/<r>/pulls/<n>/reviews`);
|
|
64
|
-
- each
|
|
64
|
+
- each claim the reviewer's prose commits to, checked against the code at that head and command output, never against the finding it ruled on or its own verdict: no other agent has read that prose.
|
|
65
65
|
|
|
66
66
|
Accept only when each acceptance line of the issue's own pull request has passing evidence at the approved head and no criterion left the tree; a criterion only the tree as a whole meets is the integration child's (section 4), not a reason to hold the root's own pull request. A finding ask on the issue holds the acceptance until it is resolved or carries the controller's reply (`skill://legion-architect/references/acceptance.md`). Post that evidence as a `dispatch comment`, then `legion({ op: "sign_off", issue: "<KEY>" })`.
|
|
67
67
|
|
|
@@ -16,6 +16,13 @@ what the human decides, each as a [decision block](skill://dispatch/SKILL.md#ask
|
|
|
16
16
|
Never post a second "spec" artifact beside it: `dispatch artifact` with the primary document's name
|
|
17
17
|
replaces the human's document.
|
|
18
18
|
|
|
19
|
+
On your first pass over the spec, cut each requirement carried over from an earlier issue's spec or
|
|
20
|
+
decisions that no source of this issue states: those were decided for that issue. This issue's
|
|
21
|
+
sources are the words a person wrote in it, and its `Filed for` line with what that line cites: the
|
|
22
|
+
answer, Slack message or direct message of a `Filed for <person> at their request:` line, or the
|
|
23
|
+
evidence of a controller's `Filed for Legion from <role> on <issue>:` line
|
|
24
|
+
([The `Filed for` line](skill://legion-controller/references/finding-asks.md#the-filed-for-line)).
|
|
25
|
+
|
|
19
26
|
## Which gate runs
|
|
20
27
|
|
|
21
28
|
The approval step runs only when the `Design gate policy` sentence of your `Legion addressing` line
|
|
@@ -21,7 +21,7 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
21
21
|
| `carried-gate-opened` | Only a root whose catch-up said `carried` gets it. Its `version` and `reason`: a human approved the old root's spec document at `version`, which opened the gate this root carried; the daemon has released any READY it refused and started any child waiting on it. It is not `design-approved`: do not proceed to section 2 or release a wave because of it, and start nothing. |
|
|
22
22
|
| `child-status` | A child of your tree left the workflow or re-entered it, or joined your tree from the admission queue; the reason names the child and its new status, or reads `<KEY> joined the tree of <ROOT> from the admission queue`. `todo` (a human's move, your `release_children`, or your `rerun_child`) means it runs again under your tree from planning, and the daemon starts it; you start nothing. A child held for a blocker starts the same way once nothing holds it, and the reason, naming it and its root, says what cleared the hold: its last blocker's close, naming the issues it waited on, now done, or a person or you taking its blocked-by links off; you start nothing for it either. `backlog`, `icebox` or `triage` (a human's move, or your `park_child`) means the daemon has suspended its workers, and it advances no further until it is set back to `todo`. Joined from the admission queue means a root that waited for a slot and never ran, which a person made a child of your tree or your `release_children` adopted, now runs in your tree with no slot or architect of its own, from planning when it is `todo` and parked otherwise; one that waits on an unfinished blocked-by issue is held for that blocker like any other child, and starts when nothing holds it; you start nothing. What the rest of the tree does is your decision. |
|
|
23
23
|
| `child-closed` | Read the child completion and remaining open children. Re-scope open work, park obsolete work for good with `park_child` (first take its link off each sibling that waits on it, or park that sibling too, as section 2 says), and file any new child the result calls for and release it at once with `release_children`, blocked by what it builds on (section 2). When a worker waits on this child for a missing surface (see `phase-finished`), tell it to continue with `envoy_publish` to its role topic. The last child's close is not the end-game (section 3). |
|
|
24
|
-
| `child-release-stalled` | Its `reason` names a child your `release_children` released
|
|
24
|
+
| `child-release-stalled` | Its `reason` names a child your `release_children` released that your tree has not recorded, its parent, and why, one of three: the parent's release has not reached the daemon after three tries; or GitHub did not answer the App installation read of a repository on the child's parent chain, and the wave left the child unrecorded because a parent on that chain is not `todo`, or did not write the child `todo` because its parent is not recorded; or the daemon's recovery of such a repository, once GitHub answered, still left children unrecorded (one notice per tree lists them all, each with its parent). Read the parent's record with the `legion` tool's `read_record` (`issue` the parent); release the parent first when the `reason` says to, then run `release_children` for the child again once the parent is recorded in your tree, and tell the controller if it never is. |
|
|
25
25
|
| `child-not-recorded` | Its `reason` names a child your tree did not record and why: its repository resolves to none (neither it nor an ancestor names one, and the project has no default), or to one not mapped to the project, or to one the daemon leaves out for a missing GitHub App. The daemon said why on the child too. Set the child's repository to one of the project's (`dispatch issue-update --repo owner/name`), then release it again with `release_children`; tell the controller when the repository it needs is not served. |
|
|
26
26
|
| `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, "After approval" in `skill://legion-architect/references/design-gate.md`), opens nothing new: carry on, and release no wave because of it. A root that was waiting on a question in `awaiting_person` gets no such notice: the task that resumes it says "Your spec is approved at version N and the design gate is open: this resume is your design-approved wake", and that resume is this wake — proceed to section 2 on it. |
|
|
27
27
|
| `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 "The armed gate" in `skill://legion-architect/references/design-gate.md` says; end your turn; the gate is closed. On a root that was waiting on a question in `awaiting_person`, a review the human gave after the wait began comes in the resume task, not in this notice, whether it answered the wait or came after something else did: the task names the review with its version and reason, unless a later approval superseded it. A `version` below the latest, or a second request for one version, is a request that reached the daemon late: read it as the same section's last paragraph says. Each request arrives once. |
|
|
@@ -40,7 +40,7 @@ Read each by its `skill://` link: a read by path stops at 300 lines.
|
|
|
40
40
|
| You review or approve, build READY, or run the production check | `skill://legion-worker/references/merge-gate.md` |
|
|
41
41
|
| The issue renames a repository, package, or URL across the codebase | `skill://legion-worker/references/systematic-rename.md` |
|
|
42
42
|
| The issue deletes code, a command, or documentation | `skill://legion-worker/references/cleanup-deletion.md` |
|
|
43
|
-
| You need a tool the image may not carry, before you install anything | `skill://legion-worker/references/tools.md` |
|
|
43
|
+
| You need a tool the image may not carry, before you install anything; before you measure Oh My Pi's binary; or a test fails in your pod | `skill://legion-worker/references/tools.md` |
|
|
44
44
|
| A problem outside your issue, or a failed production check | `skill://legion-worker/references/findings.md` |
|
|
45
45
|
|
|
46
46
|
## Every role pushes its own commits
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Part of `skill://legion-worker`. Read it the moment your phase needs a tool the worker image may
|
|
4
4
|
not carry — a database client, a linter, a one-off CLI — before you install, download, or vendor
|
|
5
|
-
anything
|
|
5
|
+
anything; before you measure Oh My Pi's binary; and when a test fails in your pod. Every path it
|
|
6
|
+
cites is in sjawhar/legion.
|
|
6
7
|
|
|
7
8
|
## The five clients the image already carries
|
|
8
9
|
|
|
@@ -413,3 +414,51 @@ on "The test: where it lands, and what it leaves resolving", which the convenien
|
|
|
413
414
|
The operator's side of this — why the image carries those five clients rather than anything else,
|
|
414
415
|
the five priced options with their measurements, and what the clients cost the image — is in
|
|
415
416
|
`docs/kubernetes.md`, the subsection "The tools a role's own work needs".
|
|
417
|
+
|
|
418
|
+
## Before you measure Oh My Pi's binary
|
|
419
|
+
|
|
420
|
+
Read Oh My Pi's source first, from the fork (`sjawhar/oh-my-pi`) at the tag `.omp-pin` names, not
|
|
421
|
+
from upstream's version tag: the fork's release carries code upstream's does not. `.omp-pin` reads
|
|
422
|
+
`github:sjawhar/oh-my-pi@<version>`, and the git tag adds a `v` in front of that text, so find it
|
|
423
|
+
rather than type it:
|
|
424
|
+
|
|
425
|
+
```text
|
|
426
|
+
$ git ls-remote --tags https://github.com/sjawhar/oh-my-pi.git 'v<version>'
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Search that source by the name of a construct or a setting, never by its value: one value is
|
|
430
|
+
spelled in many places, and the code that sets it may spell it in none. If the module the binary
|
|
431
|
+
names is absent at that tag, the binary is the ground truth: measure it, and say the source did not
|
|
432
|
+
carry it. In a pod the binary (`$LEGION_OMP_PATH`) is the build the worker image was made from,
|
|
433
|
+
and your workspace's `.omp-pin` can name another, so the tag you read may not be the build you
|
|
434
|
+
measure: compare `"$LEGION_OMP_PATH" --version` with the pin first, and say which build each
|
|
435
|
+
figure came from
|
|
436
|
+
(`docs/solutions/testing/a-worker-pods-oh-my-pi-is-the-fleets-pin-not-the-branchs-fetch-the-branchs-build-and-say-which-pin-each-figure-came-from-LEGION-247.md`).
|
|
437
|
+
|
|
438
|
+
## The tests your pod cannot run
|
|
439
|
+
|
|
440
|
+
Some tests fail in a Kubernetes issue pod whatever your change, because of the pod, not the branch.
|
|
441
|
+
A tmux pane runs on its host, and none of this holds there. Their proof is CI's run at the head:
|
|
442
|
+
cite that run, and name in your handoff each package the pod could not run. The cases below are
|
|
443
|
+
the known ones, not every one: a failure they do not name is yours to explain.
|
|
444
|
+
|
|
445
|
+
- **gVisor.** Every pod runs under gVisor, which does not give a test every interface the Linux
|
|
446
|
+
kernel does. In `packages/envoy` the tests of `cmd/agent-secrets`, `cmd/agent-secrets-helper`
|
|
447
|
+
and `internal/broker/helper` fail: the helper identifies its peer with `SO_PEERPIDFD`, which
|
|
448
|
+
gVisor answers `protocol not available` (`PEER_UNIDENTIFIED` in the test output). The
|
|
449
|
+
terminal-prompt tests of `cmd/agent-secrets` also need terminal job-control ioctls
|
|
450
|
+
(`inappropriate ioctl for device`), and the `SigCgt` line of `/proc/<pid>/status`, which the
|
|
451
|
+
pods' gVisor lacked on 2026-10-28; upstream gVisor added that line on 2026-09-24, so a node on a
|
|
452
|
+
later release may have it. A timing test can fail too: `internal/dispatch/pmdoc`'s linearity
|
|
453
|
+
tests time a call by the process's CPU time, which gVisor counts in 10 ms ticks, so a call under
|
|
454
|
+
10 ms can measure 0 s and the test reports `+Inf times`.
|
|
455
|
+
- **No Docker.** The image carries no container runtime, so a test that starts one through
|
|
456
|
+
testcontainers panics `rootless Docker not found`: in `packages/envoy`, the tests that use
|
|
457
|
+
`internal/tests3` (`internal/dispatch/files`, which `DISPATCH_TEST_NO_CONTAINERS=1` skips) and
|
|
458
|
+
`internal/testpg` (unless `DISPATCH_TEST_DATABASE_URL` names a Postgres).
|
|
459
|
+
- **The rest, by package.** For the Dispatch server's suites (a Postgres whose only collation is
|
|
460
|
+
byte order, which `internal/dispatch/api` refuses, and `@legion/proof-editor` missing until
|
|
461
|
+
`bun install` has run):
|
|
462
|
+
`docs/solutions/testing/the-dispatch-servers-go-suites-in-an-issue-pod-run-api-and-docs-alone-with-a-timeout-and-read-the-c-collation-docker-and-bun-failures-as-the-environment-LEGION-752.md`.
|
|
463
|
+
For the daemon's:
|
|
464
|
+
`docs/solutions/testing/go-test-in-a-worker-pod-leaves-gowork-to-go-work-and-names-the-packages-the-pod-cannot-run-LEGION-630.md`.
|