@ai-dossier/worktree-pool 0.5.2 → 0.6.0

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,6 +134,102 @@ 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
 
137
+ ### Corrupted directories
138
+
139
+ A pool directory that is still on disk but that git no longer has an admin dir
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
142
+ `claim` skips them and hands out the next warm spare instead of failing:
143
+
144
+ ```bash
145
+ $ worktree-pool status
146
+ ...
147
+ Corrupted directories (no git admin dir, skipped by claim): 1
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
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'.
168
+ ```
169
+
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
+ ```
232
+
132
233
  ## Configuration
133
234
 
134
235
  ### Pool sizing — `.pool-state.json`
package/dist/cli.js CHANGED
@@ -2,14 +2,30 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const pool_actions_1 = require("./pool-actions");
5
+ /**
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.
11
+ */
12
+ function reportCorrupted(corrupted) {
13
+ if (corrupted.length === 0)
14
+ return;
15
+ console.error(`Corrupted (no git admin dir, skipped): ${corrupted.length}`);
16
+ for (const b of corrupted) {
17
+ console.error(` ${b.name} — ${b.reason}`);
18
+ }
19
+ console.error("Run 'worktree-pool gc --yes' to clear corrupted pool directories.");
20
+ }
5
21
  function usage() {
6
22
  console.error(`Usage: worktree-pool <command> [options]
7
23
 
8
24
  Commands:
9
- status Show pool inventory
25
+ status [--json] Show pool inventory (--json for callers)
10
26
  replenish [--count N] Pre-warm spares up to target
11
27
  claim --issue N --branch B Claim a warm worktree, print path
12
- return --path P Return worktree to pool
28
+ return --path P [--json] Return worktree to pool
13
29
  refresh Fetch + rebuild all warm worktrees
14
30
  gc [--dry-run] [--yes] Remove stale/orphaned worktrees
15
31
  init Configure pool directory for this project
@@ -17,7 +33,17 @@ Commands:
17
33
 
18
34
  The pool only ever removes worktrees it created. Worktrees sharing the pool
19
35
  directory that the pool did not create are reported as "foreign, skipped" and
20
- 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';
21
47
  }
22
48
  function parseArgs(args) {
23
49
  const command = args[0];
@@ -49,8 +75,16 @@ async function main() {
49
75
  switch (command) {
50
76
  case 'status': {
51
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
+ }
52
85
  console.log(`Pool directory: ${s.pool_dir}`);
53
- 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}`);
54
88
  console.log(`Spares needed: ${s.spares_needed} Target: ${s.config.target_spares} Max: ${s.config.max_pool_size}`);
55
89
  if (s.worktrees.length > 0) {
56
90
  console.log('\nWorktrees:');
@@ -58,7 +92,14 @@ async function main() {
58
92
  const info = wt.assigned_to_issue !== null
59
93
  ? ` -> issue #${wt.assigned_to_issue} (${wt.assigned_branch})`
60
94
  : '';
61
- 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}`);
62
103
  }
63
104
  }
64
105
  if (s.foreign.length > 0) {
@@ -67,6 +108,19 @@ async function main() {
67
108
  console.log(` ${f.name} [${f.branch ?? 'detached'}] ${f.reason}`);
68
109
  }
69
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
+ }
115
+ if (s.broken.length > 0) {
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}`);
119
+ for (const b of s.broken) {
120
+ console.log(` ${b.name} ${b.reason}`);
121
+ }
122
+ console.log("Run 'worktree-pool gc --yes' to clear corrupted pool directories.");
123
+ }
70
124
  break;
71
125
  }
