axstack 0.20.5 → 0.20.7

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/README.md CHANGED
@@ -112,6 +112,9 @@ session in an isolated workspace and admits at most five executing PR jobs per
112
112
  lane, fewer under resource pressure. Waiting PRs remain tracked without consuming
113
113
  execution slots, so a large open-PR backlog does not require an idle agent per PR.
114
114
  Completed passes save continuity and retire their own verified resources.
115
+ Held jobs preserve evidence, use private worktree-local temporary paths, and
116
+ release capacity only after native descendant settlement. Uncertain execution
117
+ teardown pauses the lane; settled evidence cleanup does not occupy a slot.
115
118
 
116
119
  Scheduling is opt-in and requires host-specific runtime validation before
117
120
  activation. Installing Axstack does not turn it on. Repairs are limited to
package/docs/workflows.md CHANGED
@@ -200,6 +200,28 @@ shared manager workspace or a PR-job worktree, or cleans preserved candidates,
200
200
  evidence, user sessions, unknown liveness, `user_takeover`, or ambiguous
201
201
  publication state. Manual review/watch remains outside this scheduled lifecycle.
202
202
 
203
+ One natively ordered successor may recover an exact positively completed
204
+ predecessor whose terminal survived, but only after matching its automation,
205
+ run, workspace, and terminal incarnation and proving zero unsettled descendants.
206
+ It saves and reads back the cleanup claim before exact native close, then proves
207
+ the full process tree exited before ownership release or guarded worktree removal.
208
+ Age, status, or idle state alone never authorizes cleanup. Conflicting successors,
209
+ identity mismatch, unknown or protected state, `user_takeover`, unexpected
210
+ terminals, dirty or unpushed work, and unarchived evidence hold cleanup; an
211
+ unchanged failure is deduplicated. Native ordering is not an atomic lock, so the
212
+ overlap canary remains an activation requirement.
213
+
214
+ Each bounded job uses a private `0700` temporary directory inside its own
215
+ worktree. Cleanup targets only the validated owned path: no `TMPDIR` globs,
216
+ shared-root sweeps, or general cache wipes, and uncertain files remain for
217
+ reconciliation. Permission prompts and provider safety refusals are incomplete
218
+ holds, never bypass or cross-model retry signals. The coordinator preserves the
219
+ evidence, settles the exact owned tree through Orca's supported lifecycle, and
220
+ releases capacity only after native settlement is verified. Unresolved execution
221
+ teardown pauses the lane; retained evidence or cleanup metadata does not consume
222
+ a slot after positive full-tree settlement. Once settled, an unchanged held
223
+ event remains deduplicated while unrelated eligible PRs continue.
224
+
203
225
  Requested reviews cover any accessible repository; automatic repairs retain
204
226
  their `defi-com/monorepo` and `defi-com/mobile` scope. Orca owns schedules,
205
227
  sessions, Tasks, and Dispatches. Axstack adds no custom scheduler, queue engine,
@@ -216,6 +238,11 @@ after manager self-close, with an authorized deduplicated Telegram notification.
216
238
  The current operational contract is
217
239
  `skills/axstack/references/automations.md`.
218
240
 
241
+ These documents and their source-contract tests define expected decisions.
242
+ Scenario fixtures are behavioral-evaluation inputs, not model-evaluation
243
+ results, and neither form is live proof; activation still requires the native
244
+ canary described by the operational contract.
245
+
219
246
  ## Run record and evidence
220
247
 
221
248
  Substantive delegated or resumable work uses one compact `progress.md` rooted at
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axstack",
3
- "version": "0.20.5",
3
+ "version": "0.20.7",
4
4
  "description": "Axstack installer and setup CLI: installs owned chat skills and role data, configures supported harness settings, and checks Orca capabilities.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -66,6 +66,38 @@ intent alone is insufficient. Conversely a completed run row does not prove exit
66
66
  If these facts remain unknown, report the hold at the durable decision location;
67
67
  do not silently stand down forever or replace a potentially live owner.
68
68
 
