Skip to content

[Jamie] Stop Consolidated Report runs from appearing in the Legal Benchmarks Runs tab - #5204

Open
pitoi wants to merge 2 commits into
masterfrom
swarm/swarm-change-dd464ee9
Open

[Jamie] Stop Consolidated Report runs from appearing in the Legal Benchmarks Runs tab#5204
pitoi wants to merge 2 commits into
masterfrom
swarm/swarm-change-dd464ee9

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) 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 recursion/eval 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 them — so they render.

Fix

  • Tag Consolidated Report rows with a new, distinct "consolidated" runType instead of reusing "recursion".
  • Keep fetching/merging them (still needed so the Recursion tab gets live Pusher updates for in-flight/completed consolidated-report generation after a page refresh).
  • Change BenchmarkRunsHistory.tsx's secondaryRows filter from a deny-list to an explicit allow-list (runType === "recursion"), so only genuine eval/recursion rows land in the table's secondary rows, and the new "consolidated" tag is excluded by construction.

Scope

Client-side/UI only — no API route, Prisma schema, or dispatch/webhook changes.

…chmarks Runs tab

## Problem
The Legal Benchmarks "Runs" tab for a task shows `LEGAL_BENCHMARK_CONSOLIDATED` runs (cross-run Consolidated Report comparisons, a separate Stakwork workflow) 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 recursion/eval 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 them — so they render.

## Fix
- Tag Consolidated Report rows with a new, distinct `"consolidated"` runType instead of reusing `"recursion"`.
- Keep fetching/merging them (still needed so the Recursion tab gets live Pusher updates for in-flight/completed consolidated-report generation after a page refresh).
- Change `BenchmarkRunsHistory.tsx`'s `secondaryRows` filter from a deny-list to an explicit allow-list (`runType === "recursion"`), so only genuine eval/recursion rows land in the table's secondary rows, and the new `"consolidated"` tag is excluded by construction.

## Scope
Client-side/UI only — no API route, Prisma schema, or dispatch/webhook changes.
pitoi added a commit that referenced this pull request Aug 31, 2026
…chmarks Runs tab (complete fix) (#5209)

## 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.
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.

2 participants