axstack 0.11.3 → 0.11.6
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/package.json
CHANGED
|
@@ -9,8 +9,8 @@ Pair A/B is retired for this contract; its artefacts remain untouched.
|
|
|
9
9
|
|
|
10
10
|
## Roles and authority
|
|
11
11
|
|
|
12
|
-
- **driver** — every 15 minutes, fresh Opus session in the
|
|
13
|
-
|
|
12
|
+
- **driver** — every 15 minutes, fresh Opus session in the host's `root`
|
|
13
|
+
folder workspace, which is not a git repository and belongs to no project. It discovers GitHub work, binds the persistent Orca
|
|
14
14
|
Run, creates one project-local child worktree per selected PR, dispatches the
|
|
15
15
|
matching Axstack agent, reconciles completions and decisions, then exits. The
|
|
16
16
|
driver is the automation session itself, with no `axstack-monitor` or
|
|
@@ -75,7 +75,8 @@ Read `cursor.json` and `decisions/`. Work is due for:
|
|
|
75
75
|
- a `deferred[]` entry whose head still matches discovery;
|
|
76
76
|
- an expired repair cap;
|
|
77
77
|
- a dispatch marker older than 3 h;
|
|
78
|
-
- an unsettled Orca delivery in `pending_settlement[]
|
|
78
|
+
- an unsettled Orca delivery in `pending_settlement[]`;
|
|
79
|
+
- a `runtime_refusal` record, because its re-test needs a launched tick.
|
|
79
80
|
|
|
80
81
|
An `open` decision is not due. Write `pending.json` with the fingerprint,
|
|
81
82
|
`observed_at`, `seen[]`, full discovery list, and hashed subset. Append
|
|
@@ -94,16 +95,21 @@ The driver performs this order and exits:
|
|
|
94
95
|
dispatches nothing.
|
|
95
96
|
2. Bind the persistent Run with `orca orchestration run-use` and read the
|
|
96
97
|
inbox. For a `worker_done` matching a live marker, verify the review id at
|
|
97
|
-
the bound head, push range, or opened token. Release the worker;
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
the bound head, push range, or opened token. Release the worker; once its
|
|
99
|
+
release receipt is settled and the process has exited, run the cleanup
|
|
100
|
+
under "Run directory" below, which proves the worktree disposable before
|
|
101
|
+
removing it; then clear the marker. Unverifiable delivery stays in
|
|
100
102
|
`pending_settlement[]` and blocks only that PR.
|
|
101
103
|
3. Consume decisions as their sole consumer under "Decision tokens" below.
|
|
102
104
|
4. Reconcile every marker older than 3 h. A live worker gets `worker-stop`; an
|
|
103
105
|
exited worker gets `worker-abandon`. Unknown liveness or user takeover
|
|
104
|
-
retains worktree and marker and blocks only that PR.
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
retains worktree and marker and blocks only that PR. An abandon is
|
|
107
|
+
confirmed by its accepted abandon receipt plus proven process exit; there
|
|
108
|
+
is no release receipt on this path. After confirmed abandon, run the same
|
|
109
|
+
cleanup under "Run directory" below with its extra clean-tree condition — a
|
|
110
|
+
dirty or unproven worktree is retained, not removed — append one health
|
|
111
|
+
line, increment the head's `abandon_count`, and drop that head so normal
|
|
112
|
+
selection retries once. For a
|
|
107
113
|
review-triggered dispatch, use the marker's `trigger` to remove exactly its
|
|
108
114
|
review id and digest from `processed_reviews[]`. A second abandon at that
|
|
109
115
|
head is a user-owned hold.
|
|
@@ -112,7 +118,9 @@ The driver performs this order and exits:
|
|
|
112
118
|
marker. Dispatch within the repair and review rules below.
|
|
113
119
|
6. Promote the `pending.json` fingerprint verbatim, because it records
|
|
114
120
|
observation rather than completion. Write `tick_done_at` and
|
|
115
|
-
`tick_outcome: ok`, then exit
|
|
121
|
+
`tick_outcome: ok`, then close your own terminal tab and exit: each tick is
|
|
122
|
+
a fresh session and there is no hygiene sweep, so a tab left open outlives
|
|
123
|
+
the tick as a stray terminal in the root workspace.
|
|
116
124
|
|
|
117
125
|
## Dispatch and repair selection
|
|
118
126
|
|
|
@@ -140,8 +148,9 @@ An own PR needs repair when either trigger applies:
|
|
|
140
148
|
|
|
141
149
|
Repair also requires no deploy-on-push head branch, no live repair cap, and
|
|
142
150
|
selection of the lowest own PR in its stack that needs repair. Create a child
|
|
143
|
-
worktree in that project's clone at the exact head, parented to
|
|
144
|
-
worktree
|
|
151
|
+
worktree in that project's clone at the exact head, parented to that
|
|
152
|
+
project's primary worktree so it appears under the project it serves, and
|
|
153
|
+
dispatch one `axstack-watch` agent in authored repair mode. Its
|
|
145
154
|
brief contains only the triggering checks or review findings. Each open
|
|
146
155
|
descendant records one user-owned `pending restack` hold until it stops needing
|
|
147
156
|
repair. The 24 h cap starts at dispatch and an abandon does not refund it.
|
|
@@ -302,8 +311,31 @@ is no gate for health findings.
|
|
|
302
311
|
|
|
303
312
|
## Run directory
|
|
304
313
|
|
|
305
|
-
|
|
306
|
-
|
|
314
|
+
The driver and watchdog run from the host's `root` folder workspace, not a
|
|
315
|
+
project worktree: no project owns the automation, and every child worktree
|
|
316
|
+
belongs to the project it serves. That workspace is not a git repository, so
|
|
317
|
+
the run directory is private host state, one
|
|
318
|
+
`~/.local/share/axstack/runs/<run id>/` directory. Settlement leaves nothing
|
|
319
|
+
behind, but never destroys work. Before any destructive step the driver
|
|
320
|
+
proves the child is disposable: the worker is settled — on the release path
|
|
321
|
+
a settled release receipt, on the abandon path an accepted abandon receipt,
|
|
322
|
+
either with proven process exit; pending or unknown stops here — the
|
|
323
|
+
worktree's HEAD is either the pinned head or a candidate that is durably
|
|
324
|
+
reachable — pushed to the head branch, tested only after a successful
|
|
325
|
+
targeted fetch of that exact remote branch into a per-dispatch ref, never
|
|
326
|
+
`FETCH_HEAD`, so neither a stale tracking ref nor a concurrent fetch in the
|
|
327
|
+
shared clone can fake durability, a failed fetch retaining the worktree — or held by a
|
|
328
|
+
`refs/axstack/decisions/<token>` ref in the project clone; and, on the
|
|
329
|
+
abandon path, the worktree has no uncommitted changes.
|
|
330
|
+
Only then it closes any terminal tab still listed, clears untracked
|
|
331
|
+
artefacts, removes the child worktree and its directory, deletes the branch
|
|
332
|
+
the worktree created, and verifies the directory is gone. On the settled path
|
|
333
|
+
the worker has finished, so untracked files are artefacts by definition and
|
|
334
|
+
are cleared; a candidate there is already pushed or token-held. An abandoned
|
|
335
|
+
worktree that is dirty or holds an unproven candidate is **retained**, named
|
|
336
|
+
in one `health[]` line with its path and SHA, and blocks only that PR with
|
|
337
|
+
the user as owner. A worktree, directory, branch, or terminal that outlives
|
|
338
|
+
its dispatch without such a retention record is a health finding. The run directory contains:
|
|
307
339
|
|
|
308
340
|
- `cursor.json` — driver only, with these exact keys: `fingerprint`,
|
|
309
341
|
`tick_started_at`, `tick_done_at`, `tick_outcome`, `prs{url: {head, base,
|
|
@@ -313,7 +345,9 @@ contains:
|
|
|
313
345
|
`repair_caps{url: {expires_at}}`, `abandon_count{head: n}`,
|
|
314
346
|
`processed_reviews[]` (`review_id`, `pr`, `head`, `digest`),
|
|
315
347
|
`deploy_on_push{repo: [branches]}`,
|
|
316
|
-
`legacy_automation_reviews[]`, `health[]
|
|
348
|
+
`legacy_automation_reviews[]`, `health[]`,
|
|
349
|
+
`runtime_refusal{code, first_seen, last_seen}` (absent when no runtime
|
|
350
|
+
hold is open);
|
|
317
351
|
- `pending.json`, `precheck.log` — driver precheck only;
|
|
318
352
|
- `decisions/<token>.json` — writers assigned by the lifecycle table;
|
|
319
353
|
- `watchdog.log` and `watchdog-state.json` (occurrence `first_observed` values
|
|
@@ -325,9 +359,11 @@ Timestamps are UTC `YYYY-MM-DDTHH:MM:SSZ`; an unparsable timestamp is an
|
|
|
325
359
|
`error` for the precheck and `unknown` for the watchdog, never silently
|
|
326
360
|
ignored.
|
|
327
361
|
|
|
328
|
-
Orca run history is the authoritative log. The launch
|
|
329
|
-
|
|
330
|
-
|
|
362
|
+
Orca run history is the authoritative log. The launch workspace is the host's
|
|
363
|
+
`root` folder workspace, not a project worktree: nobody develops there, it is
|
|
364
|
+
not a git repository, and no project owns the automation. The briefs and the
|
|
365
|
+
escalation template are read from the axstack checkout at an absolute path
|
|
366
|
+
given in the prompt, never relative to the launch workspace. Keep this notification-policy edge in the
|
|
331
367
|
run record: `Notification policy` authorizes the token and watchdog sends;
|
|
332
368
|
delivery uses [axstack-relay](../../axstack-relay/SKILL.md).
|
|
333
369
|
|
|
@@ -338,7 +374,34 @@ delivery uses [axstack-relay](../../axstack-relay/SKILL.md).
|
|
|
338
374
|
- Enumerate deploy-on-push branches from both repair repositories before
|
|
339
375
|
enabling and store them in `cursor.json`; re-check on allowlist changes.
|
|
340
376
|
- A later tick observing resolution or an explicit user decision clears a
|
|
341
|
-
hold. Silence never clears one.
|
|
377
|
+
hold. Silence never clears one. For a hold caused by an Orca runtime
|
|
378
|
+
refusal — a sub-worker dispatch rejected for depth, a launch capability the
|
|
379
|
+
runtime declines — observing resolution means re-attempting the refused
|
|
380
|
+
operation, once per tick, on the next eligible PR: success clears the hold.
|
|
381
|
+
The hold is keyed on Orca's structured error code (for the depth case,
|
|
382
|
+
`nested_worker_depth_exceeded`), stored in `cursor.json` as
|
|
383
|
+
`runtime_refusal {code, first_seen, last_seen}`; the same code keeps the
|
|
384
|
+
hold and updates `last_seen` without a new health line, a different code is
|
|
385
|
+
a new finding. Prose is never the key. When `worker-start` itself is
|
|
386
|
+
refused after the child worktree was created, there is no worker, so the
|
|
387
|
+
settlement proof does not apply; the driver reads the receipt's `failedStage`
|
|
388
|
+
and `residualResources` first. With no Dispatch and no residual resources
|
|
389
|
+
the no-worker branch applies: the worktree's HEAD must equal the pinned
|
|
390
|
+
head and `git status --porcelain` must be empty, and only then does the
|
|
391
|
+
driver remove the worktree, its directory and branch in the same tick.
|
|
392
|
+
With a Dispatch or any residual resource the failed start owns runtime
|
|
393
|
+
state, and retaining alone is not recovery: the driver follows the
|
|
394
|
+
runtime's recovery guide. With a Dispatch: `worker-list` for that run, and
|
|
395
|
+
the row's `nextAction` is an object `{kind, argv}` — a non-empty `argv` is
|
|
396
|
+
run verbatim through the same Orca executable and nothing else, while
|
|
397
|
+
`kind: none` authorizes no action beyond inspection and retention. With
|
|
398
|
+
residual resources but no Dispatch there is no row: the mutation itself is
|
|
399
|
+
recovered through `request-show` on the receipt's request id. The no-worker
|
|
400
|
+
branch applies only after the resources are proven gone. It never retries
|
|
401
|
+
in the same tick. Anything unproven retains the worktree with a health line
|
|
402
|
+
naming the stage and the resources. Persisted configuration such
|
|
403
|
+
as `orca-data.json` is never evidence either way; it is a snapshot that
|
|
404
|
+
lags the live setting, and the driver never reads it.
|
|
342
405
|
|
|
343
406
|
## Cutover
|
|
344
407
|
|