72
126
  case 'replenish': {
@@ -91,9 +145,11 @@ async function main() {
91
145
  }
92
146
  const result = (0, pool_actions_1.claim)(issue, branch);
93
147
  if (result) {
148
+ reportCorrupted(result.broken);
94
149
  console.log(result.path);
95
150
  }
96
151
  else {
152
+ reportCorrupted((0, pool_actions_1.findBrokenEntries)());
97
153
  console.error("No warm worktrees available. Run 'worktree-pool replenish' first.");
98
154
  process.exit(1);
99
155
  }
@@ -105,8 +161,19 @@ async function main() {
105
161
  console.error('Error: --path P is required');
106
162
  process.exit(1);
107
163
  }
108
- (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;
109
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'}`);
110
177
  break;
111
178
  }
112
179
  case 'refresh': {
@@ -127,8 +194,8 @@ async function main() {
127
194
  break;
128
195
  }
129
196
  case 'gc': {
130
- const dryRun = flags['dry-run'] === true || flags['dry-run'] === 'true';
131
- 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;
132
199
  console.error(dryRun ? 'Garbage collection (dry run)...' : 'Running garbage collection...');
133
200
  const result = await (0, pool_actions_1.gc)({ dryRun, yes });
134
201
  if (!result.dryRun && !result.aborted) {
@@ -136,6 +203,9 @@ async function main() {
136
203
  if (result.staleIds.length > 0) {
137
204
  console.error(` Stale: ${result.staleIds.join(', ')}`);
138
205
  }
206
+ if (result.brokenIds.length > 0) {
207
+ console.error(` Broken (failed return): ${result.brokenIds.join(', ')}`);
208
+ }
139
209
  if (result.orphanIds.length > 0) {
140
210
  console.error(` Orphans: ${result.orphanIds.join(', ')}`);
141
211
  }
@@ -168,6 +238,23 @@ async function main() {
168
238
  }
169
239
  catch (err) {
170
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
+ }
171
258
  process.exit(1);
172
259
  }
173
260
  }
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,iDASwB;AAExB,SAAS,KAAK;IACZ,OAAO,CAAC,KAAK,CAAC;;;;;;;;;;;;;;8DAc8C,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,SAAS,CAAC,IAAc;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,KAAK,GAAqC,EAAE,CAAC;IAEnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,GAAG,IA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B,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, } 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,GACP,MAAM,gBAAgB,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -14,12 +14,13 @@ 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.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; } });
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,+CAcwB;AAbtB,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;AAER,+CAA6B;AAC7B,gDAA8B;AAC9B,0CAAwB"}
@@ -1,5 +1,5 @@
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
3
  /**
4
4
  * Read `.worktree-pool.json` from the repo root. Missing or corrupt files fall
5
5
  * back to defaults. `pool_dir`, when set, is resolved to an absolute path.
@@ -16,14 +16,89 @@ export interface PoolDirEntryReport extends PoolDirClassification {
16
16
  /** Branch checked out there, or `null`. */
17
17
  branch: string | null;
18
18
  }
19
+ /**
20
+ * Corrupted pool directories: still on disk, but git has no admin dir for them
21
+ * (#443). Reported so a broken pool is visible rather than surfacing as a raw
22
+ * `fatal: not a git repository` from whichever command touched it first.
23
+ */
24
+ export declare function findBrokenEntries(): PoolDirEntryReport[];
19
25
  export declare function replenish(count?: number, _parallel?: boolean): Promise<{
20
26
  created: number;
21
27
  errors: string[];
22
28
  }>;
