Repository navigation
fix(ci): record complete native UI file timings - #134283
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:53 PM ET / 17:53 UTC. ClawSweeper reviewWhat this changesThe branch adds Vitest’s default reporter to UI E2E runs and stages its completed file totals for the CI timing refit while retaining verbose progress output. Merge readinessKeep this PR open: the earlier reporter-contract finding is fixed, the timing repair is coherent, and fetched current main still has the old verbose-only parsing path. Exact-head CI remains the appropriate final automation check. Priority: P2 Review scores
Verification
How this fits togetherUI E2E CI jobs produce logs that the timing refit script converts into per-file duration weights. Those weights feed the sequencer that splits future UI test work across CI shards. flowchart LR
A[UI E2E CI job] --> B[Vitest reporters]
B --> C[Completed file rows]
C --> D[Timing refit parser]
D --> E[Per-file duration weights]
E --> F[UI shard sequencer]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +85, Other +6. Total +91 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge after exact-head CI confirms the reporter/parser contract; the small Map staging is the necessary owner-boundary change because samples must wait for a completed invocation summary before becoming timing data. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: current main’s parser only consumes verbose-style rows, while the new fixture exercises the configured reporter process and passes its stdout to the same refitter. No local execution was performed because this is a read-only, dependency-free review checkout. Is this the best way to solve the issue? Yes: adding the existing default reporter only to UI E2E and staging its successful file totals at the existing timing owner avoids a custom reporter or new CI mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6fc1c2d7832d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
The final head ClawSweeper's reporter-contract finding and rank-up move are addressed. All 86 timing/reporter/config cases pass, including two real Vitest subprocesses that prove hook-inclusive file totals, verbose progress, deduplication, and explicit CLI reporter replacement. Direct inspection of the installed Vitest 4.1.11 reporter and config source confirms the contract the reviewer could not inspect. The changed-file gate and independent Codex review pass. Timing weights remain unchanged; the follow-up refit will require two successful applicable main-push runs with the new producer. |
|
Merged via squash.
|
* fix(ci): record complete native UI file timings * test(ci): recognize UI file timing reporter contract
What Problem This Solves
The CI timing importer expects completed UI E2E file durations, but Vitest's verbose reporter emits only individual case durations. Successful runs therefore contribute no UI file measurements, leaving the shard planner with stale costs. A retained 354-second UI step was modeled at about 177 seconds before overhead.
Why This Change Was Made
Keep verbose case progress for the output watchdog and add Vitest's existing default reporter to emit whole-file durations, including suite hooks. Stage and deduplicate passed file rows until their invocation summary appears. Failed, wholly skipped, timed-out and unfinished files do not become timing weights.
The successful-main-push provenance checks, distinct-run minimum, outlier rejection, 15% write threshold, pruning policy and canonical sequencer remain intact. No custom reporter, job, dependency, concurrency limit or timing weight is introduced.
User Impact
Future successful main runs provide the measurements needed to balance UI E2E work. Case progress remains visible. This change enables a trustworthy refit; it does not itself claim a shorter CI duration or the five-minute target.
Evidence
node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts test/vitest-reporters-config.test.ts test/scripts/ci-test-timings.test.ts test/vitest-ui-e2e-config.test.tspasses all 86 tests. Both new regressions fail before the repair. The real reporter fixture executes two independent runs and verifies that file totals include before/after hooks, that verbose case progress remains, and that duplicate summaries do not supply duplicate samples. ANSI/plain labels and skipped/todo counts are covered.All changed-gate stages pass, including complete scripts/root-test type graphs and script lint. An initial lint failure required braces around the new loop; the corrected scripts lint passes. Independent Codex review is clean. Direct Vitest 4.1.11 source inspection confirms that VerboseReporter suppresses file totals and that the default reporter uses the module's duration.
The isolated partition replay preserves all 334 discovered UI files exactly once, with identical ordered shards: 13 UI shards plus one browser-extension row for GitHub/hybrid, and three plus one for Blacksmith. Existing max-parallel values remain 14/4. The three source files on the integration base are byte-identical to the proof baseline.
ClawSweeper follow-through: the existing reporter contract now expects the extra default reporter only for UI E2E. Both GitHub Actions modes fail before this expectation repair and pass after it. All eight configurations still preserve explicit CLI reporter replacement, custom options, deduplication and the injected PTY environment. The complete changed-file gate and scoped Codex review pass after this correction.
Tooling production +13/-7 (net +6); test configuration +2/-0; regression tests +84/-1 (net +83). The small growth adds bounded per-invocation staging at the existing measurement owner. No model/runtime or product behavior changes.
No weights were regenerated from historical case sums or PR runs. After at least two successful applicable main runs include this producer, run
pnpm ci:timings:refitand validate the resulting full inventory and matrix. Native exact-head CI remains required before landing.