69
+ ### Guarded completed-predecessor recovery
70
+
71
+ A successor may retire a positively completed predecessor whose manager terminal
72
+ survived only through this narrow recovery path. Eligibility requires an exact
73
+ automation ID, run ID, workspace ID, and terminal incarnation match, a positive
74
+ completion receipt bound to that incarnation, zero active or unsettled descendants,
75
+ and every owned Task and Dispatch settled. A completed row or saved retirement
76
+ intent alone is not positive completion. Age, status, and idle state are never
77
+ cleanup authority. Active, unknown, protected, identity-mismatched,
78
+ `user_takeover`, unexpected-terminal, permission-held, or otherwise unverifiable
79
+ state preserves the predecessor and pauses admission; this path never takes over
80
+ its PR work.
81
+
82
+ Exactly one successor, selected by native run ordering, may write the cleanup
83
+ claim. Immediately before writing, re-read the complete lane inventory and
84
+ ordering; then save and read back claimant identity, predecessor identity,
85
+ completion, and zero-descendant continuity before the exact native workspace
86
+ close. A later successor reconciles that claim and performs no cleanup mutation.
87
+ Missing ordering or a conflicting claim holds both cleanup and admission. This
88
+ ordering is not an atomic lock; activation still depends on the overlap canary
89
+ proving that two successors cannot both mutate one predecessor.
90
+
91
+ Use the version-matched native workspace close against the receipt's complete
92
+ workspace ID, never an individually guessed terminal or broad selector. After
93
+ close, re-list native runs, workspaces, terminals, Tasks, and Dispatches and prove
94
+ the full predecessor process tree exited before ownership release. Save and read
95
+ back the exit and release receipts, then use native worktree cleanup only when the
96
+ workspace has no children, dirty or unknown files, unpushed commits, unarchived
97
+ evidence, or user-owned work. Preserve every failed or uncertain close, exit,
98
+ release, or removal with its exact resume condition and pause the lane. An
99
+ unchanged cleanup failure gets no destructive retry or duplicate notification.
100
+
69
101
  Before PR admission, reconcile old pass resources and reclaim every safely
70
102
  removable earlier pass workspace under the retirement guards below. This is
71
103
  routine cleanup on every admitted pass; do not wait for the three-workspace
@@ -79,7 +111,9 @@ After cleanup, re-list and count only the earlier pass workspaces still remainin
79
111
  If three or more unreclaimed
80
112
  earlier pass workspaces remain, disable only this automation through the native
81
113
  CLI, verify the disabled setting, save/report the cleanup hold, and admit no new
82
- PR jobs. Also pause on a confirmed cleanup failure or unresolved lane ownership.
114
+ PR jobs. Also pause on a confirmed earlier-manager retirement failure or
115
+ unresolved lane ownership. A settled PR-job worktree retained for evidence is a
116
+ cleanup hold, not unsettled execution or lane ownership.
83
117
  Already-dispatched passes still reconcile and retire only their own safe resources;
84
118
  this threshold is a stop condition, not an atomic hard cap on in-flight creations.
85
119
  An uncertain disable is a reported failure, not proof scheduling stopped. Resume
@@ -145,6 +179,13 @@ handles the current actionable event, returns exact receipts, then settles.
145
179
  Settlement returns continuity to the manager rather than retaining an idle PR
146
180
  coordinator. Reviewers retain the isolation required by `axstack-review`.
147
181
 