23
- export declare function claim(issue: number, branch: string): {
29
+ export interface ClaimResult {
30
+ /** Absolute path of the claimed worktree. */
31
+ path: string;
32
+ /**
33
+ * Warm entries passed over because they are corrupted on disk (#443). The
34
+ * claim still succeeds; these are reported so the pool can be repaired.
35
+ */
36
+ broken: PoolDirEntryReport[];
37
+ }
38
+ export declare function claim(issue: number, branch: string): ClaimResult | null;
39
+ /**
40
+ * What a successful `return` verified before exiting (#453 AC2). Every field
41
+ * is checked against reality after the state write, not assumed from the fact
42
+ * that no step threw.
43
+ */
44
+ export interface ReturnVerification {
45
+ /** Entry status re-read from `.pool-state.json` — must be `warm`. */
46
+ entry_status: WorktreeStatus | 'missing';
47
+ /**
48
+ * No *tracked* file in the recycled directory is modified. Untracked files
49
+ * are deliberately not counted: `git clean -fd` runs before the warm
50
+ * commands, so anything untracked at this point is warm-command output, and
51
+ * `replenish` marks exactly that state `warm` without complaint. Failing
52
+ * here on it would make `return` stricter than the path that created the
53
+ * spare in the first place.
54
+ */
55
+ directory_clean: boolean;
56
+ /** Offending `git status --porcelain` entries when `directory_clean` is false. */
57
+ dirty_entries: string[];
58
+ /** Branch actually checked out — must be the new `pool/spare-*` temp branch. */
59
+ checked_out_branch: string | null;
60
+ /** The temp branch the recycle intended to leave behind. */
61
+ expected_branch: string;
62
+ }
63
+ /** Outcome of a successful `returnWorktree`. */
64
+ export interface ReturnResult {
65
+ /** New pool entry id after recycling. */
66
+ id: string;
67
+ /** Absolute path the recycled worktree now lives at. */
24
68
  path: string;
25
- } | null;
26
- export declare function returnWorktree(worktreePath: string): void;
69
+ /** The self-check that ran before this result was returned. */
70
+ verification: ReturnVerification;
71
+ }
72
+ /**
73
+ * A `return` that failed, tagged with the step that failed (#453 AC1). The
74
+ * pool entry has been left in `status: 'broken'` — not `assigned`, not `warm`
75
+ * — and the worktree directory is deliberately NOT destroyed, so the failure
76
+ * is inspectable and `gc` can clear it deliberately.
77
+ *
78
+ * `markError` is the one case where that promise could not be kept: the
79
+ * broken-marking write itself failed. Callers must report it rather than
80
+ * assume the entry is marked, or they reproduce the very bug #453 is about.
81
+ */
82
+ export declare class ReturnFailure extends Error {
83
+ readonly step: ReturnStep;
84
+ readonly entryId: string | null;
85
+ readonly worktreePath: string;
86
+ /** Why the entry could NOT be marked broken, or `null` when it was marked. */
87
+ readonly markError: string | null;
88
+ constructor(step: ReturnStep, worktreePath: string, entryId: string | null, cause: unknown, markError?: string | null);
89
+ }
90
+ /**
91
+ * Recycle an assigned worktree back to `warm`.
92
+ *
93
+ * Transactional in outcome (#453): it either finishes and returns a verified
94
+ * `warm` entry, or it leaves the entry `broken` and throws a `ReturnFailure`
95
+ * naming the step. It never leaves the entry `assigned`, never reports success
96
+ * over an unverified pool, and — unlike the pre-#453 behaviour — never
97
+ * destroys the worktree on failure. A broken entry keeps its provenance
98
+ * (recorded id, actual on-disk path, a pool-owned temp branch) so `status`
99
+ * shows it and `gc` can remove it.
100
+ */
101
+ export declare function returnWorktree(worktreePath: string): ReturnResult;
27
102
  export interface RefreshResult {
28
103
  refreshed: number;
29
104
  /** Worktrees left untouched because provenance could not be confirmed. */
@@ -45,7 +120,9 @@ export type GcCandidateKind =
45
120
  /** State row with nothing (of ours) on disk — the row is dropped, disk untouched. */
46
121
  | 'orphan-state'
47
122
  /** Pool-created directory missing from state — removed from disk. */
48
- | 'orphan-disk';
123
+ | 'orphan-disk'
124
+ /** Entry a `return` left broken (#453) — removed from disk and state. */
125
+ | 'broken';
49
126
  export interface GcCandidate {
50
127
  kind: GcCandidateKind;
51
128
  /** Pool worktree id, or the directory name for a disk-only orphan. */
@@ -60,6 +137,8 @@ export interface GcResult {
60
137
  removed: number;
61
138
  staleIds: string[];
62
139
  orphanIds: string[];
140
+ /** Entries removed because a `return` had left them broken (#453). */
141
+ brokenIds: string[];
63
142
  /** Everything in the pool directory the pool refuses to touch. */
64
143
  foreign: PoolDirEntryReport[];
65
144
  /** The exact removal list, whether or not it was executed. */
@@ -74,6 +153,8 @@ export declare function status(): ReturnType<typeof getPoolStatus> & {
74
153
  pool_dir: string;
75
154
  /** Worktrees sharing the pool directory that the pool did not create. */
76
155
  foreign: PoolDirEntryReport[];
156
+ /** Directories on disk that git no longer has an admin dir for (#443). */
157
+ broken: PoolDirEntryReport[];
77
158
  };
78
159
  /**
79
160
  * Detect the project environment for `dir`, or — when omitted — for this
@@ -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;AAwOD,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;AAkGD,wBAAsB,SAAS,CAC7B,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,UAAQ,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA8FhD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