fix(FN-4976): preserve live self-owned session bindings during stale cleanup
Fusion-Task-Id: FN-4976 Fusion-Task-Lineage: b7d6e778-f6b1-4529-b04b-81352a11ddad
This commit is contained in:
committed by
gsxdsm
parent
f6ec25b5fa
commit
665173d300
@@ -14,7 +14,7 @@ describe("FN-4973: executor worktree conflict cleanup", () => {
|
||||
activeSessionRegistry.clear();
|
||||
});
|
||||
|
||||
it("reconciles stale self-owned registry entry before removal", async () => {
|
||||
it("clears stale self-owned registry entry before removal", async () => {
|
||||
const store = createMockStore();
|
||||
const executor = new TaskExecutor(store, "/tmp/test");
|
||||
store.listTasks.mockResolvedValue([]);
|
||||
@@ -28,7 +28,7 @@ describe("FN-4973: executor worktree conflict cleanup", () => {
|
||||
expect(activeSessionRegistry.lookupByPath(CONFLICT_PATH)).toBeNull();
|
||||
expect(store.logEntry).toHaveBeenCalledWith(
|
||||
"FN-4973",
|
||||
"Reconciled stale self-owned active-session registration",
|
||||
"Cleared stale self-owned activeSessionRegistry entry",
|
||||
CONFLICT_PATH,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -8881,7 +8881,7 @@ Backward compat fallback: if JSON is unavailable, you may still begin output wit
|
||||
taskId: string,
|
||||
): Promise<boolean> {
|
||||
const activeSessionRecord = activeSessionRegistry.lookupByPath(worktreePath);
|
||||
if (activeSessionRecord?.taskId === taskId) {
|
||||
if (activeSessionRecord?.taskId === taskId && !this.hasActiveWorktreeBinding(taskId, worktreePath)) {
|
||||
executorLog.warn(
|
||||
`[FN-4976] ${taskId}: clearing stale self-owned activeSessionRegistry entry before cleanup for ${worktreePath}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user