feat(FN-4887): complete Step 2-3 — add foreign-only recovery sweep and shared handler
Fusion-Task-Id: FN-4887 Fusion-Task-Lineage: 559690d8-cea6-4323-a522-9ebb6aa25731
This commit is contained in:
committed by
gsxdsm
parent
91df093502
commit
b5ed3d0c9c
@@ -57,6 +57,29 @@ describe("reliability interaction: contamination auto-recovery precedence", () =
|
||||
expect(issueRetry).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it("foreign-only no-own-work routes to retry, not pause", async () => {
|
||||
const issueRetry = vi.fn(async () => {});
|
||||
const dispatcher = new AutoRecoveryDispatcher({
|
||||
taskStore: {} as never,
|
||||
auditEmitter: { database: vi.fn(async () => {}), git: vi.fn(), filesystem: vi.fn(), sandbox: vi.fn() },
|
||||
handlers: { issueRetry },
|
||||
});
|
||||
|
||||
const decision = await dispatcher.dispatch({
|
||||
class: "branch-cross-contamination",
|
||||
taskId: "FN-1",
|
||||
pausedReason: "branch-cross-contamination",
|
||||
evidence: { ownCommits: 0, foreignAttributedCommits: 3, recoveryKind: "foreign-only" },
|
||||
}, {
|
||||
task: baseTask,
|
||||
retryCount: 0,
|
||||
settings: { mode: "programmatic", maxRetries: 2 },
|
||||
});
|
||||
|
||||
expect(decision.action).toBe("retry");
|
||||
expect(issueRetry).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it("mode off and destructive ambiguity preserve pause", () => {
|
||||
const dispatcher = new AutoRecoveryDispatcher({
|
||||
taskStore: {} as never,
|
||||
|
||||
Reference in New Issue
Block a user