fix: resolve integration issues after phase branch merges
- Register errandProcedures in appRouter (was defined but never spread) - Fix nullable projectId guard in errand delete/abandon procedures - Add sendUserMessage stub to MockAgentManager in headquarters and radar-procedures tests (AgentManager interface gained this method) - Add missing qualityReview field to Initiative fixture in file-io test (schema gained this column from the quality-review phase) - Cast conflictFiles access in CLI errand resolve command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -350,12 +350,14 @@ export function errandProcedures(publicProcedure: ProcedureBuilder) {
|
||||
}
|
||||
|
||||
// Remove worktree and branch (best-effort)
|
||||
const project = await requireProjectRepository(ctx).findById(errand.projectId);
|
||||
if (project) {
|
||||
const clonePath = await resolveClonePath(project, ctx);
|
||||
const worktreeManager = new SimpleGitWorktreeManager(clonePath);
|
||||
try { await worktreeManager.remove(errand.id); } catch { /* no-op if already gone */ }
|
||||
try { await requireBranchManager(ctx).deleteBranch(clonePath, errand.branch); } catch { /* no-op */ }
|
||||
if (errand.projectId) {
|
||||
const project = await requireProjectRepository(ctx).findById(errand.projectId);
|
||||
if (project) {
|
||||
const clonePath = await resolveClonePath(project, ctx);
|
||||
const worktreeManager = new SimpleGitWorktreeManager(clonePath);
|
||||
try { await worktreeManager.remove(errand.id); } catch { /* no-op if already gone */ }
|
||||
try { await requireBranchManager(ctx).deleteBranch(clonePath, errand.branch); } catch { /* no-op */ }
|
||||
}
|
||||
}
|
||||
|
||||
await repo.delete(errand.id);
|
||||
@@ -426,12 +428,14 @@ export function errandProcedures(publicProcedure: ProcedureBuilder) {
|
||||
}
|
||||
|
||||
// Remove worktree and branch (best-effort)
|
||||
const project = await requireProjectRepository(ctx).findById(errand.projectId);
|
||||
if (project) {
|
||||
const clonePath = await resolveClonePath(project, ctx);
|
||||
const worktreeManager = new SimpleGitWorktreeManager(clonePath);
|
||||
try { await worktreeManager.remove(errand.id); } catch { /* no-op if already gone */ }
|
||||
try { await branchManager.deleteBranch(clonePath, errand.branch); } catch { /* no-op */ }
|
||||
if (errand.projectId) {
|
||||
const project = await requireProjectRepository(ctx).findById(errand.projectId);
|
||||
if (project) {
|
||||
const clonePath = await resolveClonePath(project, ctx);
|
||||
const worktreeManager = new SimpleGitWorktreeManager(clonePath);
|
||||
try { await worktreeManager.remove(errand.id); } catch { /* no-op if already gone */ }
|
||||
try { await branchManager.deleteBranch(clonePath, errand.branch); } catch { /* no-op */ }
|
||||
}
|
||||
}
|
||||
|
||||
const updated = await repo.update(input.id, { status: 'abandoned' });
|
||||
|
||||
Reference in New Issue
Block a user