@sjawhar/opencode-legion-envoy 8.16.0 → 8.17.1

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.
@@ -88,8 +88,8 @@ into the branch only on a real conflict or a retarget
88
88
  implementer's own proof on a production-like surface at the head that merges, an applied simplify
89
89
  head included (`skill://legion-worker/references/pr-body.md#what-a-proof-is`,
90
90
  `skill://legion-worker/references/pr-body.md#the-rules-every-phases-evidence-follows`); and the
91
- implementer's production check after the merge
92
- (`skill://legion-worker/references/merge-gate.md#after-the-merge`).
91
+ implementer's production check after the merge closes the issue
92
+ (`skill://legion-worker/references/merge-gate.md#the-production-check-after-the-close`).
93
93
 
94
94
  ## Asking another role
95
95
 
@@ -304,12 +304,12 @@ line), the full definition of a proof, what the tester verifies, and the simplif
304
304
  forward merge and never `jj rebase`; the unchanged-diff fingerprint each role compares
305
305
  afterwards is in the same reference: `skill://legion-worker/references/conflicts-and-rewrites.md`.
306
306
  - **The merge gate**, in order: the tester's evidence green → the reviewer's approval of the head
307
- → retro → the merger's READY → the merge → the implementer's production check. On READY's
308
- acceptance the daemon submits the merge of the head READY named, unless the answer's note begins
309
- `MANUAL_MERGE_REQUIRED:`, where a person merges it; no role runs `gh pr merge`, and the
310
- repository's required reviews and checks decide when it lands
311
- (`skill://legion-worker/references/merge-gate.md`). The reviewer's submissions, retro's commit,
312
- the merger's READY, the daemon's submission, and the production check follow the same reference.
307
+ → the architect's acceptance → retro → the merger's READY → the merge, which closes the issue →
308
+ the implementer's production check, after the close. On READY's acceptance the daemon submits
309
+ the merge of the head READY named, unless the answer's note begins `MANUAL_MERGE_REQUIRED:`,
310
+ where a person merges it; no role runs `gh pr merge`, and the repository's required reviews and
311
+ checks decide when it lands (`skill://legion-worker/references/merge-gate.md`). The reviewer's
312
+ submissions, the acceptance, retro's commit, READY, the daemon's submission, and the check follow the same reference.
313
313
  - **No surface reaches the changed path** is a report to the architect, never a reason to
314
314
  complete the phase: `skill://legion-worker/references/pr-body.md`.
315
315
 
@@ -370,9 +370,9 @@ check, or the `MANUAL_MERGE_REQUIRED:` note of a pull request a person merges).
370
370
 
371
371
  Retro's last commit removes `.legion/<issue>/` from the head that merges (`skill://legion-retro`);
372
372
  a round after it, such as one a withdrawn READY sends back, writes and commits its own handoff
373
- again, since `handoff_complete` reports the commit carrying the file. Retro, the merger and the
374
- post-merge production check write no `.legion/<issue>/<phase>.json`, commit no handoff, and report
375
- with `handoff_complete` alone, which reports the commit the workspace stands on.
373
+ again, since `handoff_complete` reports the commit carrying the file. Retro and the merger write no
374
+ `.legion/<issue>/<phase>.json`, commit no handoff, and report with `handoff_complete` alone, which
375
+ reports the commit the workspace stands on; a look of the production check after the close reports with `handoff_complete` and a `verdict`, and no commit at all.
376
376
 
377
377
  **Every role pushes its own commits.** After the handoff commit — and, for the tester, the red
378
378
  tests it wrote — push the issue branch with the plain `jj` of your pane, from bash in your
@@ -1,11 +1,12 @@
1
- # The merge gate: review, retro, READY, and the production check
1
+ # The merge gate: review, acceptance, retro, READY, the merge, and the production check
2
2
 
3
3
  Part of `skill://legion-worker`. Read it when you are the reviewer submitting a review or an
4
- approval, the implementer recording the production check, or the merger building READY. Every
5
- path it cites is in sjawhar/legion.
4
+ approval, the implementer on a look of its closed issue's production check, or the merger
5
+ building READY. Every path it cites is in sjawhar/legion.
6
6
 
7
- The order, in full: the tester's evidence green → the reviewer's approval of the head →
8
- retro → the merger's READY → the merge → the implementer's production check. The approved
7
+ The order, in full: the tester's evidence green → the reviewer's approval of the head → the
8
+ architect's acceptance, in `accepting` → retro → the merger's READY → the merge, which closes the
9
+ issue → the implementer's production check, after the close. The approved
9
10
  head carries the issue's handoffs, `.legion/<issue>/`; retro's last commit removes them from the
10
11
  head that merges (dispatch://LEGION-605), since a squash merge commits that head merged into
11
12
  the default branch and nothing there reads a handoff, and READY refuses a head that still
@@ -92,6 +93,18 @@ longer has. The daemon moves the issue once both are in — the decision GitHub
92
93
  completion, in either order — so a review posted without a completion leaves the issue in
93
94
  reviewing until you finish.
94
95
 
96
+ ## The architect's acceptance
97
+
98
+ - Between the reviewer's approval and retro the issue sits in `accepting` (Dispatch status
99
+ `needs_review`), where no worker is started: the tree's architect reads the evidence (the
100
+ tester's handoff, the PR body's `E2E (implementer)` and `E2E (tester)` lines, the reviewer's
101
+ approval of the head by SHA, and for a parent that every child is done) and accepts with the
102
+ `legion` tool's `sign_off`, which moves the issue to retro, or sends it back to `implementing`
103
+ or `testing` with `request_backward_move` and a reason, which reaches the started worker's task
104
+ as its `Reason:` line and counts a review round. The acceptance asks no `Production:` line of
105
+ anyone: that line is written after the close (*The production check after the close*, below).
106
+ CI red at the head in `accepting` returns the issue to `implementing` as it does in review.
107
+
95
108
  ## Retro
96
109
 
97
110
  - **Retro's commits do not void the reviewer's approval.** Retro's commits above the approved
@@ -104,8 +117,8 @@ reviewing until you finish.
104
117
  with no review round after it brings the base's paths above that head, so READY refuses it the
105
118
  same way; one sent back through `implementing` by the conflict procedure gets its confirmation
106
119
  before READY runs. A READY refusal's return reaches the reviewer as a new round, never a
107
- fingerprint confirmation. Every approval moves the issue to
108
- retro again, so each retro ends with the removal again.
120
+ fingerprint confirmation. Every approval goes through the architect's acceptance to retro
121
+ again, so each retro ends with the removal again.
109
122
  - **Retro brings the PR body's path-derived content up to date before its push.** Whatever the
110
123
  repository's instructions derive from the pull request's changed paths (a checklist named for
111
124
  each class of path, read by a required check), retro recomputes for the whole diff at its head
@@ -200,25 +213,58 @@ reviewing until you finish.
200
213
  request reopened at an awaiting READY's head gets that head's merge submitted again. No role runs
201
214
  a disarm.
202
215
 
203
- ## After the merge
216
+ ## The production check after the close
204
217
 
205
- - **After the merge, the implementer verifies in production.**
206
- The daemon starts the implementer again once the merge lands; the implementer watches the
207
- deploy slot that carries the merge to `production-apply` (or the equivalent publish step),
208
- drives the changed path in production through the user's own access path, and records the
209
- observation on the PR and the issue before the architect signs off. A staging pass is not
210
- this, since a staging gate does not run every resource production does. If the slot fails on
211
- the change, the implementer owns the fix and the next slot.
212
- The record has three places: the PR body's `Production:` line, one pull-request comment
213
- carrying the Legion footer, and a `dispatch message` on the issue — the reviewer and merger
214
- read GitHub, the architect reads the issue. When the deploy that carries the merge has not
215
- happened (a shared profile still holding the previous plugin release, a daemon still running
216
- the previous commit, a slot nobody has run) and you cannot perform it yourself, ask the agent or
217
- role the deployment instructions name for that deploy: `envoy_publish` to its role topic with the
218
- merge commit and `expects_reply: required`, then wait on the production signal the instructions
219
- name. Open a `dispatch ask` to a person only when the instructions name nobody for that deploy;
220
- it starts with the production gap and why it matters, then names the required install or restart
221
- step, its risk, and outcome-named options. Never ask anyone for approval to deploy. Keep the
222
- `Production:` line at `pending <what is missing>`, and complete the check once that signal shows
223
- the deploy carries the merge (or the person answers, when an ask was the route). Never record a
224
- staging pass as the production check, and never let the architect sign off on a `pending` line.
218
+ - **The merge closes the issue; the production check is the implementer's work after the close.**
219
+ When the pull request merges, the daemon writes `done` and, in the implementer's session, still
220
+ live, hands it the check task. Its first line is `Production check of <KEY>: <title>.`, and it
221
+ names the repository, the pull request, the merge commit, the look's number, what woke the look
222
+ (`the merge`, for the first) and whether it is the last. A resumed session tells the check task
223
+ from its last phase task by that first line. The check carries no phase and no handoff: a look
224
+ ends with `handoff_complete` carrying a `verdict` and a `summary`, no commit, and the daemon
225
+ refuses a report on an issue with no open check (`CHECK_NOT_OPEN`), on a look already ended
226
+ (`CHECK_LOOK_NOT_OPEN`), or with no verdict of `pass`, `pending` or `fail`
227
+ (`CHECK_VERDICT_REQUIRED`).
228
+ - **Each look does three things.** Do what the deployment instructions say to reach the deploy:
229
+ when they name an agent or role for it, `envoy_publish` the merge commit to that role's topic
230
+ with `expects_reply: none`, and await no reply. Read whether production carries the merge. Then
231
+ report one of three outcomes:
232
+ - `pass`, once you drove the changed path in production through the user's own access path and
233
+ wrote the record: the PR body's `Production:` line,
234
+ `<what was checked in production, how, what was observed> — merge commit <sha>; woken by <event>`,
235
+ and one pull-request comment carrying the Legion footer. A staging pass is not this, since a
236
+ staging gate does not run every resource production does.
237
+ - `pending`, when production does not carry the merge yet (a shared profile still holding the
238
+ previous release, a daemon still running the previous commit, a deploy nobody has run): the
239
+ summary names what is missing, and the `Production:` line stays at
240
+ `pending deploy of <merge sha>`.
241
+ - `fail`, for a defect: file it as an issue of its own in the issue's project with
242
+ `dispatch issue` (`--external <owner>/<repo>#<n>` links the pull request; its spec names the
243
+ closed issue as `dispatch://<KEY>`), never as a child of the closed issue, and name the new
244
+ issue in the `Production:` line and in the summary.
245
+ - **Nothing waits in the session for a deploy.** A `pending` ends the look: the daemon suspends
246
+ your claim with its session and the issue's volume kept, the pod goes, and the daemon wakes the
247
+ check (the pod comes back and your session resumes with a new check task) on Dispatch's
248
+ `issue.deployed` event for the pull request, or, for `sjawhar/legion`, on a Legion daemon's boot
249
+ on a build containing the merge, on Dispatch's `server.started` naming such a build, or on the
250
+ build the daemon read from Dispatch at its boot. The woken look's task names the event
251
+ (`Dispatch's issue.deployed: run <id> completed <t>`, `the Legion daemon's boot on build <sha>`,
252
+ `Dispatch's start on build <sha>`, `Dispatch's build <sha>`), and its `Production:` line names
253
+ it too, so the pull request carries the cause. Never poll for the deploy, never wait on a reply,
254
+ and never ask anyone for approval to deploy. Open a `dispatch ask` to a person only when the
255
+ instructions name nobody for that deploy; it starts with the production gap and why it matters,
256
+ then names the required install or restart step, its risk, and outcome-named options, and the
257
+ look still ends `pending`.
258
+ - **The bounds.** A look is bounded at 2 hours: one that reports nothing ends as a `pending`
259
+ would. The whole check is bounded by the project's `production_check_hours` (336, 14 days, by
260
+ default) from the close, and the wake at that bound is the last look, told so in its task
261
+ (`the bound: production did not carry the merge within <N days>`). A `pass` or `fail` there
262
+ closes the check as any look's would; a `pending` closes it as not run, and before reporting it
263
+ you write on the pull request, in the `Production:` line and a comment, that the check did not
264
+ run because production did not carry the merge within the bound.
265
+ - **The record lives on the pull request alone.** Dispatch refuses a message or a comment on a
266
+ closed issue (`ISSUE_CLOSED`), so the deployment instructions' "on the pull request and the
267
+ issue" is the pull request for a closed issue, and a defect reaches Dispatch as the new issue.
268
+ The architect accepted the issue before the merge and is asked nothing after it. `pass` or
269
+ `fail` closes the check: your claim is retired and, for a child, the issue's Sandbox and volume
270
+ are released.
@@ -42,8 +42,8 @@ Negative control: <deliberately broken input or call> → <refusal or failure ob
42
42
  Negative control: <deliberately broken input or call> → <refusal or failure observed>.
43
43
  Verified the implementer's proof by <re-running its command | driving the same surface independently>.
44
44
 
45
- **Production:** <what was checked in production, how, what was observed> — merge commit <sha>.
46
- (written by the implementer after the merge lands; `pending <what is missing>` until then)
45
+ **Production:** <what was checked in production, how, what was observed> — merge commit <sha>; woken by <event>.
46
+ (written by the implementer from the production check after the merge closes the issue, naming what woke that look; `pending deploy of <sha>` until then)
47
47
 
48
48
  **Fast-follow:** <one named cleanup item and where it will land>, or "none".
49
49