182
+ Give each job a private job-local temporary directory under its per-PR
183
+ worktree, following the ownership, containment, and cleanup checks in the
184
+ [runtime boundary](orca-runtime.md#reviewer-workspaces-and-evidence). Never
185
+ delete through a broad `TMPDIR` glob, sweep a shared temporary root, or wipe a
186
+ general cache. Preserve evidence and any temporary path whose ownership or
187
+ containment is uncertain.
188
+
148
189
  An unchanged exact head and unchanged event identity creates no job; an
149
190
  unchanged exact head with a new event identity remains actionable. Event
150
191
  identity includes the applicable review ID and body digest, check identity and
@@ -155,6 +196,39 @@ head, base, event identity, mode, owner and worker receipts, candidate,
155
196
  publication receipt, hold, and next action. GitHub remains authoritative for
156
197
  open state, revisions, reviews, checks, and merge state.
157
198
 
199
+ ## Held job settlement
200
+
201
+ Use native runtime inspection, not saved prose or silence, to identify an
202
+ actual hold and bind it to the exact Task, Dispatch, terminal, event, and
203
+ evidence. Permission prompts and provider safety refusals are incomplete held
204
+ outcomes: do not answer or bypass them, retry their content through another
205
+ model, or claim completion. Do not forge `worker_done`. Record the held event
206
+ identity and its resume condition in durable continuity. An unchanged hold creates no new job, no
207
+ retry, and no repeated notification; a changed event is reconsidered against
208
+ the original authority rather than assumed safe.
209
+
210
+ Preserve the prompt or refusal evidence, then follow the version-matched
211
+ orchestration recovery and cleanup guidance for every owned descendant. Use
212
+ only supported native lifecycle actions and receipt-supplied next actions;
213
+ saved status, contact loss, and a coordinator narrative do not settle a worker.
214
+ Unknown or user-owned work is never a kill target. Do not release the PR slot
215
+ until native state verifies settlement of the coordinator and every descendant.
216
+ Unrelated eligible PRs continue after the tree is verified settled, while the
217
+ held PR waits durably for its resume condition.
218
+
219
+ Execution settlement and cleanup retention are separate. Positive full-tree
220
+ process exit plus native Task and Dispatch settlement frees the slot. Retained
221
+ metadata does not occupy an execution slot: preserve it and its evidence for
222
+ reconciliation without reviving the failed job. Likewise, an archive hold
223
+ blocks workspace removal, not settled execution capacity; record the cleanup
224
+ hold, preserve the workspace, and let unrelated eligible PRs continue.
225
+
226
+ An active, unknown, protected, or unverifiable coordinator or descendant is
227
+ different: preserve its evidence and keep its slot occupied. Unresolved
228
+ execution teardown, or failure to retire the manager pass itself, pauses the
229
+ lane before another pass can admit work rather than accumulating active passes
230
+ or claiming capacity from an uncertain process tree.
231
+
158
232
  When the current event is handled, settle and release owned native resources.
159
233
  Preserve dirty worktrees, unpushed candidates, unarchived review evidence, pending
160
234
  external results, and user-owned work until durability and ownership are
@@ -255,7 +329,9 @@ unarchived evidence, children, user-owned work, unknown files, or unexplained
255
329
  dirty source. A verified evidence archive does not require otherwise clean Git
256
330
  state, but every remaining change must still be positively classified and safe;
257
331
  unknown dirt blocks removal. Never use recursive shell deletion. Failed cleanup
258
- remains recorded, not silently forgotten.
332
+ remains recorded, not silently forgotten. Failed PR-job workspace cleanup stays
333
+ a cleanup hold after execution settles; failed or unverifiable manager-pass
334
+ retirement pauses the lane instead of allowing active passes to accumulate.
259
335
 
260
336
  The activation canary must additionally prove distinct workspace IDs per pass,
261
337
  cross-workspace lane admission, self-retirement and absence after client reconnect,
@@ -68,8 +68,11 @@ An `input_accepted` stage proves only that input reached the terminal. Require
68
68
  started, and verify the requested role independently before trusting its work.
69
69
  A workspace trust, hook review, permission, authentication, or model prompt is
70
70
  a visible hold. Never answer a trust or permission prompt on the worker's
71
- behalf. Preserve the attempt and use only the runtime guide's inspection and
72
- recovery procedure; reconcile before retry so no duplicate writer starts.
71
+ behalf. A permission prompt or provider safety refusal is a held, incomplete
72
+ outcome, never consent or completion. Never bypass or retry it through another
73
+ model. Preserve the attempt and its evidence, then use only
74
+ the runtime guide's inspection and recovery procedure; reconcile before any
75
+ authorized retry so no duplicate writer starts.
73
76
 
74
77
  ## Reviewer workspaces and evidence
75
78
 
@@ -84,8 +87,13 @@ Keep reviewer-authored reports, probes, and logs inside the reviewer's worktree
84
87
  in an untracked, dispatch-specific artifact directory, not in `/tmp` or a
85
88
  provider scratch directory. Name its absolute path in the brief and completion
86
89
  receipt; keep tracked candidate files read-only and do not commit artifacts.
87
- For test tools that need temporary files, use a worktree-local temporary
88
- directory where supported; incidental tool-managed caches are not review evidence.
90
+ For tools that need temporary files, create one worktree-local, task- and
91
+ dispatch-specific directory with mode `0700`, and scope `TMPDIR` to the owned
92
+ command where supported. Before use or cleanup, validate that its real path is
93
+ inside the exact worktree, is not a symbolic link, and matches the recorded
94
+ owner. Remove only that exact validated owned path, with no glob or parent-root
95
+ deletion; never wipe a general cache. Uncertain temporary files are preserved
96
+ for later reconciliation. Incidental tool-managed caches are not review evidence.
89
97
  Before removing a reviewer worktree, preserve its report and supporting evidence
90
98
  in the driver's Orca workspace and update the run record's paths. Terminal
91
99
  release alone is not permission to discard evidence or remove the worktree.