feat(FN-3932): add orphaned finalize-reset autostash safeguard in merger
The merger gains a safeguard that automatically stashes work when a finalize-reset leaves orphaned records, preventing merge-state corruption. Core exports the new orphan record type, project-engine wires the safeguard, and documentation traces the provenance flow; tests were added for the recovery Fusion-Task-Id: FN-3932
This commit is contained in:
@@ -51,6 +51,9 @@ describe("stash recovery routes", () => {
|
||||
createdAt: null,
|
||||
changedPaths: ["file.txt"],
|
||||
classification: "live",
|
||||
sourcePhase: "finalize-reset",
|
||||
detectedByTaskId: "FN-1234",
|
||||
detectedAt: "2026-05-10T00:00:00.000Z",
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -58,6 +61,7 @@ describe("stash recovery routes", () => {
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body.count).toBe(1);
|
||||
expect(res.body.records[0].sha).toBe("abcdef1");
|
||||
expect(res.body.records[0].sourcePhase).toBe("finalize-reset");
|
||||
});
|
||||
|
||||
it("returns diff + truncated flag", async () => {
|
||||
|
||||
Reference in New Issue
Block a user