@ai-dossier/worktree-pool 0.5.3 → 0.6.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/README.md CHANGED
@@ -26,10 +26,10 @@ Requires Node.js >= 20.0.0.
26
26
 
27
27
  | Command | Description |
28
28
  |---------|-------------|
29
- | `worktree-pool status` | Show pool inventory (warm/assigned/stale counts) |
29
+ | `worktree-pool status [--json]` | Show pool inventory (warm/assigned/broken counts); `--json` prints the whole inventory, including per-entry `status`, for callers |
30
30
  | `worktree-pool replenish [--count N]` | Pre-warm spares up to target count |
31
31
  | `worktree-pool claim --issue N --branch B` | Claim a warm worktree, print path |
32
- | `worktree-pool return --path P` | Return worktree to pool for reuse |
32
+ | `worktree-pool return --path P [--json]` | Return worktree to pool for reuse; self-checks on success, and on failure marks the entry `broken` and exits non-zero naming the step |
33
33
  | `worktree-pool refresh` | Fetch origin + rebuild in all warm worktrees |
34
34
  | `worktree-pool gc [--dry-run] [--yes]` | Remove stale/orphaned pool worktrees (never anything else) |
35
35
  | `worktree-pool init` | Configure pool directory for this project |
@@ -72,8 +72,8 @@ replenish claim return
72
72
 
73
73
  1. **Replenish** creates worktrees from `base_ref` (default `origin/main`) on temp branches, then runs the warm commands (install + build)
74
74
  2. **Claim** renames a warm worktree, switches to your feature branch — instant setup (~2s)
