fix(FN-4308): tighten done-task aggregation typings

Fusion-Task-Id: FN-4308
Fusion-Task-Lineage: d0a46a8f-2245-4ddc-99b4-06d78e87db16
This commit is contained in:
Fusion
2026-05-13 09:23:18 -07:00
committed by gsxdsm
parent 1e8526bef7
commit e9b4a66ba8

View File

@@ -73,7 +73,17 @@ async function isReachableFromHead(sha: string, rootDir: string): Promise<boolea
}
}
async function collectDoneTaskFiles(task: any, scopedStore: ProjectContext["store"]): Promise<{
type DoneTaskAggregationTask = {
lineageId?: string | null;
mergeDetails?: { commitSha?: string } | null;
};
type DoneTaskAggregationStore = {
getRootDir: () => string;
getTaskCommitAssociationsByLineageId: (lineageId: string) => Promise<Array<{ commitSha: string; authoredAt?: string | null }>>;
};
async function collectDoneTaskFiles(task: DoneTaskAggregationTask, scopedStore: DoneTaskAggregationStore): Promise<{
files: AggregatedDoneTaskFile[];
stats: { filesChanged: number; additions: number; deletions: number };
usedAggregation: boolean;