feat(FN-4518): complete Step 1 — add MergeDetails rebase base SHA

Fusion-Task-Id: FN-4518
Fusion-Task-Lineage: 48749dec-b2c9-484b-a13e-ffacc1fa9014
This commit is contained in:
Fusion
2026-05-14 16:41:00 -07:00
committed by gsxdsm
parent 9fe81424bd
commit 8b39b2df7f
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import type { MergeDetails } from "../types";
describe("MergeDetails", () => {
it("exposes optional rebaseBaseSha for rebase merge range attribution", () => {
const details: MergeDetails = {
commitSha: "abc123",
rebaseBaseSha: "def456",
};
expect(details.rebaseBaseSha).toBe("def456");
});
});

View File

@@ -1111,6 +1111,13 @@ export function buildResearchDocumentKey(runId: string): string {
export interface MergeDetails {
commitSha?: string;
/**
* When merger used rebase strategy (>=2 substantive commits), this is the
* parent SHA on the target branch before the cherry-pick chain. The canonical
* rebase display/audit range is `rebaseBaseSha..commitSha`.
* Unset for squash merges.
*/
rebaseBaseSha?: string;
filesChanged?: number;
insertions?: number;
deletions?: number;