fix(FN-4811): repair step-session registry wiring recursion

Fusion-Task-Id: FN-4811
Fusion-Task-Lineage: f3dac123-cb46-4d31-8a7e-dfc664bfdc5f
This commit is contained in:
Fusion (runfusion.ai)
2026-05-16 16:41:53 -07:00
committed by gsxdsm
parent 69d7b282cf
commit 7a438f63ee

View File

@@ -630,7 +630,7 @@ export class StepSessionExecutor {
private maxParallel: number; private maxParallel: number;
private registerActiveStepSession(stepIndex: number, handle: SessionHandle, worktreePath: string): void { private registerActiveStepSession(stepIndex: number, handle: SessionHandle, worktreePath: string): void {
this.registerActiveStepSession(stepIndex, handle, worktreePath); this.activeSessions.set(stepIndex, handle);
activeSessionRegistry.registerPath(worktreePath, { activeSessionRegistry.registerPath(worktreePath, {
taskId: this.options.taskDetail.id, taskId: this.options.taskDetail.id,
kind: "step-session", kind: "step-session",
@@ -639,12 +639,12 @@ export class StepSessionExecutor {
} }
private unregisterActiveStepSession(stepIndex: number, worktreePath: string): void { private unregisterActiveStepSession(stepIndex: number, worktreePath: string): void {
this.unregisterActiveStepSession(stepIndex, worktreePath); this.activeSessions.delete(stepIndex);
activeSessionRegistry.unregisterPath(worktreePath); activeSessionRegistry.unregisterPath(worktreePath);
} }
private registerParallelWorktree(stepIndex: number, worktreePath: string): void { private registerParallelWorktree(stepIndex: number, worktreePath: string): void {
this.registerParallelWorktree(stepIndex, worktreePath); this.parallelWorktrees.set(stepIndex, worktreePath);
activeSessionRegistry.registerPath(worktreePath, { activeSessionRegistry.registerPath(worktreePath, {
taskId: this.options.taskDetail.id, taskId: this.options.taskDetail.id,
kind: "step-session-parallel", kind: "step-session-parallel",