Skip to content

[Jamie] Stop Consolidated Report runs from appearing in the Legal Benchmarks Runs tab (complete fix) - #5209

Merged
pitoi merged 1 commit into
masterfrom
swarm/swarm-change-2eb47ea2
Aug 31, 2026
Merged

[Jamie] Stop Consolidated Report runs from appearing in the Legal Benchmarks Runs tab (complete fix)#5209
pitoi merged 1 commit into
masterfrom
swarm/swarm-change-2eb47ea2

Conversation

@pitoi

@pitoi pitoi commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Problem

The Legal Benchmarks "Runs" tab for a task shows LEGAL_BENCHMARK_CONSOLIDATED runs (cross-run Consolidated Report comparisons, a separate Stakwork workflow/ID) mixed in with the task's actual LEGAL_BENCHMARK_RUNNER runs (workflow 57179).

Root cause

src/hooks/useLegalBenchmarkRunList.ts tags fetched Consolidated Report rows with the same "recursion" runType used for genuine eval/recursion rows. A code comment claims this tag keeps them "invisible" in the Runs tab table, but src/components/legal/BenchmarkRunsHistory.tsx's secondaryRows filter is a deny-list (runType !== "manual") that does not actually exclude "recursion"-tagged rows — so Consolidated rows render there.

Fix (single, complete change — supersedes two abandoned prior attempts, PR #5204 and #5206, which split this across mismatched branches)

  1. src/hooks/useLegalBenchmarkRunList.ts: add a new "consolidated" value to the BenchmarkRunType union; tag rawConsolidatedRows with "consolidated" instead of "recursion" when merging. Keep fetching/merging them (still needed for the Recursion tab's Pusher-driven live status after a page refresh).
  2. src/components/legal/RecursionBox.tsx: update existingConsolidated's filter to match the new runType === "consolidated" tag (instead of "recursion"), so the Recursion tab's own in-flight-consolidated-run lookup keeps working correctly with the renamed tag.
  3. src/components/legal/BenchmarkRunsHistory.tsx: change secondaryRows's filter from a deny-list (runType !== "manual") to an explicit allow-list (runType === "recursion"), so only genuine eval/recursion rows land in the table; the new "consolidated" tag is excluded by construction.
  4. src/__tests__/unit/components/RecursionBox.test.tsx: update the makeConsolidatedRow test fixture's runType field from "recursion" to "consolidated" to match the renamed tag, so the existing "detects a PENDING in-flight consolidated run via the allRuns prop" test continues to pass against the new logic.

Scope

Client-side/UI + test-fixture only — no API route, Prisma schema, or dispatch/webhook changes. All four edits land together in this one PR/branch, avoiding the split-branch mismatch that broke the two earlier attempts.

…chmarks Runs tab (complete fix)

## Problem
The Legal Benchmarks "Runs" tab for a task shows `LEGAL_BENCHMARK_CONSOLIDATED` runs (cross-run Consolidated Report comparisons, a separate Stakwork workflow/ID) mixed in with the task's actual `LEGAL_BENCHMARK_RUNNER` runs (workflow 57179).

## Root cause
`src/hooks/useLegalBenchmarkRunList.ts` tags fetched Consolidated Report rows with the same `"recursion"` `runType` used for genuine eval/recursion rows. A code comment claims this tag keeps them "invisible" in the Runs tab table, but `src/components/legal/BenchmarkRunsHistory.tsx`'s `secondaryRows` filter is a deny-list (`runType !== "manual"`) that does not actually exclude `"recursion"`-tagged rows — so Consolidated rows render there.

## Fix (single, complete change — supersedes two abandoned prior attempts, PR #5204 and #5206, which split this across mismatched branches)
1. `src/hooks/useLegalBenchmarkRunList.ts`: add a new `"consolidated"` value to the `BenchmarkRunType` union; tag `rawConsolidatedRows` with `"consolidated"` instead of `"recursion"` when merging. Keep fetching/merging them (still needed for the Recursion tab's Pusher-driven live status after a page refresh).
2. `src/components/legal/RecursionBox.tsx`: update `existingConsolidated`'s filter to match the new `runType === "consolidated"` tag (instead of `"recursion"`), so the Recursion tab's own in-flight-consolidated-run lookup keeps working correctly with the renamed tag.
3. `src/components/legal/BenchmarkRunsHistory.tsx`: change `secondaryRows`'s filter from a deny-list (`runType !== "manual"`) to an explicit allow-list (`runType === "recursion"`), so only genuine eval/recursion rows land in the table; the new `"consolidated"` tag is excluded by construction.
4. `src/__tests__/unit/components/RecursionBox.test.tsx`: update the `makeConsolidatedRow` test fixture's `runType` field from `"recursion"` to `"consolidated"` to match the renamed tag, so the existing "detects a PENDING in-flight consolidated run via the allRuns prop" test continues to pass against the new logic.

## Scope
Client-side/UI + test-fixture only — no API route, Prisma schema, or dispatch/webhook changes. All four edits land together in this one PR/branch, avoiding the split-branch mismatch that broke the two earlier attempts.
@pitoi pitoi added the jamie Automated PR opened by Jamie label Aug 31, 2026 — with Hive Chat PM
@pitoi
pitoi merged commit b12e49b into master Aug 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jamie Automated PR opened by Jamie

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant