@sjawhar/pi-legion 19.10.1 → 19.11.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.
package/dist/legion.js CHANGED
@@ -25907,7 +25907,9 @@ var legionIssue = object({
25907
25907
  check: legionCheckView.optional(),
25908
25908
  memoryGroup: _enum2(["memory", "none"]).optional(),
25909
25909
  memoryDrawMode: _enum2(["off", "on", "random"]).optional(),
25910
- memoryDrawnAt: timestamp.optional()
25910
+ memoryDrawnAt: timestamp.optional(),
25911
+ phaseEntry: number2().int().nonnegative().optional(),
25912
+ givenEntry: number2().int().nonnegative().optional()
25911
25913
  });
25912
25914
  var daemonInfo = object({
25913
25915
  project: nonEmptyString2,
@@ -28478,7 +28480,7 @@ import { logger as logger3 } from "@oh-my-pi/pi-utils";
28478
28480
  // package.json
28479
28481
  var package_default = {
28480
28482
  name: "@sjawhar/pi-legion",
28481
- version: "19.10.1",
28483
+ version: "19.11.1",
28482
28484
  license: "Apache-2.0",
28483
28485
  type: "module",
28484
28486
  omp: {
@@ -28490,7 +28492,7 @@ var package_default = {
28490
28492
  ]
28491
28493
  },
28492
28494
  legion: {
28493
- daemonApiVersion: 87
28495
+ daemonApiVersion: 94
28494
28496
  },
28495
28497
  repository: {
28496
28498
  type: "git",
@@ -30002,8 +30004,9 @@ var PHASE_OP_SENTENCES = {
30002
30004
  readReleaseRecords: "read_release_records returns this deployment's idle-release records from `since` (an RFC 3339 time) on, read with this session's own claim: " + "every release, resume and hold the daemon recorded, and over them the counts of releases, of the releases among them that suspended no " + "role, of resumes by wake kind and of holds by reason, the pod-hours released, the share of releases woken again within ten minutes, and " + "the median, 90th percentile and maximum seconds from a wake to the woken role's first turn. A release that suspended no role is woken by " + "nothing, so the pod-hours released and the woken share count the releases that suspended a role alone. ",
30003
30005
  requestBackwardMove: "request_backward_move returns an issue to an earlier phase (`to`, `reason`): a phase worker moves its own issue; " + "the tree's architect moves an issue in accepting, named by `issue`, back to implementing or testing, which counts a review round. "
30004
30006
  };
30007
+ var STALE_ENTRY_INSTRUCTION = "End this turn without completing. The task of the entry the phase is on is owed to this claim, and the daemon sends it by itself. " + "That task is work of its own: do what it asks at the head it names and complete it with a handoff of its own, never this completion's " + "record, commit or verdict";
30005
30008
  function legionToolDescription(host) {
30006
- return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet). A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads the phase's newest record from Dispatch and reports it; the implementer's round also reports the commit " + "`legion/<issue>@origin` names, so push the branch first; retro and the merger's completion report the commit the workspace stands on. It " + "refuses, posting nothing, a phase with no record, a Dispatch that does not answer, or an implementer's `@-` not yet on " + "`legion/<issue>@origin`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ASSIGNMENT (the issue left your phase and came back while your turn ran, so this completion is of the assignment before the one " + "the phase hands you now: end the turn without completing; the task of the assignment it hands you now is work of its own, so do that work and " + "complete it with a handoff of its own, never this record or verdict again), the implementer's completion of implementing with no open " + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update task on this issue's pod: `round` is the round id that task names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first, because the pod and its disk are replaced after every worker of the pod has answered. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
30009
+ return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet). A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads the phase's newest record from Dispatch and reports it; the implementer's round also reports the commit " + "`legion/<issue>@origin` names, so push the branch first; retro and the merger's completion report the commit the workspace stands on. It " + "refuses, posting nothing, a phase with no record, a Dispatch that does not answer, or an implementer's `@-` not yet on " + "`legion/<issue>@origin`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update task on this issue's pod: `round` is the round id that task names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first, because the pod and its disk are replaced after every worker of the pod has answered. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
30007
30010
  }
30008
30011
  async function mintClaimGrant(daemon, claim) {
30009
30012
  const { grantId } = await daemon.grant({
@@ -31,6 +31,8 @@ and 7 (a conflict, the hand-over, the close) is in
31
31
  | A reply on an ask you follow | Interpret the reply in the issue's design context. Answer in its thread (`dispatch comment --reply-to <comment id>`; under an open ask whose next move is yours, such as the approval request you must revise or hand back, `--reply-to-ask <ask id> --turn agent`, since a default-turn reply hands that request back to the human and a corrected `--summary` is then refused) where the reply carries a question, a disagreement, a correction or a fact you do not have, and whenever you are unsure; an approval, or an answer that settles the question with nothing left to say, draws no comment and no message back to the person who answered. Then adjust the plan or relay the reply via `envoy_publish` to the responsible worker's role token, which an answer needing nothing from you still needs; scope and product decisions remain with you. |
32
32
  | `worker-died` | Its `role` and `phase`. That role's claim failed: its launches or prompts ran out, or its provider refused every turn of its session (its `failure.detail` reads `the provider refused <n> turns in a row: <message>`). For a phase worker the daemon holds the issue (phase `held`) and starts nothing more on it. It carries `failure` as well (the notice of a held phase, and that of a role which does not work the issue's phase; the one that ends a closed issue's production-check look carries neither `failure` nor `phase`, its `reason` naming the cause already): `cause`, one cause word of the seven the daemon chooses from (`launch_refused`, `died`, `never_registered`, `stale_plugin`, `prompt_retires_exhausted`, `provider_error`, and `unrecorded` for a failure recorded before the daemon kept a cause), `detail`, the sentence written beside that word, `death` and `startFailure`, what the runtime and the launcher last said of this claim where it recorded either, and `launchFailures`, `deaths`, `promptFailures` and `promptRetires`, each a `count` beside the `limit` it ran out at. The claim's record in `read_record` carries the same `failure`, and the issue's `heldFrom` names the phase the hold took it out of. Reassess the work, then decide with `retry_or_escalate`: `retry` when the failure looks agent-specific or transient, `escalate` to hand the held issue to the controller when it looks environmental. `reason` is optional on either decision: a `retry`'s reaches the restarted worker's task, so say in it what you changed or what you want done differently, and an `escalate`'s reaches the controller as the `escalation` key of the `held` notice that records it, so say in it why the tree cannot go on without a decision of the controller's. A `retry` of a claim that failed on refusals starts a **new session**, since resuming the one the provider refused would be refused again: that worker has read none of its own earlier work, and is told so in its first task, which names its branch and the handoffs to read. Expect it to re-read before it continues, and tell it anything only you know. |
33
33
  | `worker-stalled` | Its `role` and `reason`. The daemon's stall backstop acted on that worker's stalled turn: its agent had not stepped for longer than the `worker_stall_backstop_hours` this deployment gives the role, and most often the daemon ended the turn and brought the same session back on a new process. The `reason` is the record the daemon read — when the agent last stepped and how long ago that was, the bound it passed, when the turn began, and the last call the daemon saw, with its tool, its call id, when it started and whether it ended — and never a call's arguments, whose text the daemon keeps in no column. It says what the daemon did as well, which is not always a relaunch: where the daemon's wake pacing parked the replacement, the task was taken back and the launch that replaces the stalled process is queued, due at the moment the notice names, and that process runs on until the launch's turn, which may start nothing — a suspension waiting for the claim, a refused lifecycle recheck or the tree's close can end the claim there instead; where a suspension was already waiting for that turn, that suspension ran instead of a replacement and the claim is suspended with nothing queued for it, waiting on a resume; where the launch that replaces the process could not be written, the daemon is still retrying that launch; and where every try at that launch was refused, the claim has failed, and the `worker-died` that comes with it is yours to answer as that row says. It says what became of the stalled process too, for every end but the parked one: that it was stopped, or that the runtime did not confirm the stop, in which case that process may be running still and holding what it runs on — tell the controller of that one, because the daemon stops it again only at its next launch of that claim or at its next restart. No second notice follows any of these unless the daemon restarts while a relaunch is parked, which decides the claim again. The task that worker was serving is still owed to it, and what its return waits on is the one the notice names — the parked launch's turn, the retried launch, or a resume; the stall itself charged the claim nothing, and no phase moved: on every end but the failed one the phase goes on by itself and you start nothing. Your part is to read what the record says the agent was doing and to judge whether that work needs a decision of yours — a call that hung on something the plan did not foresee is one, a turn that comes back and finishes is not. A stall of your own session reaches you the same way, on your own issue; when the stalled claim is a tree's architect, the controller is told of it too. |
34
+ | `worker-silent` | Its `role` and `reason`. That worker stopped between turns rather than inside one: its process is up, it holds no task, and its agent has not stepped for longer than the `worker_silence_minutes` this deployment sets, so nothing in the daemon and nothing in that process was going to prompt it again. The `reason` is the record the daemon read — the issue, the role, the phase, when the agent last stepped and how long ago that was — and it ends with what the daemon wrote about it, read from the phase entry the role's phase row names: the start row that sends the work of that entry, where the worker's claim was never given it, or the start row that sends the phase's task again, where the claim is on that entry already, naming the entry where the row holds one. That row is written and the worker is coming back with that work: read the issue's record with the `legion` tool's `read_record` to see where the phase stands, and start nothing yourself. The one thing that still refuses the start is a suspension an operator holds over the claim, which the outbox reads when it runs the row and which the `reason` names: ask the operator to resume that claim, and message the role on its topic (`envoy_publish`) where its phase cannot wait. It comes once for each silence, and a worker that takes a step and then goes quiet again is told again. |
35
+ | `worker-background-stalled` | Its `role` and `reason`. That worker's own session reports background work of its own — an async job, a subagent, a background task — still running, and it has reported the same thing without change for longer than the `worker_background_hours` this deployment sets. The `reason` is the record the daemon read: the issue, the role, the phase, the kinds the session named, when it last reported them and how long ago that was. Nothing was sent to that worker and nothing will be sent for this: the daemon cannot tell a job that hung from a long one, so it names the worker to you and decides nothing. Your part is to read what the session says it is waiting on and to judge whether that work needs a decision of its own — a job waiting on a surface that does not exist, or on a person, is one; a long build or a long test run is not. Read the issue's record with the `legion` tool's `read_record` for where the phase stands, then either leave the work to finish or message the role on its topic (`envoy_publish`) with what you decide. The worker is not prompted by the silence repair while it reports such work, so nothing else is coming for it either. It comes once for each standing report: a worker whose reported work changes — a job that ends and another that starts — is told of again under the new report. |
34
36
  | `held` | Its `role` and `phase` (the phase the issue left), or `phase` with `reason: "escalated"`. Without `reason`, that phase's worker ran out of launches or prompts: the issue is held (phase `held`), the notice carries the same `failure` record as the `worker-died` that comes with it, which is yours to answer with `retry_or_escalate` as that row says, and the controller hears of the hold too. With `reason: "escalated"`, it records your own `escalate`: the controller has the issue now, it carries no `failure`, and you start nothing for it. It carries `escalation` instead, your own `reason` from that `escalate`, and carries none where you named none: the controller reads it as your account of why the issue is its, beside the cause word in the claim's own `failure` record, so say in it what the tree cannot go on without. Your `retry` is not the only release: a `todo` written on a held root releases the hold the same way and at the same price of nothing, whoever writes it, so an issue you left held may be working that phase again when you next read it. |
35
37
 
36
38
  ## A root that joins your tree, and a refused release
@@ -190,7 +190,9 @@ where. Each issue you file carries a `Filed for` line:
190
190
  ## Daily report
191
191
 
192
192
  On your first turn of each UTC day, post what Legion finished, what it closed without a change
193
- and why, and what runs: `skill://legion-controller/references/daily-report.md`.
193
+ and why, what runs, and every issue whose phase worker nothing will prompt, which a tick names in
194
+ its `silent` list (`skill://legion-controller/references/wakes.md`):
195
+ `skill://legion-controller/references/daily-report.md`.
194
196
 
195
197
  ## Deployment instructions
196
198
 
@@ -67,6 +67,13 @@ every issue by its `dispatch://` link and what it does for the reader, every pul
67
67
  link's wait ends when each blocker reaches `done` (a person's close, or the blocker's own
68
68
  merge) or its link is taken off (by a person or the tree's architect), and a children-first wait
69
69
  ends when the last open child leaves the workflow, so take nothing for them.
70
+ - **Phase workers nothing will prompt.** Each entry of the tick's `silent` list, with the role whose
71
+ claim is silent and how long it has been quiet (`skill://legion-controller/references/wakes.md`).
72
+ That list arrives on the tick wake alone and is in no `read_state` field, so the report names the
73
+ most recent tick's list and says nothing of them on a day no tick carried one.
74
+ An entry with `backgroundSince` is a worker whose own background work has stood past `worker_background_hours`,
75
+ which the daemon does not prompt.
76
+ Name it with how long that work has stood, counted from `backgroundSince`.
70
77
  - **Free slots.** Counted as the skill's "Free slots" says, in issues rather than trees; each
71
78
  stays free until an issue in the line takes it.
72
79
  - **Open capabilities.** Each row of `read_state`'s `capabilities` whose `status` is `open`: its
@@ -32,7 +32,7 @@ child, so the issue it names may be either. Name the free slots; take nothing.
32
32
  daemon waits half a minute and folds that window's events into one wake. Take nothing: it is not
33
33
  Legion's.
34
34
 
35
- ## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?}`)
35
+ ## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?, silent?}`)
36
36
 
37
37
  The daemon's periodic wake, a minute after it starts and then every
38
38
  `controller_wake_interval_seconds` (an hour by default), whatever the slots. Run the skill's every-turn
@@ -57,6 +57,32 @@ link is taken off (by a person or the tree's architect), and a children-first wa
57
57
  last open child leaves the workflow: name the waits in the day's report and
58
58
  take nothing for them.
59
59
 
60
+ `silent`, when present, is `[{issue, role, lastStep, silent, backgroundSince?}, …]`: every issue whose phase worker
61
+ nothing will prompt, with the role whose claim is silent, the moment that claim's agent last
62
+ stepped, and how long it has been quiet.
63
+ Such a worker's process is up and between turns, it holds no task, and its last recorded step is
64
+ older than this deployment's `worker_silence_minutes`, so nothing in the daemon and nothing in the
65
+ worker's own process was going to prompt it again.
66
+ The daemon writes the start row that sends that phase's task again, and tells the issue's
67
+ architect the same fact in a `worker-silent` notice.
68
+ An entry with `backgroundSince` is a worker whose own background work has stood since that moment,
69
+ past `worker_background_hours`, which the daemon does not prompt; its architect got a `worker-background-stalled` notice.
70
+ Name it in the day's report with how long its background work has stood.
71
+ Most entries here are ones that architect has been told of, and an entry is not proof of it: this
72
+ list is derived at the tick from the record, where the notice is written by the sweep that runs
73
+ each minute, so an issue that went quiet since the last sweep is named here before its architect
74
+ hears anything.
75
+ One reading parts the two as well, and it leaves an issue named here whose architect is told
76
+ nothing: this list asks nothing of the claim's serving run, where the sweep's fact names it and the
77
+ handler refuses a fact of another generation.
78
+ So read the issue's record for every entry rather than taking its architect as told:
79
+ `read_state`'s `issues.<KEY>` gives its phase and each role's claim, and says whether the worker
80
+ has moved since the tick was queued.
81
+ Where the architect of that issue is itself a claim that is not answering — its claim reads
82
+ `failed`, or the Envoy registry shows its session gone — `fresh_session` on that architect, because
83
+ a notice sent to a claim that reads nothing reaches nobody and the work stands still.
84
+ Name each silent issue in the day's report, with its role and the length of its silence.
85
+
60
86
  ## `unslotted on <KEY>` (`{kind: "unslotted", reason}`)
61
87
 
62
88
  Either a root that waited for a slot was moved from `todo` to the status `reason` names, by a
@@ -19,7 +19,7 @@ You work one phase of one issue in a jj workspace every role of the issue shares
19
19
 
20
20
  ## Stop rules
21
21
 
22
- - **A refused completion is information, not a retry loop.** Quote the answer verbatim to the architect, so "my work is lost" and "my work belongs to an ended run" read differently. `HANDOFF_STALE_GENERATION` (the issue is on a newer run) or `HANDOFF_NO_RUN` (the daemon can attribute your completion to no run: your claim holds no task of this issue's current run and phase — no task at all, or one of another run, of another phase, or of no phase — and the answer says which of those it holds): push nothing further, end the turn without completing, and tell the architect; if the task then arrives and its work and handoff are already done, call `handoff_complete` again in that task's turn, and never redo the work or write a second handoff. `HANDOFF_STALE_ASSIGNMENT` (the issue left your phase and came back while your turn ran, so your work belongs to the assignment before the one the phase hands you now): end the turn without completing and tell the architect, and report that work and that verdict no further. The phase was entered again, so the task it hands you now is work of its own — a testing assignment after a red is for the head the fix pushed, which your verdict on the head before it does not answer for: do that work at the head the task names, write a handoff of its own for it, and complete in its turn. `HANDOFF_NOT_CURRENT_PHASE`: the issue left your phase; report, never complete again. `HANDOFF_NO_PULL_REQUEST` (the implementer's completion found no open pull request on `legion/<KEY>`, and none recorded merged): open it and complete again at the same commit; when the answer names a closed pull request, the architect decides the phase: tell it, and open or reopen nothing until it answers. `HANDOFF_ALREADY_RECORDED`: the first answer stands; if you did not see it, tell the architect. `HANDOFF_SESSION_MISMATCH` names a record another session wrote: read it, record it again from your session with `dispatch handoff-write`, and complete. A reminder is not a task: after an accepted completion, a second call is refused.
22
+ - **A refused completion is information, not a retry loop.** Quote the answer verbatim to the architect, so "my work is lost" and "my work belongs to an ended run" read differently. `HANDOFF_STALE_GENERATION` (the issue is on a newer run) or `HANDOFF_NO_RUN` (the daemon can attribute your completion to no run: your claim holds no task of this issue's current run and phase — no task at all, or one of another run, of another phase, or of no phase — and the answer says which of those it holds): push nothing further, end the turn without completing, and tell the architect; if the task then arrives and its work and handoff are already done, call `handoff_complete` again in that task's turn, and never redo the work or write a second handoff. `HANDOFF_STALE_ENTRY` (your completion is of a phase entry behind the one your role's phases row names, because the phase was entered again while your turn ran, and nothing was recorded): end the turn without completing, and report that work and that verdict no further. The task of the entry the phase is on is owed to you, and the daemon sends it by itself, so ask no one for it. That task is work of its own — a testing entry after a conflict is for the head the implementer's merge forward pushed, which your verdict on the head before it does not answer for: do what it asks at the head it names and complete it with a handoff of its own, never this completion's record, commit or verdict. The same code on a completion of an entry above the one your phases row names, which the daemon never hands out, means: end the turn without completing and tell the architect. `HANDOFF_NOT_CURRENT_PHASE`: the issue left your phase; report, never complete again. `HANDOFF_NO_PULL_REQUEST` (the implementer's completion found no open pull request on `legion/<KEY>`, and none recorded merged): open it and complete again at the same commit; when the answer names a closed pull request, the architect decides the phase: tell it, and open or reopen nothing until it answers. `HANDOFF_ALREADY_RECORDED`: the first answer stands; if you did not see it, tell the architect. `HANDOFF_SESSION_MISMATCH` names a record another session wrote: read it, record it again from your session with `dispatch handoff-write`, and complete. A reminder is not a task: after an accepted completion, a second call is refused.
23
23
  - **A turn that ends with your phase open is reminded**, at the end of every turn for as long as the phase stays open. Answer by completing, or with a WAITING line naming what you wait on, which buys a quiet wait; a turn that ends while background work of your own is still running buys the same quiet with no line at all, since that work wakes you when it finishes. A run of reminders that change nothing tells your architect. Under `runtime: kubernetes` that quiet wait also lets the daemon release your issue's pod, while background work of yours keeps the pod, because your session reports that work to the daemon.
24
24
  - **A released pod is not a stop.** Under `runtime: kubernetes` the daemon releases your issue's pod once no role of it has a turn in progress or a turn due for ten minutes. Every role process of the pod ends, and the pod, its disk and its Sandbox are deleted. Your session, your phase, your place in it and the task you hold are all kept, and the daemon saves the workspace's unpushed commits and its working-copy change as a git bundle that the next pod restores before any role starts. A wake brings the pod back and resumes this session, so a release costs a pod start and nothing else. The daemon wakes you with a task, a notice, a phase start, a backward move, a phase-ended message, a production-check look or a slot resume. A message published to your role topic wakes you, and so does an Envoy direct message or a person's answer, comment or message that Dispatch routes to your session. A CI settlement that the daemon records for the head of your issue's pull request wakes you while your phase is open. A wait that raises none of those events wakes you at the backstop alone, 60 minutes after the release, and only while your phase is open: a Dispatch topic you subscribed to, CI of another repository, a deploy run and a Kubernetes Job are such waits, so name the wait in your WAITING line and expect that hour. A release keeps your unpushed tracked work, which is every commit no remote branch holds, your working-copy change and the local bookmarks that point at them. It keeps nothing else of the disk: `$TMPDIR`, every ignored file, every file larger than jj's `snapshot.max-new-file-size`, each role's home with its `local://` files, a test Postgres and the CodeGraph index all go with the pod. A named Oh My Pi `bash` service goes with the pod too, because it runs outside your session's job manager and your session reports nothing about it. A release keeps nothing else of the disk — `$TMPDIR`, every ignored file, each role's home, a test database and the CodeGraph index all go with the pod — so put work you must keep on the branch, in a tracked file or in Dispatch.
25
25
  - **The workspace is read-only for you from the moment your phase ends**, whether you ended it by completing or the daemon took it back while your turn ran: no commit, no `jj new`, no edit to a tracked file, in the turn still running when the message reaches you and in every turn after it, until a new task names your phase. Nothing stops that turn for you, so stopping is yours to do: drop the work in hand and leave whatever you have uncommitted. The active phase owns the workspace, and your session is kept, until your issue leaves the workflow, to answer questions and to take your next assignment.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion",
3
- "version": "19.10.1",
3
+ "version": "19.11.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {
@@ -12,7 +12,7 @@
12
12
  ]
13
13
  },
14
14
  "legion": {
15
- "daemonApiVersion": 87
15
+ "daemonApiVersion": 94
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",