gsd-pi 2.60.0-dev.2580e65 → 2.60.0-dev.d9052f5
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/resources/extensions/ask-user-questions.js +4 -7
- package/dist/resources/extensions/gsd/auto/phases.js +7 -15
- package/dist/resources/extensions/gsd/auto-dashboard.js +8 -21
- package/dist/resources/extensions/gsd/auto-dispatch.js +3 -6
- package/dist/resources/extensions/gsd/auto-model-selection.js +9 -58
- package/dist/resources/extensions/gsd/auto-post-unit.js +2 -3
- package/dist/resources/extensions/gsd/auto-prompts.js +20 -36
- package/dist/resources/extensions/gsd/auto-recovery.js +18 -37
- package/dist/resources/extensions/gsd/auto-start.js +5 -9
- package/dist/resources/extensions/gsd/auto-timers.js +5 -11
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +3 -5
- package/dist/resources/extensions/gsd/auto-verification.js +2 -3
- package/dist/resources/extensions/gsd/auto-worktree.js +55 -120
- package/dist/resources/extensions/gsd/auto.js +17 -39
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +3 -6
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +2 -2
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +10 -4
- package/dist/resources/extensions/gsd/bootstrap/journal-tools.js +1 -2
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +0 -7
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +10 -11
- package/dist/resources/extensions/gsd/commands/catalog.js +0 -2
- package/dist/resources/extensions/gsd/commands-codebase.js +21 -48
- package/dist/resources/extensions/gsd/commands-inspect.js +1 -2
- package/dist/resources/extensions/gsd/commands-maintenance.js +19 -32
- package/dist/resources/extensions/gsd/complexity-classifier.js +4 -8
- package/dist/resources/extensions/gsd/custom-verification.js +2 -3
- package/dist/resources/extensions/gsd/gsd-db.js +13 -33
- package/dist/resources/extensions/gsd/guided-flow.js +9 -19
- package/dist/resources/extensions/gsd/init-wizard.js +0 -12
- package/dist/resources/extensions/gsd/markdown-renderer.js +9 -11
- package/dist/resources/extensions/gsd/md-importer.js +4 -5
- package/dist/resources/extensions/gsd/milestone-actions.js +2 -3
- package/dist/resources/extensions/gsd/milestone-ids.js +1 -2
- package/dist/resources/extensions/gsd/model-router.js +121 -156
- package/dist/resources/extensions/gsd/parallel-merge.js +3 -5
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +14 -26
- package/dist/resources/extensions/gsd/preferences-types.js +0 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +0 -45
- package/dist/resources/extensions/gsd/preferences.js +3 -15
- package/dist/resources/extensions/gsd/prompt-loader.js +2 -3
- package/dist/resources/extensions/gsd/prompts/rethink.md +1 -1
- package/dist/resources/extensions/gsd/rule-registry.js +6 -7
- package/dist/resources/extensions/gsd/safe-fs.js +8 -6
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +2 -3
- package/dist/resources/extensions/gsd/tools/complete-slice.js +2 -3
- package/dist/resources/extensions/gsd/tools/complete-task.js +2 -3
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +2 -3
- package/dist/resources/extensions/gsd/tools/plan-slice.js +2 -3
- package/dist/resources/extensions/gsd/tools/plan-task.js +1 -2
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +4 -4
- package/dist/resources/extensions/gsd/tools/reopen-slice.js +1 -2
- package/dist/resources/extensions/gsd/tools/reopen-task.js +1 -2
- package/dist/resources/extensions/gsd/tools/replan-slice.js +1 -2
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +1 -2
- package/dist/resources/extensions/gsd/triage-resolution.js +4 -11
- package/dist/resources/extensions/gsd/workflow-events.js +1 -2
- package/dist/resources/extensions/gsd/workflow-logger.js +4 -37
- package/dist/resources/extensions/gsd/workflow-migration.js +12 -14
- package/dist/resources/extensions/gsd/workflow-projections.js +2 -2
- package/dist/resources/extensions/gsd/workflow-reconcile.js +2 -2
- package/dist/resources/extensions/gsd/worktree-manager.js +14 -26
- package/dist/resources/extensions/shared/interview-ui.js +1 -3
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +19 -19
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +19 -19
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +0 -5
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +1 -2
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +0 -16
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +0 -26
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.js +1 -6
- package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/defaults.json +2 -2
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +0 -6
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +0 -19
- package/packages/pi-coding-agent/src/core/extensions/types.ts +0 -26
- package/packages/pi-coding-agent/src/core/lsp/config.ts +1 -7
- package/packages/pi-coding-agent/src/core/lsp/defaults.json +2 -2
- package/src/resources/extensions/ask-user-questions.ts +3 -7
- package/src/resources/extensions/gsd/auto/phases.ts +7 -17
- package/src/resources/extensions/gsd/auto-dashboard.ts +8 -22
- package/src/resources/extensions/gsd/auto-dispatch.ts +3 -7
- package/src/resources/extensions/gsd/auto-model-selection.ts +15 -77
- package/src/resources/extensions/gsd/auto-post-unit.ts +4 -4
- package/src/resources/extensions/gsd/auto-prompts.ts +20 -37
- package/src/resources/extensions/gsd/auto-recovery.ts +18 -38
- package/src/resources/extensions/gsd/auto-start.ts +9 -10
- package/src/resources/extensions/gsd/auto-timers.ts +5 -12
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +2 -6
- package/src/resources/extensions/gsd/auto-verification.ts +6 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +55 -121
- package/src/resources/extensions/gsd/auto.ts +17 -40
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +3 -4
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +2 -2
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +16 -4
- package/src/resources/extensions/gsd/bootstrap/journal-tools.ts +1 -2
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +0 -8
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +10 -11
- package/src/resources/extensions/gsd/commands/catalog.ts +0 -2
- package/src/resources/extensions/gsd/commands-codebase.ts +20 -52
- package/src/resources/extensions/gsd/commands-inspect.ts +1 -2
- package/src/resources/extensions/gsd/commands-maintenance.ts +19 -28
- package/src/resources/extensions/gsd/complexity-classifier.ts +4 -9
- package/src/resources/extensions/gsd/custom-verification.ts +2 -3
- package/src/resources/extensions/gsd/gsd-db.ts +14 -12
- package/src/resources/extensions/gsd/guided-flow.ts +8 -9
- package/src/resources/extensions/gsd/init-wizard.ts +0 -12
- package/src/resources/extensions/gsd/markdown-renderer.ts +17 -11
- package/src/resources/extensions/gsd/md-importer.ts +4 -5
- package/src/resources/extensions/gsd/milestone-actions.ts +2 -3
- package/src/resources/extensions/gsd/milestone-ids.ts +1 -2
- package/src/resources/extensions/gsd/model-router.ts +173 -199
- package/src/resources/extensions/gsd/parallel-merge.ts +3 -5
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +14 -18
- package/src/resources/extensions/gsd/preferences-types.ts +0 -13
- package/src/resources/extensions/gsd/preferences-validation.ts +0 -45
- package/src/resources/extensions/gsd/preferences.ts +3 -16
- package/src/resources/extensions/gsd/prompt-loader.ts +2 -3
- package/src/resources/extensions/gsd/prompts/rethink.md +1 -1
- package/src/resources/extensions/gsd/rule-registry.ts +6 -7
- package/src/resources/extensions/gsd/safe-fs.ts +5 -6
- package/src/resources/extensions/gsd/tests/codebase-generator.test.ts +0 -63
- package/src/resources/extensions/gsd/tests/complexity-classifier.test.ts +2 -27
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +4 -4
- package/src/resources/extensions/gsd/tests/model-router.test.ts +3 -403
- package/src/resources/extensions/gsd/tests/preferences.test.ts +0 -62
- package/src/resources/extensions/gsd/tests/remote-questions.test.ts +0 -21
- package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +6 -6
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +6 -3
- package/src/resources/extensions/gsd/tools/complete-slice.ts +6 -3
- package/src/resources/extensions/gsd/tools/complete-task.ts +6 -3
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +6 -3
- package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -3
- package/src/resources/extensions/gsd/tools/plan-task.ts +3 -2
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +6 -4
- package/src/resources/extensions/gsd/tools/reopen-slice.ts +3 -2
- package/src/resources/extensions/gsd/tools/reopen-task.ts +3 -2
- package/src/resources/extensions/gsd/tools/replan-slice.ts +3 -2
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +3 -2
- package/src/resources/extensions/gsd/triage-resolution.ts +4 -11
- package/src/resources/extensions/gsd/types.ts +0 -1
- package/src/resources/extensions/gsd/workflow-events.ts +1 -2
- package/src/resources/extensions/gsd/workflow-logger.ts +5 -52
- package/src/resources/extensions/gsd/workflow-migration.ts +12 -14
- package/src/resources/extensions/gsd/workflow-projections.ts +2 -2
- package/src/resources/extensions/gsd/workflow-reconcile.ts +2 -2
- package/src/resources/extensions/gsd/worktree-manager.ts +14 -16
- package/src/resources/extensions/shared/interview-ui.ts +1 -3
- package/packages/pi-coding-agent/dist/core/lsp/lsp-legacy-alias.test.d.ts +0 -2
- package/packages/pi-coding-agent/dist/core/lsp/lsp-legacy-alias.test.d.ts.map +0 -1
- package/packages/pi-coding-agent/dist/core/lsp/lsp-legacy-alias.test.js +0 -47
- package/packages/pi-coding-agent/dist/core/lsp/lsp-legacy-alias.test.js.map +0 -1
- package/packages/pi-coding-agent/src/core/lsp/lsp-legacy-alias.test.ts +0 -70
- package/src/resources/extensions/gsd/tests/capability-router.test.ts +0 -347
- package/src/resources/extensions/gsd/tests/integration/state-machine-edge-cases.test.ts +0 -1188
- package/src/resources/extensions/gsd/tests/integration/state-machine-runtime-failures.test.ts +0 -841
- package/src/resources/extensions/gsd/tests/silent-catch-diagnostics.test.ts +0 -284
- package/src/resources/extensions/gsd/tests/workflow-logger-audit.test.ts +0 -120
- package/src/resources/extensions/shared/tests/interview-notes-loop.test.ts +0 -144
- /package/dist/web/standalone/.next/static/{ogyMN7M-3bGGuRY08L5HR → JVkoVYumy0cDhOQISEYdG}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{ogyMN7M-3bGGuRY08L5HR → JVkoVYumy0cDhOQISEYdG}/_ssgManifest.js +0 -0
|
@@ -18,7 +18,7 @@ import { createWorktree, removeWorktree, resolveGitDir, worktreePath, } from "./
|
|
|
18
18
|
import { detectWorktreeName, nudgeGitBranchCache, } from "./worktree.js";
|
|
19
19
|
import { MergeConflictError, readIntegrationBranch, RUNTIME_EXCLUSION_PATHS } from "./git-service.js";
|
|
20
20
|
import { debugLog } from "./debug-logger.js";
|
|
21
|
-
import { logWarning
|
|
21
|
+
import { logWarning } from "./workflow-logger.js";
|
|
22
22
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
23
23
|
import { nativeGetCurrentBranch, nativeDetectMainBranch, nativeWorkingTreeStatus, nativeAddAllWithExclusions, nativeCommit, nativeCheckoutBranch, nativeMergeSquash, nativeConflictFiles, nativeCheckoutTheirs, nativeAddPaths, nativeRmForce, nativeBranchDelete, nativeBranchExists, nativeDiffNumstat, nativeUpdateRef, nativeIsAncestor, nativeMergeAbort, } from "./native-git-bridge.js";
|
|
24
24
|
const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd");
|
|
@@ -53,8 +53,7 @@ function isSamePath(a, b) {
|
|
|
53
53
|
try {
|
|
54
54
|
return realpathSync(a) === realpathSync(b);
|
|
55
55
|
}
|
|
56
|
-
catch
|
|
57
|
-
logWarning("worktree", `isSamePath failed: ${e.message}`);
|
|
56
|
+
catch {
|
|
58
57
|
return false;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
@@ -103,21 +102,18 @@ function forceOverwriteAssessmentsWithVerdict(srcMilestoneDir, dstMilestoneDir)
|
|
|
103
102
|
mkdirSync(dstSliceDir, { recursive: true });
|
|
104
103
|
safeCopy(srcFile, join(dstSliceDir, fileEntry.name), { force: true });
|
|
105
104
|
}
|
|
106
|
-
catch
|
|
105
|
+
catch {
|
|
107
106
|
/* non-fatal per file */
|
|
108
|
-
logWarning("worktree", `assessment force-copy failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
|
-
catch
|
|
110
|
+
catch {
|
|
113
111
|
/* non-fatal per slice */
|
|
114
|
-
logWarning("worktree", `assessment slice scan failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
|
-
catch
|
|
115
|
+
catch {
|
|
119
116
|
/* non-fatal */
|
|
120
|
-
logWarning("worktree", `assessment sync failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
119
|
// ─── Module State ──────────────────────────────────────────────────────────
|
|
@@ -134,9 +130,8 @@ function clearProjectRootStateFiles(basePath, milestoneId) {
|
|
|
134
130
|
try {
|
|
135
131
|
unlinkSync(file);
|
|
136
132
|
}
|
|
137
|
-
catch
|
|
133
|
+
catch {
|
|
138
134
|
/* non-fatal — file may not exist */
|
|
139
|
-
logWarning("worktree", `file unlink failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
140
135
|
}
|
|
141
136
|
}
|
|
142
137
|
// Clean up entire synced milestone directory and runtime/units.
|
|
@@ -159,17 +154,15 @@ function clearProjectRootStateFiles(basePath, milestoneId) {
|
|
|
159
154
|
try {
|
|
160
155
|
unlinkSync(join(basePath, f));
|
|
161
156
|
}
|
|
162
|
-
catch
|
|
157
|
+
catch {
|
|
163
158
|
/* non-fatal */
|
|
164
|
-
logWarning("worktree", `untracked file unlink failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
165
159
|
}
|
|
166
160
|
}
|
|
167
161
|
}
|
|
168
162
|
}
|
|
169
163
|
}
|
|
170
|
-
catch
|
|
164
|
+
catch {
|
|
171
165
|
/* non-fatal — git command may fail if not in repo */
|
|
172
|
-
logWarning("worktree", `untracked file cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
173
166
|
}
|
|
174
167
|
}
|
|
175
168
|
}
|
|
@@ -241,9 +234,8 @@ export function syncProjectRootToWorktree(projectRoot, worktreePath_, milestoneI
|
|
|
241
234
|
}
|
|
242
235
|
}
|
|
243
236
|
}
|
|
244
|
-
catch
|
|
237
|
+
catch {
|
|
245
238
|
/* non-fatal */
|
|
246
|
-
logWarning("worktree", `worktree DB cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
247
239
|
}
|
|
248
240
|
}
|
|
249
241
|
/**
|
|
@@ -294,8 +286,7 @@ export function readResourceVersion() {
|
|
|
294
286
|
? manifest.gsdVersion
|
|
295
287
|
: null;
|
|
296
288
|
}
|
|
297
|
-
catch
|
|
298
|
-
logWarning("worktree", `readResourceVersion failed: ${e.message}`);
|
|
289
|
+
catch {
|
|
299
290
|
return null;
|
|
300
291
|
}
|
|
301
292
|
}
|
|
@@ -355,9 +346,8 @@ export function escapeStaleWorktree(base) {
|
|
|
355
346
|
try {
|
|
356
347
|
process.chdir(projectRoot);
|
|
357
348
|
}
|
|
358
|
-
catch
|
|
349
|
+
catch {
|
|
359
350
|
// If chdir fails, return the original — caller will handle errors downstream
|
|
360
|
-
logWarning("worktree", `escapeStaleWorktree chdir failed: ${e.message}`);
|
|
361
351
|
return base;
|
|
362
352
|
}
|
|
363
353
|
return projectRoot;
|
|
@@ -386,16 +376,14 @@ export function cleanStaleRuntimeUnits(gsdRootPath, hasMilestoneSummary) {
|
|
|
386
376
|
unlinkSync(join(runtimeUnitsDir, file));
|
|
387
377
|
cleaned++;
|
|
388
378
|
}
|
|
389
|
-
catch
|
|
379
|
+
catch {
|
|
390
380
|
/* non-fatal */
|
|
391
|
-
logWarning("worktree", `stale runtime unit unlink failed (${file}): ${err instanceof Error ? err.message : String(err)}`);
|
|
392
381
|
}
|
|
393
382
|
}
|
|
394
383
|
}
|
|
395
384
|
}
|
|
396
|
-
catch
|
|
385
|
+
catch {
|
|
397
386
|
/* non-fatal */
|
|
398
|
-
logWarning("worktree", `stale runtime unit cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
399
387
|
}
|
|
400
388
|
return cleaned;
|
|
401
389
|
}
|
|
@@ -432,9 +420,8 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
432
420
|
cpSync(src, dst);
|
|
433
421
|
synced.push(f);
|
|
434
422
|
}
|
|
435
|
-
catch
|
|
423
|
+
catch {
|
|
436
424
|
/* non-fatal */
|
|
437
|
-
logWarning("worktree", `file copy failed (${f}): ${err instanceof Error ? err.message : String(err)}`);
|
|
438
425
|
}
|
|
439
426
|
}
|
|
440
427
|
}
|
|
@@ -453,9 +440,8 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
453
440
|
cpSync(src, dst);
|
|
454
441
|
synced.push(file);
|
|
455
442
|
}
|
|
456
|
-
catch
|
|
443
|
+
catch {
|
|
457
444
|
/* non-fatal */
|
|
458
|
-
logWarning("worktree", `preferences copy failed (${file}): ${err instanceof Error ? err.message : String(err)}`);
|
|
459
445
|
}
|
|
460
446
|
break;
|
|
461
447
|
}
|
|
@@ -482,9 +468,8 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
482
468
|
cpSync(srcDir, dstDir, { recursive: true });
|
|
483
469
|
synced.push(`milestones/${mid}/`);
|
|
484
470
|
}
|
|
485
|
-
catch
|
|
471
|
+
catch {
|
|
486
472
|
/* non-fatal */
|
|
487
|
-
logWarning("worktree", `milestone copy failed (${mid}): ${err instanceof Error ? err.message : String(err)}`);
|
|
488
473
|
}
|
|
489
474
|
}
|
|
490
475
|
else {
|
|
@@ -503,9 +488,8 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
503
488
|
synced.push(`milestones/${mid}/${f}`);
|
|
504
489
|
}
|
|
505
490
|
}
|
|
506
|
-
catch
|
|
491
|
+
catch {
|
|
507
492
|
/* non-fatal */
|
|
508
|
-
logWarning("worktree", `milestone file copy failed (${mid}/${f}): ${err instanceof Error ? err.message : String(err)}`);
|
|
509
493
|
}
|
|
510
494
|
}
|
|
511
495
|
}
|
|
@@ -517,9 +501,8 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
517
501
|
cpSync(srcSlicesDir, dstSlicesDir, { recursive: true });
|
|
518
502
|
synced.push(`milestones/${mid}/slices/`);
|
|
519
503
|
}
|
|
520
|
-
catch
|
|
504
|
+
catch {
|
|
521
505
|
/* non-fatal */
|
|
522
|
-
logWarning("worktree", `slices copy failed (${mid}): ${err instanceof Error ? err.message : String(err)}`);
|
|
523
506
|
}
|
|
524
507
|
}
|
|
525
508
|
else if (existsSync(srcSlicesDir) && existsSync(dstSlicesDir)) {
|
|
@@ -537,24 +520,21 @@ export function syncGsdStateToWorktree(mainBasePath, worktreePath_) {
|
|
|
537
520
|
cpSync(srcSlice, dstSlice, { recursive: true });
|
|
538
521
|
synced.push(`milestones/${mid}/slices/${sid}/`);
|
|
539
522
|
}
|
|
540
|
-
catch
|
|
523
|
+
catch {
|
|
541
524
|
/* non-fatal */
|
|
542
|
-
logWarning("worktree", `slice copy failed (${mid}/${sid}): ${err instanceof Error ? err.message : String(err)}`);
|
|
543
525
|
}
|
|
544
526
|
}
|
|
545
527
|
}
|
|
546
528
|
}
|
|
547
529
|
}
|
|
548
|
-
catch
|
|
530
|
+
catch {
|
|
549
531
|
/* non-fatal */
|
|
550
|
-
logWarning("worktree", `milestone file sync failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
551
532
|
}
|
|
552
533
|
}
|
|
553
534
|
}
|
|
554
535
|
}
|
|
555
|
-
catch
|
|
536
|
+
catch {
|
|
556
537
|
/* non-fatal */
|
|
557
|
-
logWarning("worktree", `milestone directory sync failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
558
538
|
}
|
|
559
539
|
}
|
|
560
540
|
return { synced };
|
|
@@ -600,9 +580,8 @@ export function syncWorktreeStateBack(mainBasePath, worktreePath, milestoneId) {
|
|
|
600
580
|
reconcileWorktreeDb(mainDb, wtLocalDb);
|
|
601
581
|
synced.push("gsd.db (pre-upgrade reconcile)");
|
|
602
582
|
}
|
|
603
|
-
catch
|
|
583
|
+
catch {
|
|
604
584
|
// Non-fatal — file sync below is the fallback
|
|
605
|
-
logError("worktree", `DB reconciliation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
606
585
|
}
|
|
607
586
|
}
|
|
608
587
|
// ── 1. Sync root-level .gsd/ files back ──────────────────────────────
|
|
@@ -619,9 +598,8 @@ export function syncWorktreeStateBack(mainBasePath, worktreePath, milestoneId) {
|
|
|
619
598
|
cpSync(src, dst, { force: true });
|
|
620
599
|
synced.push(f);
|
|
621
600
|
}
|
|
622
|
-
catch
|
|
601
|
+
catch {
|
|
623
602
|
/* non-fatal */
|
|
624
|
-
logWarning("worktree", `state file copy-back failed (${f}): ${err instanceof Error ? err.message : String(err)}`);
|
|
625
603
|
}
|
|
626
604
|
}
|
|
627
605
|
}
|
|
@@ -640,9 +618,8 @@ export function syncWorktreeStateBack(mainBasePath, worktreePath, milestoneId) {
|
|
|
640
618
|
syncMilestoneDir(wtGsd, mainGsd, mid, synced);
|
|
641
619
|
}
|
|
642
620
|
}
|
|
643
|
-
catch
|
|
621
|
+
catch {
|
|
644
622
|
/* non-fatal */
|
|
645
|
-
logWarning("worktree", `milestone sync-back failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
646
623
|
}
|
|
647
624
|
return { synced };
|
|
648
625
|
}
|
|
@@ -660,15 +637,13 @@ function syncDirFiles(srcDir, dstDir, filter, synced, prefix) {
|
|
|
660
637
|
cpSync(join(srcDir, entry.name), join(dstDir, entry.name), { force: true });
|
|
661
638
|
synced.push(`${prefix}${entry.name}`);
|
|
662
639
|
}
|
|
663
|
-
catch
|
|
640
|
+
catch {
|
|
664
641
|
/* non-fatal */
|
|
665
|
-
logWarning("worktree", `file copy failed (${prefix}${entry.name}): ${err instanceof Error ? err.message : String(err)}`);
|
|
666
642
|
}
|
|
667
643
|
}
|
|
668
644
|
}
|
|
669
|
-
catch
|
|
645
|
+
catch {
|
|
670
646
|
/* non-fatal — srcDir may not be readable */
|
|
671
|
-
logWarning("worktree", `directory read failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
672
647
|
}
|
|
673
648
|
}
|
|
674
649
|
function syncMilestoneDir(wtGsd, mainGsd, mid, synced) {
|
|
@@ -702,9 +677,8 @@ function syncMilestoneDir(wtGsd, mainGsd, mid, synced) {
|
|
|
702
677
|
}
|
|
703
678
|
}
|
|
704
679
|
}
|
|
705
|
-
catch
|
|
680
|
+
catch {
|
|
706
681
|
/* non-fatal */
|
|
707
|
-
logWarning("worktree", `milestone slice sync failed (${mid}): ${err instanceof Error ? err.message : String(err)}`);
|
|
708
682
|
}
|
|
709
683
|
}
|
|
710
684
|
// ─── Worktree Post-Create Hook (#597) ────────────────────────────────────────
|
|
@@ -734,9 +708,7 @@ export function runWorktreePostCreateHook(sourceDir, worktreeDir, hookPath) {
|
|
|
734
708
|
try {
|
|
735
709
|
resolved = realpathSync.native(resolved);
|
|
736
710
|
}
|
|
737
|
-
catch
|
|
738
|
-
logWarning("worktree", `realpath failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
739
|
-
}
|
|
711
|
+
catch { /* keep original */ }
|
|
740
712
|
}
|
|
741
713
|
try {
|
|
742
714
|
// .bat/.cmd files on Windows require shell mode — execFileSync cannot
|
|
@@ -813,9 +785,8 @@ function reconcilePlanCheckboxes(projectRoot, wtPath, milestoneId) {
|
|
|
813
785
|
}
|
|
814
786
|
}
|
|
815
787
|
}
|
|
816
|
-
catch
|
|
788
|
+
catch {
|
|
817
789
|
/* non-fatal */
|
|
818
|
-
logWarning("worktree", `walkMd directory read failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
819
790
|
}
|
|
820
791
|
return results;
|
|
821
792
|
}
|
|
@@ -830,8 +801,7 @@ function reconcilePlanCheckboxes(projectRoot, wtPath, milestoneId) {
|
|
|
830
801
|
srcContent = readFileSync(srcFile, "utf-8");
|
|
831
802
|
dstContent = readFileSync(dstFile, "utf-8");
|
|
832
803
|
}
|
|
833
|
-
catch
|
|
834
|
-
logWarning("worktree", `reconcilePlanCheckboxes read failed: ${e.message}`);
|
|
804
|
+
catch {
|
|
835
805
|
continue;
|
|
836
806
|
}
|
|
837
807
|
if (srcContent === dstContent)
|
|
@@ -859,9 +829,8 @@ function reconcilePlanCheckboxes(projectRoot, wtPath, milestoneId) {
|
|
|
859
829
|
try {
|
|
860
830
|
atomicWriteSync(dstFile, updated, "utf-8");
|
|
861
831
|
}
|
|
862
|
-
catch
|
|
832
|
+
catch {
|
|
863
833
|
/* non-fatal */
|
|
864
|
-
logWarning("worktree", `plan checkbox reconcile write failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
865
834
|
}
|
|
866
835
|
}
|
|
867
836
|
}
|
|
@@ -1010,9 +979,8 @@ export function teardownAutoWorktree(originalBasePath, milestoneId, opts = {}) {
|
|
|
1010
979
|
try {
|
|
1011
980
|
rmSync(wtDir, { recursive: true, force: true });
|
|
1012
981
|
}
|
|
1013
|
-
catch
|
|
982
|
+
catch {
|
|
1014
983
|
// Non-fatal — the warning above tells the user how to clean up
|
|
1015
|
-
logWarning("worktree", `worktree directory removal failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1016
984
|
}
|
|
1017
985
|
}
|
|
1018
986
|
}
|
|
@@ -1053,8 +1021,7 @@ export function getAutoWorktreePath(basePath, milestoneId) {
|
|
|
1053
1021
|
if (!content.startsWith("gitdir: "))
|
|
1054
1022
|
return null;
|
|
1055
1023
|
}
|
|
1056
|
-
catch
|
|
1057
|
-
logWarning("worktree", `getAutoWorktreePath .git read failed: ${e.message}`);
|
|
1024
|
+
catch {
|
|
1058
1025
|
return null;
|
|
1059
1026
|
}
|
|
1060
1027
|
return p;
|
|
@@ -1181,9 +1148,8 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1181
1148
|
reconcileWorktreeDb(mainDbPath, worktreeDbPath);
|
|
1182
1149
|
}
|
|
1183
1150
|
}
|
|
1184
|
-
catch
|
|
1151
|
+
catch {
|
|
1185
1152
|
/* non-fatal */
|
|
1186
|
-
logError("worktree", `DB reconciliation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1187
1153
|
}
|
|
1188
1154
|
}
|
|
1189
1155
|
// 2. Get completed slices for commit message
|
|
@@ -1319,10 +1285,9 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1319
1285
|
stashed = true;
|
|
1320
1286
|
}
|
|
1321
1287
|
}
|
|
1322
|
-
catch
|
|
1288
|
+
catch {
|
|
1323
1289
|
// Stash failure is non-fatal — proceed without stash and let the merge
|
|
1324
1290
|
// report the dirty tree if it fails.
|
|
1325
|
-
logWarning("worktree", `git stash failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1326
1291
|
}
|
|
1327
1292
|
// 7a. Shelter queued milestone directories before the squash merge (#2505).
|
|
1328
1293
|
// The milestone branch may contain copies of queued milestone dirs (via
|
|
@@ -1343,16 +1308,12 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1343
1308
|
mkdirSync(milestonesDir, { recursive: true });
|
|
1344
1309
|
cpSync(join(shelterDir, dirName), join(milestonesDir, dirName), { recursive: true, force: true });
|
|
1345
1310
|
}
|
|
1346
|
-
catch
|
|
1347
|
-
logError("worktree", `shelter restore failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1348
|
-
}
|
|
1311
|
+
catch { /* best-effort */ }
|
|
1349
1312
|
}
|
|
1350
1313
|
try {
|
|
1351
1314
|
rmSync(shelterDir, { recursive: true, force: true });
|
|
1352
1315
|
}
|
|
1353
|
-
catch
|
|
1354
|
-
logWarning("worktree", `shelter cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1355
|
-
}
|
|
1316
|
+
catch { /* best-effort */ }
|
|
1356
1317
|
};
|
|
1357
1318
|
try {
|
|
1358
1319
|
if (existsSync(milestonesDir)) {
|
|
@@ -1371,16 +1332,14 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1371
1332
|
rmSync(srcDir, { recursive: true, force: true });
|
|
1372
1333
|
shelteredDirs.push(entry.name);
|
|
1373
1334
|
}
|
|
1374
|
-
catch
|
|
1335
|
+
catch {
|
|
1375
1336
|
// Non-fatal — if shelter fails, the merge may still succeed
|
|
1376
|
-
logWarning("worktree", `milestone shelter failed (${entry.name}): ${err instanceof Error ? err.message : String(err)}`);
|
|
1377
1337
|
}
|
|
1378
1338
|
}
|
|
1379
1339
|
}
|
|
1380
1340
|
}
|
|
1381
|
-
catch
|
|
1341
|
+
catch {
|
|
1382
1342
|
// Non-fatal — proceed with merge; untracked files may block it
|
|
1383
|
-
logWarning("worktree", `milestone shelter operation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1384
1343
|
}
|
|
1385
1344
|
// 7b. Clean up stale merge state before attempting squash merge (#2912).
|
|
1386
1345
|
// A leftover MERGE_HEAD (from a previous failed merge, libgit2 native path,
|
|
@@ -1395,9 +1354,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1395
1354
|
unlinkSync(p);
|
|
1396
1355
|
}
|
|
1397
1356
|
}
|
|
1398
|
-
catch
|
|
1399
|
-
logError("worktree", `merge state cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1400
|
-
}
|
|
1357
|
+
catch { /* best-effort */ }
|
|
1401
1358
|
// 8. Squash merge — auto-resolve .gsd/ state file conflicts (#530)
|
|
1402
1359
|
const mergeResult = nativeMergeSquash(originalBasePath_, milestoneBranch);
|
|
1403
1360
|
if (!mergeResult.success) {
|
|
@@ -1415,9 +1372,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1415
1372
|
unlinkSync(p);
|
|
1416
1373
|
}
|
|
1417
1374
|
}
|
|
1418
|
-
catch
|
|
1419
|
-
logError("worktree", `merge state cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1420
|
-
}
|
|
1375
|
+
catch { /* best-effort */ }
|
|
1421
1376
|
// Pop stash before throwing so local work is not lost.
|
|
1422
1377
|
if (stashed) {
|
|
1423
1378
|
try {
|
|
@@ -1427,9 +1382,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1427
1382
|
encoding: "utf-8",
|
|
1428
1383
|
});
|
|
1429
1384
|
}
|
|
1430
|
-
catch
|
|
1431
|
-
logWarning("worktree", `git stash pop failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1432
|
-
}
|
|
1385
|
+
catch { /* stash pop conflict is non-fatal */ }
|
|
1433
1386
|
}
|
|
1434
1387
|
restoreShelter();
|
|
1435
1388
|
// Restore cwd so the caller is not stranded on the integration branch
|
|
@@ -1460,10 +1413,9 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1460
1413
|
nativeCheckoutTheirs(originalBasePath_, [safeFile]);
|
|
1461
1414
|
nativeAddPaths(originalBasePath_, [safeFile]);
|
|
1462
1415
|
}
|
|
1463
|
-
catch
|
|
1416
|
+
catch {
|
|
1464
1417
|
// If checkout --theirs fails, try removing the file from the merge
|
|
1465
1418
|
// (it's a runtime file that shouldn't be committed anyway)
|
|
1466
|
-
logWarning("worktree", `checkout --theirs failed for ${safeFile}, removing: ${e.message}`);
|
|
1467
1419
|
nativeRmForce(originalBasePath_, [safeFile]);
|
|
1468
1420
|
}
|
|
1469
1421
|
}
|
|
@@ -1476,9 +1428,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1476
1428
|
try {
|
|
1477
1429
|
nativeMergeAbort(originalBasePath_);
|
|
1478
1430
|
}
|
|
1479
|
-
catch
|
|
1480
|
-
logError("worktree", `git merge-abort failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1481
|
-
}
|
|
1431
|
+
catch { /* best-effort */ }
|
|
1482
1432
|
try {
|
|
1483
1433
|
const gitDir_ = resolveGitDir(originalBasePath_);
|
|
1484
1434
|
for (const f of ["SQUASH_MSG", "MERGE_MSG", "MERGE_HEAD"]) {
|
|
@@ -1487,9 +1437,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1487
1437
|
unlinkSync(p);
|
|
1488
1438
|
}
|
|
1489
1439
|
}
|
|
1490
|
-
catch
|
|
1491
|
-
logError("worktree", `merge state file cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1492
|
-
}
|
|
1440
|
+
catch { /* best-effort */ }
|
|
1493
1441
|
// Pop stash before throwing so local work is not lost (#2151).
|
|
1494
1442
|
if (stashed) {
|
|
1495
1443
|
try {
|
|
@@ -1499,9 +1447,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1499
1447
|
encoding: "utf-8",
|
|
1500
1448
|
});
|
|
1501
1449
|
}
|
|
1502
|
-
catch
|
|
1503
|
-
logWarning("worktree", `git stash pop failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1504
|
-
}
|
|
1450
|
+
catch { /* stash pop conflict is non-fatal */ }
|
|
1505
1451
|
}
|
|
1506
1452
|
restoreShelter();
|
|
1507
1453
|
throw new MergeConflictError(codeConflicts, "squash", milestoneBranch, mainBranch);
|
|
@@ -1526,9 +1472,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1526
1472
|
unlinkSync(p);
|
|
1527
1473
|
}
|
|
1528
1474
|
}
|
|
1529
|
-
catch
|
|
1530
|
-
logError("worktree", `post-commit merge state cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1531
|
-
}
|
|
1475
|
+
catch { /* best-effort */ }
|
|
1532
1476
|
// 9a-ii. Restore stashed files now that the merge+commit is complete (#2151).
|
|
1533
1477
|
// Pop after commit so stashed changes do not interfere with the squash merge
|
|
1534
1478
|
// or the commit content. Conflict on pop is non-fatal — the stash entry is
|
|
@@ -1541,8 +1485,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1541
1485
|
encoding: "utf-8",
|
|
1542
1486
|
});
|
|
1543
1487
|
}
|
|
1544
|
-
catch
|
|
1545
|
-
logWarning("worktree", `git stash pop failed, attempting conflict resolution: ${e.message}`);
|
|
1488
|
+
catch {
|
|
1546
1489
|
// Stash pop after squash merge can conflict on .gsd/ state files that
|
|
1547
1490
|
// diverged between branches. Left unresolved, these UU entries block
|
|
1548
1491
|
// every subsequent merge. Auto-resolve them the same way we handle
|
|
@@ -1562,9 +1505,8 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1562
1505
|
});
|
|
1563
1506
|
nativeAddPaths(originalBasePath_, [f]);
|
|
1564
1507
|
}
|
|
1565
|
-
catch
|
|
1508
|
+
catch {
|
|
1566
1509
|
// Last resort: remove the conflicted state file
|
|
1567
|
-
logWarning("worktree", `checkout HEAD failed for ${f}, removing: ${e.message}`);
|
|
1568
1510
|
nativeRmForce(originalBasePath_, [f]);
|
|
1569
1511
|
}
|
|
1570
1512
|
}
|
|
@@ -1578,9 +1520,7 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1578
1520
|
encoding: "utf-8",
|
|
1579
1521
|
});
|
|
1580
1522
|
}
|
|
1581
|
-
catch
|
|
1582
|
-
logWarning("worktree", `git stash drop failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1583
|
-
}
|
|
1523
|
+
catch { /* stash may already be consumed */ }
|
|
1584
1524
|
}
|
|
1585
1525
|
else {
|
|
1586
1526
|
// Non-.gsd conflicts remain — leave stash for manual resolution
|
|
@@ -1617,9 +1557,8 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1617
1557
|
const mergedFiles = nativeDiffNumstat(originalBasePath_, "HEAD~1", "HEAD");
|
|
1618
1558
|
codeFilesChanged = mergedFiles.some((entry) => !entry.path.startsWith(".gsd/"));
|
|
1619
1559
|
}
|
|
1620
|
-
catch
|
|
1560
|
+
catch {
|
|
1621
1561
|
// If HEAD~1 doesn't exist (first commit), assume code was changed
|
|
1622
|
-
logWarning("worktree", `diff numstat failed (assuming code changed): ${e.message}`);
|
|
1623
1562
|
codeFilesChanged = true;
|
|
1624
1563
|
}
|
|
1625
1564
|
}
|
|
@@ -1635,9 +1574,8 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1635
1574
|
});
|
|
1636
1575
|
pushed = true;
|
|
1637
1576
|
}
|
|
1638
|
-
catch
|
|
1577
|
+
catch {
|
|
1639
1578
|
// Push failure is non-fatal
|
|
1640
|
-
logWarning("worktree", `git push failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1641
1579
|
}
|
|
1642
1580
|
}
|
|
1643
1581
|
// 9b. Auto-create PR if enabled (#2302: no longer gated on pushed/auto_push)
|
|
@@ -1666,9 +1604,8 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1666
1604
|
});
|
|
1667
1605
|
prCreated = true;
|
|
1668
1606
|
}
|
|
1669
|
-
catch
|
|
1607
|
+
catch {
|
|
1670
1608
|
// PR creation failure is non-fatal — gh may not be installed or authenticated
|
|
1671
|
-
logWarning("worktree", `PR creation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1672
1609
|
}
|
|
1673
1610
|
}
|
|
1674
1611
|
// 11. Guard removed — step 9b (#1792) now handles this with a smarter check:
|
|
@@ -1705,17 +1642,15 @@ export function mergeMilestoneToMain(originalBasePath_, milestoneId, roadmapCont
|
|
|
1705
1642
|
deleteBranch: false,
|
|
1706
1643
|
});
|
|
1707
1644
|
}
|
|
1708
|
-
catch
|
|
1645
|
+
catch {
|
|
1709
1646
|
// Best-effort -- worktree dir may already be gone
|
|
1710
|
-
logWarning("worktree", `worktree removal failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1711
1647
|
}
|
|
1712
1648
|
// 13. Delete milestone branch (after worktree removal so ref is unlocked)
|
|
1713
1649
|
try {
|
|
1714
1650
|
nativeBranchDelete(originalBasePath_, milestoneBranch);
|
|
1715
1651
|
}
|
|
1716
|
-
catch
|
|
1652
|
+
catch {
|
|
1717
1653
|
// Best-effort
|
|
1718
|
-
logWarning("worktree", `git branch-delete failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1719
1654
|
}
|
|
1720
1655
|
// 14. Clear module state
|
|
1721
1656
|
originalBase = null;
|