@gaia-ai/addon-herdr 0.11.5 → 0.13.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/dist/src/index.js +21 -0
- package/package.json +4 -4
package/dist/src/index.js
CHANGED
|
@@ -515,6 +515,27 @@ export class HerdrExecutor {
|
|
|
515
515
|
* flagging it cleaned (GAIA-141 RC-2).
|
|
516
516
|
*/
|
|
517
517
|
async removeWorktree(branch, worktreePath) {
|
|
518
|
+
// GAIA-468 / GAIA-228 (superseded MR !258, trigger folded in here): a
|
|
519
|
+
// ticket whose recorded `worktreePath` IS the configured parent-repo root
|
|
520
|
+
// must be refused rather than acted on. GAIA-293 already excludes the main
|
|
521
|
+
// checkout on the git side (`findGitWorktree` drops porcelain record 0 and
|
|
522
|
+
// the configured root), but neither `resolveWorktreeEntry` (herdr-tracked
|
|
523
|
+
// path) nor the probe fallback below carried the same filter, leaving two
|
|
524
|
+
// live branches: herdr tracks the workspace → `herdr worktree remove
|
|
525
|
+
// --force` throws `not_linked_worktree`, caught by the reaper and retried
|
|
526
|
+
// forever; herdr does NOT track it → the probe resolves `worktreePath`
|
|
527
|
+
// itself (unfiltered), `registered: false`, `onDisk: true`, and
|
|
528
|
+
// `gitAwareRemove` calls `forceRemoveDir` on the MAIN CHECKOUT. Refusing
|
|
529
|
+
// here, before either branch is reached, closes both without touching the
|
|
530
|
+
// git-side exclusion or the executor's `unverified`/`already_absent`
|
|
531
|
+
// contract for every other path.
|
|
532
|
+
if (this.options.root && worktreePath) {
|
|
533
|
+
const root = normPath(this.options.root);
|
|
534
|
+
if (normPath(worktreePath) === root) {
|
|
535
|
+
this.logger.warn({ branch, worktreePath, root: this.options.root }, 'refusing to tear down the main checkout');
|
|
536
|
+
return 'unverified';
|
|
537
|
+
}
|
|
538
|
+
}
|
|
518
539
|
const entries = await this.listWorktrees();
|
|
519
540
|
const entry = resolveWorktreeEntry(entries, branch, worktreePath);
|
|
520
541
|
if (!entry) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaia-ai/addon-herdr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "GAIA herdr integration: spawn executor + per-ticket worktree workspace.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"directory": "gaia-cli/addons/herdr"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@gaia-ai/addon-workspace-git": "^0.
|
|
23
|
+
"@gaia-ai/addon-workspace-git": "^0.13.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@gaia-ai/conductor": "^0.
|
|
27
|
-
"@gaia-ai/core": "^0.
|
|
26
|
+
"@gaia-ai/conductor": "^0.13.0",
|
|
27
|
+
"@gaia-ai/core": "^0.13.0"
|
|
28
28
|
}
|
|
29
29
|
}
|