diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md index 86132507b..43475b301 100644 --- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md +++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md @@ -264,6 +264,10 @@ That same scoped count model must drive conditional findings filters too. The logic that returns the operator to `Active` when a bucket disappears must all read from the same snapshot-aware count source rather than mixing snapshot-scoped pills with global queue truth. +That same fail-closed snapshot rule applies to inline run-history findings as +well. Expanded run cards may render inline findings only when the run carries +an explicit `finding_ids` snapshot; legacy runs without snapshot ids must stay +unknown rather than being coerced into an empty findings snapshot. That same findings surface should keep its section chrome functional rather than promotional. Inside the Patrol findings tab, the selected tab already names the surface, so the findings card should not add another in-card product diff --git a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx index 28ba5bfb2..844272260 100644 --- a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx +++ b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx @@ -433,7 +433,7 @@ export function RunHistoryEntry(props: RunHistoryEntryProps) {
{ }); }); + it('fails closed for legacy runs without snapshot finding ids', () => { + render(() => ( + + )); + + expect(screen.queryByTestId('findings-panel')).not.toBeInTheDocument(); + expect(findingsPanelState.latestProps).toBeNull(); + }); + it('uses a shared coverage summary when a scoped run checked fewer resources than its scope', () => { render(() => ( { (element.textContent?.includes('Patrol completed with issues requiring review.') ?? false), ), + ).toBeInTheDocument(); + }); it('keeps zero-coverage scoped runs on the shared coverage narrative', () => { render(() => ( @@ -176,8 +197,11 @@ describe('RunHistoryEntry', () => { element?.tagName === 'P' && (element.textContent?.includes('Checked 0 of 2 scoped resources') ?? false) && (element.textContent?.includes('453ms') ?? false) && - (element.textContent?.includes('Patrol completed with issues requiring review.') ?? false), + (element.textContent?.includes('Patrol completed with issues requiring review.') ?? + false), + ), ).toBeInTheDocument(); + expect(screen.queryByText(/^Patrol completed in 453ms/)).not.toBeInTheDocument(); }); it('does not claim all clear when the run still had existing issues', () => {