75
- 3. **Return** recycles the worktree back to pool on a fresh temp branch
76
- 4. **GC** removes stale entries (>72h) and reconciles disk state vs pool state — only for worktrees the pool created (see [Sharing the pool directory](#sharing-the-pool-directory))
75
+ 3. **Return** recycles the worktree back to pool on a fresh temp branch, then verifies the result against reality — the entry really reads `warm`, no tracked file is dirty, and the new `pool/spare-*` branch is really checked out — before reporting success. A failure at any step leaves the entry `broken` (never `assigned`, never a falsely-`warm` spare), leaves the directory on disk, and exits non-zero naming the step
76
+ 4. **GC** removes broken entries and stale entries (>72h) and reconciles disk state vs pool state — only for worktrees the pool created (see [Sharing the pool directory](#sharing-the-pool-directory))
77
77
 
78
78
  Claim and return only re-run the warm commands when the project's lockfile changed between the worktree's base commit and `base_ref` — otherwise the existing `node_modules` and build output are reused.
79
79
 
@@ -84,8 +84,11 @@ Pool state is stored in `worktrees/.pool-state.json` (automatically gitignored).
84
84
  ```
85
85
  creating -> warming -> warm -> assigned -> recycling -> warm
86
86
  -> destroying
87
+ recycling -> broken (a failed return)
87
88
  ```
88
89
 
90
+ A `broken` entry is never handed out — `claim` only ever selects `warm`.
91
+
89
92
  Concurrent access is protected by atomic `mkdir`-based file locking.
90
93
 
91
94
  ## Sharing the pool directory
@@ -102,8 +105,10 @@ A worktree in `pool_dir` belongs to the pool only when either:
102
105
  Everything else — your branch worktrees, plain directories, even a directory
103
106
  that happens to match the pool's naming but is on a branch of yours — is
104
107
  *foreign*. Foreign worktrees are listed by `status` and `gc` as
105
- `foreign, skipped` and are never removed, reset, or cleaned by `gc`, `refresh`,
106
- or a failed `return`. Branches are held to the same rule: `gc` only ever deletes
108
+ `foreign, skipped` and are never removed, reset, or cleaned by `gc` or
109
+ `refresh`. A failed `return` removes nothing at all — not even its own worktree
110
+ (see [Broken entries](#broken-entries-a-failed-return)). Branches are held to
111
+ the same rule: `gc` only ever deletes
107
112
  `pool/spare-*` refs.
108
113
 
109
114
  Because deletions are irreversible for uncommitted work, `gc` also prints the
@@ -129,23 +134,101 @@ If a pool worktree's directory has drifted — the recorded path now holds a
129
134
  different branch — `gc` drops the stale row from `.pool-state.json` and leaves
130
135
  the directory on disk rather than guessing.
131
136
 
132
- ### Broken entries
137
+ ### Corrupted directories
133
138
 
134
139
  A pool directory that is still on disk but that git no longer has an admin dir
135
- for (`.git/worktrees/<id>`) is **broken**: every git command inside it fails
136
- with `fatal: not a git repository`. `status` lists these under `Broken`, and
140
+ for (`.git/worktrees/<id>`) is **corrupted**: every git command inside it fails
141
+ with `fatal: not a git repository`. `status` lists these separately, and
137
142
  `claim` skips them and hands out the next warm spare instead of failing:
138
143
 
139
144
  ```bash
140
145
  $ worktree-pool status
141
146
  ...
142
- Broken (corrupted, skipped by claim): 1
147
+ Corrupted directories (no git admin dir, skipped by claim): 1
143
148
  pool-1787468026330-1079658 recorded in .pool-state.json as pool-1787468026330-1079658, no longer a registered worktree — its git admin dir is gone (a `git worktree prune` after an unrepaired rename), so every git command inside it fails
144
- Run 'worktree-pool gc --yes' to clear broken pool entries.
149
+ Run 'worktree-pool gc --yes' to clear corrupted pool directories.
150
+ ```
151
+
152
+ Corrupted directories are reported, never removed silently — `gc` clears them
153
+ under the same ownership rules as everything else.
154
+
155
+ ### Broken entries (a failed `return`)
156
+
157
+ Distinct from a corrupted *directory* above: a **broken entry** is a pool entry
158
+ whose `return` failed part-way. Rather than being destroyed, it is left behind
159
+ with `status: "broken"`, recording which step failed and why, so the failure is
160
+ visible instead of silent:
161
+
162
+ ```bash
163
+ $ worktree-pool return --path ../worktrees/bug-453-x
164
+ Error: return failed at step 'rename': Recycle target already exists: /repo/../worktrees/pool-...
165
+ Pool entry pool-1787468026330-1079658 is now marked 'broken' and was NOT destroyed.
166
+ Worktree left at: /repo/../worktrees/bug-453-x
167
+ Inspect with 'worktree-pool status --json'; clear with 'worktree-pool gc'.
145
168
  ```
146
169
 
147
- Broken entries are reported, never removed silently — `gc` clears them under
148
- the same ownership rules as everything else.
170
+ `status` counts them in their own column and names the failed step:
171
+
172
+ ```
173
+ Warm: 2 Assigned: 1 Creating: 0 Broken: 1 Other: 0 Total: 4
174
+
175
+ Worktrees:
176
+ pool-1787468026330-1079658 [broken] bug-453-x -> issue #453 (bug/453-x) failed at 'rename': Recycle target already exists
177
+ ```
178
+
179
+ `claim` never hands one out. The directory is deliberately left on disk so the
180
+ failure can be inspected; `gc` collects broken entries immediately — they are
181
+ unusable from the moment they are marked and occupy `max_pool_size` capacity
182
+ until removed — under the same ownership rules as everything else.
183
+
184
+ ## Checking the pool from a script
185
+
186
+ `status --json` prints the whole inventory on stdout, so a caller can assert
187
+ that a `return` actually landed instead of trusting the exit code of whoever
188
+ claimed it did:
189
+
190
+ ```bash
191
+ worktree-pool status --json | jq '.worktrees[] | select(.status == "broken")'
192
+ ```
193
+
194
+ Note the two distinct fields, matching the two sections above: the top-level
195
+ `broken[]` array lists *corrupted directories* (#443), while an entry with
196
+ `"status": "broken"` in `worktrees[]` is a *failed return* (#453). The
197
+ `broken_entries` count covers the latter.
198
+
199
+ `return --path P --json` prints the same self-check as a JSON object:
200
+
201
+ ```json
202
+ {
203
+ "id": "pool-1787468026330-1079658",
204
+ "path": "/repo/../worktrees/pool-1787468026330-1079658",
205
+ "verification": {
206
+ "entry_status": "warm",
207
+ "directory_clean": true,
208
+ "dirty_entries": [],
209
+ "checked_out_branch": "pool/spare-pool-1787468026330-1079658",
210
+ "expected_branch": "pool/spare-pool-1787468026330-1079658"
211
+ }
212
+ }
213
+ ```
214
+
215
+ ### Programmatic use
216
+
217
+ ```ts
218
+ import { returnWorktree, ReturnFailure } from '@ai-dossier/worktree-pool';
219
+
220
+ try {
221
+ const result = returnWorktree(worktreePath);
222
+ // result.id, result.path, result.verification
223
+ } catch (err) {
224
+ if (err instanceof ReturnFailure) {
225
+ // err.step (a ReturnStep), err.entryId, err.worktreePath
226
+ // The entry is 'broken' and the directory was NOT destroyed — unless
227
+ // err.markError is non-null, which means the marking write itself failed
228
+ // and pool state should be re-checked before the next claim.
229
+ }
230
+ }
231
+ ```
149
232
 
150
233
  ## Configuration
151
234
 
package/dist/cli.js CHANGED
@@ -3,26 +3,29 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const pool_actions_1 = require("./pool-actions");
5
5
  /**
6
- * Print corrupted pool directories (#443). Never fatal: a broken entry is
7
- * reported and skipped, and the command it interrupted carries on.
6
+ * Print corrupted pool directories (#443) — a directory on disk whose git
7
+ * admin dir is gone. Distinct from a #453 `broken` *entry*, which is a pool
8
+ * entry a `return` failed on; the wording keeps the two apart. Never fatal:
9
+ * a corrupted directory is reported and skipped, and the command it
10
+ * interrupted carries on.
8
11
  */
9
- function reportBroken(broken) {
10
- if (broken.length === 0)
12
+ function reportCorrupted(corrupted) {
13
+ if (corrupted.length === 0)
11
14
  return;
12
- console.error(`Broken (corrupted, skipped): ${broken.length}`);
13
- for (const b of broken) {
15
+ console.error(`Corrupted (no git admin dir, skipped): ${corrupted.length}`);
16
+ for (const b of corrupted) {
14
17
  console.error(` ${b.name} — ${b.reason}`);
15
18
  }
16
- console.error("Run 'worktree-pool gc --yes' to clear broken pool entries.");
19
+ console.error("Run 'worktree-pool gc --yes' to clear corrupted pool directories.");
17
20
  }
18
21
  function usage() {
19
22
  console.error(`Usage: worktree-pool <command> [options]
20
23
 
21
24
  Commands:
22
- status Show pool inventory
25
+ status [--json] Show pool inventory (--json for callers)
23
26
  replenish [--count N] Pre-warm spares up to target
24
27
  claim --issue N --branch B Claim a warm worktree, print path
25
- return --path P Return worktree to pool
28
+ return --path P [--json] Return worktree to pool
26
29
  refresh Fetch + rebuild all warm worktrees
27
30
  gc [--dry-run] [--yes] Remove stale/orphaned worktrees
28
31
  init Configure pool directory for this project
@@ -30,7 +33,17 @@ Commands:
30
33
 
31
34
  The pool only ever removes worktrees it created. Worktrees sharing the pool
32
35
  directory that the pool did not create are reported as "foreign, skipped" and
33
- are never touched. gc requires --yes when stdin is not a TTY.`);
36
+ are never touched. gc requires --yes when stdin is not a TTY.
37
+
38
+ A failed 'return' leaves its pool entry marked 'broken' (never 'assigned' or
39
+ 'warm') and exits non-zero naming the step that failed — except for a path that
40
+ is not in the pool at all, which fails before there is any entry to mark. The
41
+ worktree directory is left on disk for inspection; 'status --json' carries the
42
+ failed step, and gc clears the entry.`);
43
+ }
44
+ /** A flag is set when present as `--x` or given the literal string 'true'. */
45
+ function boolFlag(value) {
46
+ return value === true || value === 'true';
34
47
  }
35
48
  function parseArgs(args) {
36
49
  const command = args[0];
@@ -62,8 +75,16 @@ async function main() {
62
75
  switch (command) {
63
76
  case 'status': {
64
77
  const s = (0, pool_actions_1.status)();
78
+ // Machine-readable inventory (#453): `worktrees[]` already carries a
79
+ // per-entry `status`, so a caller can assert that a `return` actually
80
+ // landed instead of trusting the exit code of whoever claimed it did.
81
+ if (boolFlag(flags.json)) {
82
+ console.log(JSON.stringify(s, null, 2));
83
+ break;
84
+ }
65
85
  console.log(`Pool directory: ${s.pool_dir}`);
66
- console.log(`Warm: ${s.warm} Assigned: ${s.assigned} Creating: ${s.creating} Other: ${s.other} Total: ${s.total}`);
86
+ console.log(`Warm: ${s.warm} Assigned: ${s.assigned} Creating: ${s.creating} ` +
87
+ `Broken: ${s.broken_entries} Other: ${s.other} Total: ${s.total}`);
67
88
  console.log(`Spares needed: ${s.spares_needed} Target: ${s.config.target_spares} Max: ${s.config.max_pool_size}`);
68
89
  if (s.worktrees.length > 0) {
69
90
  console.log('\nWorktrees:');
@@ -71,7 +92,14 @@ async function main() {
71
92
  const info = wt.assigned_to_issue !== null
72
93
  ? ` -> issue #${wt.assigned_to_issue} (${wt.assigned_branch})`
73
94
  : '';
74
- console.log(` ${wt.id} [${wt.status}] ${wt.path}${info}`);
95
+ // A `broken` entry says which step of `return` failed (#453) —
96
+ // otherwise the operator has to go read the directory to find out.
97
+ // Git errors are routinely multi-line; collapse them so one
98
+ // worktree stays one line and cannot be misread as two entries.
99
+ const reason = (wt.broken_reason ?? 'unknown').replace(/\s+/g, ' ').trim();
100
+ const shortReason = reason.length > 120 ? `${reason.slice(0, 117)}...` : reason;
101
+ const failure = wt.broken_step ? ` failed at '${wt.broken_step}': ${shortReason}` : '';
102
+ console.log(` ${wt.id} [${wt.status}] ${wt.path}${info}${failure}`);
75
103
  }
76
104
  }
77
105
  if (s.foreign.length > 0) {
@@ -80,12 +108,18 @@ async function main() {
80
108
  console.log(` ${f.name} [${f.branch ?? 'detached'}] ${f.reason}`);
81
109
  }
82
110
  }
111
+ if (s.broken_entries > 0) {
112
+ console.log("\nBroken entries (a failed `return`): run 'worktree-pool status --json' for the " +
113
+ "full reason, or 'worktree-pool gc' to clear them.");
114
+ }
83
115
  if (s.broken.length > 0) {
84
- console.log(`\nBroken (corrupted, skipped by claim): ${s.broken.length}`);
116
+ // A *different* problem from a broken entry above: the directory is
117
+ // there but git has no admin dir for it (#443).
118
+ console.log(`\nCorrupted directories (no git admin dir, skipped by claim): ${s.broken.length}`);
85
119
  for (const b of s.broken) {
86
120
  console.log(` ${b.name} ${b.reason}`);
87
121
  }
88
- console.log("Run 'worktree-pool gc --yes' to clear broken pool entries.");
122
+ console.log("Run 'worktree-pool gc --yes' to clear corrupted pool directories.");
89
123
  }
90
124
  break;
91
125
  }
@@ -111,11 +145,11 @@ async function main() {
111
145
  }
112
146
  const result = (0, pool_actions_1.claim)(issue, branch);
113
147
  if (result) {
114
- reportBroken(result.broken);
148
+ reportCorrupted(result.broken);
115
149
  console.log(result.path);
116
150
  }
117
151
  else {
118
- reportBroken((0, pool_actions_1.findBrokenEntries)());
152
+ reportCorrupted((0, pool_actions_1.findBrokenEntries)());
119
153
  console.error("No warm worktrees available. Run 'worktree-pool replenish' first.");
120
154
  process.exit(1);
121
155
  }
@@ -127,8 +161,19 @@ async function main() {
127
161
  console.error('Error: --path P is required');
128
162
  process.exit(1);
129
163
  }
130
- (0, pool_actions_1.returnWorktree)(wtPath);
164
+ // Failures fall through to the outer catch, which prints the step and
165
+ // exits 1 (#453). The entry is left `broken`, never `assigned`.
166
+ const returned = (0, pool_actions_1.returnWorktree)(wtPath);
167
+ if (boolFlag(flags.json)) {
168
+ console.log(JSON.stringify(returned, null, 2));
169
+ break;
170
+ }
171
+ const v = returned.verification;
131
172
  console.error('Worktree returned to pool');
173
+ console.error('Self-check:');
174
+ console.error(` entry ${returned.id}: ${v.entry_status}`);
175
+ console.error(` directory clean: ${v.directory_clean ? 'yes' : 'no'} (${returned.path})`);
176
+ console.error(` checked out: ${v.checked_out_branch ?? 'detached HEAD'}`);
132
177
  break;
133
178
  }
134
179
  case 'refresh': {
@@ -149,8 +194,8 @@ async function main() {
149
194
  break;
150
195
  }
151
196
  case 'gc': {
152
- const dryRun = flags['dry-run'] === true || flags['dry-run'] === 'true';
153
- const yes = flags.yes === true || flags.yes === 'true' || flags.force === true;
197
+ const dryRun = boolFlag(flags['dry-run']);
198
+ const yes = boolFlag(flags.yes) || flags.force === true;
154
199
  console.error(dryRun ? 'Garbage collection (dry run)...' : 'Running garbage collection...');
155
200
  const result = await (0, pool_actions_1.gc)({ dryRun, yes });
156
201
  if (!result.dryRun && !result.aborted) {
@@ -158,6 +203,9 @@ async function main() {
158
203
  if (result.staleIds.length > 0) {
159
204
  console.error(` Stale: ${result.staleIds.join(', ')}`);
160
205
  }
206
+ if (result.brokenIds.length > 0) {
207
+ console.error(` Broken (failed return): ${result.brokenIds.join(', ')}`);
208
+ }
161
209
  if (result.orphanIds.length > 0) {
162
210
  console.error(` Orphans: ${result.orphanIds.join(', ')}`);
163
211
  }
@@ -190,6 +238,23 @@ async function main() {
190
238
  }
191
239
  catch (err) {
192
240
  console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
241
+ if (err instanceof pool_actions_1.ReturnFailure) {
242
+ // Say plainly what state the pool is in, so a caller cannot read a
243
+ // non-zero exit as "nothing happened" (#453). Never assert the entry was
244
+ // marked without knowing it was — that claim being false is the bug.
245
+ if (err.entryId === null) {
246
+ console.error('No pool entry was modified.');
247
+ }
248
+ else if (err.markError !== null) {
249
+ console.error(`WARNING: pool entry ${err.entryId} could NOT be marked 'broken': ${err.markError}`);
250
+ console.error(" Pool state may be stale — check 'worktree-pool status --json' before the next claim.");
251
+ }
252
+ else {
253
+ console.error(`Pool entry ${err.entryId} is now marked 'broken' and was NOT destroyed.`);
254
+ }
255
+ console.error(` Worktree left at: ${err.worktreePath}`);
256
+ console.error(" Inspect with 'worktree-pool status --json'; clear with 'worktree-pool gc'.");
257
+ }
193
258
  process.exit(1);
194
259
  }
195
260
  }
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,iDAWwB;AAExB;;;GA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AG,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAI,GAAG,YAAY,4BAAa,EAAE,CAAC;YACjC,mEAAmE;YACnE,yEAAyE;YACzE,qEAAqE;YACrE,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;YAC/C,CAAC;iBAAM,IAAI,GAAG,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;gBAClC,OAAO,CAAC,KAAK,CACX,uBAAuB,GAAG,CAAC,OAAO,kCAAkC,GAAG,CAAC,SAAS,EAAE,CACpF,CAAC;gBACF,OAAO,CAAC,KAAK,CACX,wFAAwF,CACzF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,OAAO,gDAAgD,CAAC,CAAC;YAC3F,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;YACzD,OAAO,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;QAChG,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { claim, detect, gc, init, readPoolFileConfig, refresh, replenish, resolvePoolDir, returnWorktree, status, } from './pool-actions';
1
+ export { claim, detect, gc, init, ReturnFailure, type ReturnResult, type ReturnVerification, readPoolFileConfig, refresh, replenish, resolvePoolDir, returnWorktree, status, WARM_COMMAND_TIMEOUT_MS, } from './pool-actions';
2
2
  export * from './pool-state';
3
3
  export * from './project-env';
4
4
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,MAAM,EACN,EAAE,EACF,IAAI,EACJ,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,EACd,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,MAAM,EACN,EAAE,EACF,IAAI,EACJ,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,EACd,MAAM,EACN,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -14,18 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.status = exports.returnWorktree = exports.resolvePoolDir = exports.replenish = exports.refresh = exports.readPoolFileConfig = exports.init = exports.gc = exports.detect = exports.claim = void 0;
17
+ exports.WARM_COMMAND_TIMEOUT_MS = exports.status = exports.returnWorktree = exports.resolvePoolDir = exports.replenish = exports.refresh = exports.readPoolFileConfig = exports.ReturnFailure = exports.init = exports.gc = exports.detect = exports.claim = void 0;
18
18
  var pool_actions_1 = require("./pool-actions");
19
19
  Object.defineProperty(exports, "claim", { enumerable: true, get: function () { return pool_actions_1.claim; } });
20
20
  Object.defineProperty(exports, "detect", { enumerable: true, get: function () { return pool_actions_1.detect; } });
21
21
  Object.defineProperty(exports, "gc", { enumerable: true, get: function () { return pool_actions_1.gc; } });
22
22
  Object.defineProperty(exports, "init", { enumerable: true, get: function () { return pool_actions_1.init; } });
23
+ Object.defineProperty(exports, "ReturnFailure", { enumerable: true, get: function () { return pool_actions_1.ReturnFailure; } });
23
24
  Object.defineProperty(exports, "readPoolFileConfig", { enumerable: true, get: function () { return pool_actions_1.readPoolFileConfig; } });
24
25
  Object.defineProperty(exports, "refresh", { enumerable: true, get: function () { return pool_actions_1.refresh; } });
25
26
  Object.defineProperty(exports, "replenish", { enumerable: true, get: function () { return pool_actions_1.replenish; } });
26
27
  Object.defineProperty(exports, "resolvePoolDir", { enumerable: true, get: function () { return pool_actions_1.resolvePoolDir; } });
27
28
  Object.defineProperty(exports, "returnWorktree", { enumerable: true, get: function () { return pool_actions_1.returnWorktree; } });
28
29
  Object.defineProperty(exports, "status", { enumerable: true, get: function () { return pool_actions_1.status; } });
30
+ Object.defineProperty(exports, "WARM_COMMAND_TIMEOUT_MS", { enumerable: true, get: function () { return pool_actions_1.WARM_COMMAND_TIMEOUT_MS; } });
29
31
  __exportStar(require("./pool-state"), exports);
30
32
  __exportStar(require("./project-env"), exports);
31
33
  __exportStar(require("./types"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAWwB;AAVtB,qGAAA,KAAK,OAAA;AACL,sGAAA,MAAM,OAAA;AACN,kGAAA,EAAE,OAAA;AACF,oGAAA,IAAI,OAAA;AACJ,kHAAA,kBAAkB,OAAA;AAClB,uGAAA,OAAO,OAAA;AACP,yGAAA,SAAS,OAAA;AACT,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AACd,sGAAA,MAAM,OAAA;AAER,+CAA6B;AAC7B,gDAA8B;AAC9B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAewB;AAdtB,qGAAA,KAAK,OAAA;AACL,sGAAA,MAAM,OAAA;AACN,kGAAA,EAAE,OAAA;AACF,oGAAA,IAAI,OAAA;AACJ,6GAAA,aAAa,OAAA;AAGb,kHAAA,kBAAkB,OAAA;AAClB,uGAAA,OAAO,OAAA;AACP,yGAAA,SAAS,OAAA;AACT,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AACd,sGAAA,MAAM,OAAA;AACN,uHAAA,uBAAuB,OAAA;AAEzB,+CAA6B;AAC7B,gDAA8B;AAC9B,0CAAwB"}
@@ -1,5 +1,7 @@
1
1
  import { getPoolStatus, type PoolDirClassification } from './pool-state';
2
- import { type PoolFileConfig, type ProjectEnv } from './types';
2
+ import { type PoolFileConfig, type ProjectEnv, type ReturnStep, type WorktreeStatus } from './types';
3
+ /** Per-command budget for a warm-up install/build (#561: also the floor `packages/sched`'s batch-setup warm step should give its own exec). */
4
+ export declare const WARM_COMMAND_TIMEOUT_MS = 300000;
3
5
  /**
4
6
  * Read `.worktree-pool.json` from the repo root. Missing or corrupt files fall
5
7
  * back to defaults. `pool_dir`, when set, is resolved to an absolute path.
@@ -36,7 +38,69 @@ export interface ClaimResult {
36
38
  broken: PoolDirEntryReport[];
37
39
  }
38
40
  export declare function claim(issue: number, branch: string): ClaimResult | null;
39
- export declare function returnWorktree(worktreePath: string): void;
41
+ /**
42
+ * What a successful `return` verified before exiting (#453 AC2). Every field
43
+ * is checked against reality after the state write, not assumed from the fact
44
+ * that no step threw.
45
+ */
46
+ export interface ReturnVerification {
47
+ /** Entry status re-read from `.pool-state.json` — must be `warm`. */
48
+ entry_status: WorktreeStatus | 'missing';
49
+ /**
50
+ * No *tracked* file in the recycled directory is modified. Untracked files
51
+ * are deliberately not counted: `git clean -fd` runs before the warm
52
+ * commands, so anything untracked at this point is warm-command output, and
53
+ * `replenish` marks exactly that state `warm` without complaint. Failing
54
+ * here on it would make `return` stricter than the path that created the
55
+ * spare in the first place.
56
+ */
57
+ directory_clean: boolean;
58
+ /** Offending `git status --porcelain` entries when `directory_clean` is false. */
59
+ dirty_entries: string[];
60
+ /** Branch actually checked out — must be the new `pool/spare-*` temp branch. */
61
+ checked_out_branch: string | null;
62
+ /** The temp branch the recycle intended to leave behind. */
63
+ expected_branch: string;
64
+ }
65
+ /** Outcome of a successful `returnWorktree`. */
66
+ export interface ReturnResult {
67
+ /** New pool entry id after recycling. */
68
+ id: string;
69
+ /** Absolute path the recycled worktree now lives at. */
70
+ path: string;
71
+ /** The self-check that ran before this result was returned. */
72
+ verification: ReturnVerification;
73
+ }
74
+ /**
75
+ * A `return` that failed, tagged with the step that failed (#453 AC1). The
76
+ * pool entry has been left in `status: 'broken'` — not `assigned`, not `warm`
77
+ * — and the worktree directory is deliberately NOT destroyed, so the failure
78
+ * is inspectable and `gc` can clear it deliberately.
79
+ *
80
+ * `markError` is the one case where that promise could not be kept: the
81
+ * broken-marking write itself failed. Callers must report it rather than
82
+ * assume the entry is marked, or they reproduce the very bug #453 is about.
83
+ */
84
+ export declare class ReturnFailure extends Error {
85
+ readonly step: ReturnStep;
86
+ readonly entryId: string | null;
87
+ readonly worktreePath: string;
88
+ /** Why the entry could NOT be marked broken, or `null` when it was marked. */
89
+ readonly markError: string | null;
90
+ constructor(step: ReturnStep, worktreePath: string, entryId: string | null, cause: unknown, markError?: string | null);
91
+ }
92
+ /**
93
+ * Recycle an assigned worktree back to `warm`.
94
+ *
95
+ * Transactional in outcome (#453): it either finishes and returns a verified
96
+ * `warm` entry, or it leaves the entry `broken` and throws a `ReturnFailure`
97
+ * naming the step. It never leaves the entry `assigned`, never reports success
98
+ * over an unverified pool, and — unlike the pre-#453 behaviour — never
99
+ * destroys the worktree on failure. A broken entry keeps its provenance
100
+ * (recorded id, actual on-disk path, a pool-owned temp branch) so `status`
101
+ * shows it and `gc` can remove it.
102
+ */
103
+ export declare function returnWorktree(worktreePath: string): ReturnResult;
40
104
  export interface RefreshResult {
41
105
  refreshed: number;
42
106
  /** Worktrees left untouched because provenance could not be confirmed. */
@@ -58,7 +122,9 @@ export type GcCandidateKind =
58
122
  /** State row with nothing (of ours) on disk — the row is dropped, disk untouched. */
59
123
  | 'orphan-state'
60
124
  /** Pool-created directory missing from state — removed from disk. */
61
- | 'orphan-disk';
125
+ | 'orphan-disk'
126
+ /** Entry a `return` left broken (#453) — removed from disk and state. */
127
+ | 'broken';
62
128
  export interface GcCandidate {
63
129
  kind: GcCandidateKind;
64
130
  /** Pool worktree id, or the directory name for a disk-only orphan. */
@@ -73,6 +139,8 @@ export interface GcResult {
73
139
  removed: number;
74
140
  staleIds: string[];
75
141
  orphanIds: string[];
142
+ /** Entries removed because a `return` had left them broken (#453). */
143
+ brokenIds: string[];
76
144
  /** Everything in the pool directory the pool refuses to touch. */
77
145
  foreign: PoolDirEntryReport[];
78
146
  /** The exact removal list, whether or not it was executed. */
@@ -1 +1 @@
1
- {"version":3,"file":"pool-actions.d.ts","sourceRoot":"","sources":["../src/pool-actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,aAAa,EAIb,KAAK,qBAAqB,EAK3B,MAAM,cAAc,CAAC;AAQtB,OAAO,EAEL,KAAK,cAAc,EAGnB,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AAiCjB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAelE;AAyFD,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/B,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAkRD,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAwED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,kBAAkB,EAAE,CAIxD;AAyCD,wBAAsB,SAAS,CAC7B,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,UAAQ,GAChB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