Skip to content

fix(ci): record complete native UI file timings - #134283

Merged
steipete merged 2 commits into
mainfrom
codex/ci-ui-file-timings-20260831
Aug 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/ci-ui-file-timings-20260831

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

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.ts passes 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:refit and validate the resulting full inventory and matrix. Native exact-head CI remains required before landing.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 16:47
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:53 PM ET / 17:53 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 2 items remain

Keep 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
Reviewed head: daa1178cccd468bce77be25edf0c003934f447d9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused CI repair with meaningful production-boundary regression coverage and no supported correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The provided repository state identifies this as a MEMBER-authored CI-only PR, so the external-contributor proof gate does not apply. Its new integration test is nevertheless tied to the production Vitest wrapper and asserts after-fix reporter output before refitting it.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The provided repository state identifies this as a MEMBER-authored CI-only PR, so the external-contributor proof gate does not apply. Its new integration test is nevertheless tied to the production Vitest wrapper and asserts after-fix reporter output before refitting it.
Evidence reviewed 7 items Introduced measurement boundary: The parser now stages only successful native file rows, deduplicates them per invocation, and records them only after the invocation Duration summary; this preserves the existing two-distinct-run requirement in the enclosing refit flow.
Caller and CI entrypoint: The refit command fetches logs only from successful main-push UI jobs, then passes them to the refitter; the CI workflow runs the UI E2E config for both sharded and real-Gateway UI commands.
Regression coverage: The new integration fixture invokes the production Vitest wrapper twice with the configured reporters, verifies verbose case progress and hook-inclusive file rows, and feeds the resulting stdout into the refitter. A focused synthetic case also excludes failed, skipped, timed-out, and unfinished rows.
Findings None None.
Security None None.

How this fits together

UI 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]
Loading

Before merge

  • Resolve merge risk (P1) - The automated timing path depends on Vitest 4.1.11’s exact completed-file output. This reviewer could not independently read that upstream source because the checkout has no installed dependencies and GitHub was unreachable; pending exact-head CI and the branch’s real-process fixture are the available confirmation.
  • Complete next step (P2) - The prior actionable finding is resolved; this PR needs normal exact-head CI completion rather than an automated repair job.
Agent review details

Security

None.

PR surface

Tests +85, Other +6. Total +91 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 86 1 +85
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 13 7 +6
Total 4 99 8 +91

Review metrics

Metric Value Why it matters
Production versus test delta CI tooling +6 net; tests and test support +85 net The only production growth is bounded per-invocation staging needed to defer sample admission until a successful completed summary; the remainder is regression and reporter-contract coverage.

Merge-risk options

Maintainer options:

  1. Confirm the exact-head CI run (recommended)
    Allow the pending exact-head CI to exercise the reporter and timing-refit path before merge.

Technical review

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The provided repository state identifies this as a MEMBER-authored CI-only PR, so the external-contributor proof gate does not apply. Its new integration test is nevertheless tied to the production Vitest wrapper and asserts after-fix reporter output before refitting it.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded CI timing and shard-planning repair with limited user-facing blast radius.
  • merge-risk: 🚨 automation: Changing the Vitest reporter/parser contract can alter future CI timing refits and UI workload partitioning.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The provided repository state identifies this as a MEMBER-authored CI-only PR, so the external-contributor proof gate does not apply. Its new integration test is nevertheless tied to the production Vitest wrapper and asserts after-fix reporter output before refitting it.

Evidence

What I checked:

  • Introduced measurement boundary: The parser now stages only successful native file rows, deduplicates them per invocation, and records them only after the invocation Duration summary; this preserves the existing two-distinct-run requirement in the enclosing refit flow. (scripts/lib/ci-test-timings-refit.mts:31, daa1178cccd4)
  • Caller and CI entrypoint: The refit command fetches logs only from successful main-push UI jobs, then passes them to the refitter; the CI workflow runs the UI E2E config for both sharded and real-Gateway UI commands. (scripts/ci-refit-test-timings.mts:120, daa1178cccd4)
  • Regression coverage: The new integration fixture invokes the production Vitest wrapper twice with the configured reporters, verifies verbose case progress and hook-inclusive file rows, and feeds the resulting stdout into the refitter. A focused synthetic case also excludes failed, skipped, timed-out, and unfinished rows. (test/scripts/ci-test-timings.test.ts:73, daa1178cccd4)
  • Earlier finding addressed: The follow-up commit adds the UI-E2E-only default-reporter exception while retaining the explicit CLI reporter-replacement assertion, resolving the prior ClawSweeper P2. (test/vitest-reporters-config.test.ts:104, daa1178cccd4)
  • Current-main necessity check: Fetched current main still immediately records the verbose file-row pattern and has neither the added default reporter nor its reporter-contract exception; the PR head is not an ancestor of fetched main. (scripts/lib/ci-test-timings-refit.mts:31, 6fc1c2d7832d)
  • Dependency boundary and remaining inspection gap: The branch directly relies on Vitest reporter behavior; the repository pins and patches Vitest 4.1.11, but this node_modules-free checkout and unavailable GitHub API connection prevented independent upstream reporter-source inspection. The patch itself does not modify reporter code. (pnpm-workspace.yaml:93, daa1178cccd4)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let exact-head CI complete to confirm the runtime reporter output in the repository’s pinned environment.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-31T16:53:59.394Z sha eb857eb :: found issues before merge. :: [P2] Update the reporter contract for UI E2E

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

The final head daa1178cccd468bce77be25edf0c003934f447d9 passes CI 33421564208, its aggregate gate, and Workflow Sanity 33421564687. Native prepare-run independently verified the hosted CI and applicable Testbox gates and retained that exact head. One child-check projection lagged the completed workflow; no check or required gate was bypassed.

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.

@steipete
steipete merged commit 268833f into main Aug 31, 2026
177 checks passed
@steipete
steipete deleted the codex/ci-ui-file-timings-20260831 branch August 31, 2026 18:13
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
* fix(ci): record complete native UI file timings

* test(ci): recognize UI file timing reporter contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant