fix: Resolve null coalescing, feature verification, and test abort handling issues

This commit is contained in:
gsxdsm
2026-02-16 12:27:56 -08:00
parent 434792a2ef
commit 0b03e70f1d
7 changed files with 109 additions and 45 deletions

View File

@@ -227,7 +227,7 @@ export class AutoModeServiceFacade {
.replace(/\{\{taskName\}\}/g, task.description)
.replace(/\{\{taskIndex\}\}/g, String(taskIndex + 1))
.replace(/\{\{totalTasks\}\}/g, String(allTasks.length))
.replace(/\{\{taskDescription\}\}/g, task.description || task.description);
.replace(/\{\{taskDescription\}\}/g, task.description || task.name);
if (feedback) {
taskPrompt = taskPrompt.replace(/\{\{userFeedback\}\}/g, feedback);
}
@@ -636,15 +636,23 @@ Address the follow-up instructions above. Review the previous work and make the
*/
async verifyFeature(featureId: string): Promise<boolean> {
const feature = await this.featureStateManager.loadFeature(this.projectPath, featureId);
const sanitizedFeatureId = featureId.replace(/[^a-zA-Z0-9_-]/g, '-');
const worktreePath = path.join(this.projectPath, '.worktrees', sanitizedFeatureId);
let workDir = this.projectPath;
try {
await secureFs.access(worktreePath);
workDir = worktreePath;
} catch {
// No worktree
// Use worktreeResolver to find worktree path (consistent with commitFeature)
const branchName = feature?.branchName;
if (branchName) {
const resolved = await this.worktreeResolver.findWorktreeForBranch(
this.projectPath,
branchName
);
if (resolved) {
try {
await secureFs.access(resolved);
workDir = resolved;
} catch {
// Fall back to project path
}
}
}
const verificationChecks = [