Fix null path confirmation rows

This commit is contained in:
Jeppe B
2026-06-01 19:53:40 +02:00
parent bb98df9e73
commit 8e528f3eae
2 changed files with 26 additions and 1 deletions
@@ -1265,6 +1265,29 @@ it('marks projected path confirmations confirmed or stale by stable signatures',
->and($changed['summary']['confirmations']['stale'])->toBe(1);
});
it('treats null path confirmation rows as an empty confirmation set', function (): void {
$service = selfserve_studio_graph_without_constructor();
$method = new ReflectionMethod(selfserve_studio_graph::class, 'pathOutcomesPayload');
$payload = $method->invoke(
$service,
['department_id' => 6, 'lane_id' => 7],
[],
[],
[],
false,
null,
0,
0,
[],
[],
null
);
expect($payload['summary']['confirmations']['total'])->toBe(0)
->and($payload['confirmations']['removed'])->toBe([]);
});
it('truncates path outcome projection when the state cap is reached', function (): void {
$service = selfserve_studio_graph_without_constructor();
$simulate = function (array $overrides): array {