Skip to content

perf(ci): instrument build artifacts phases - add timing - #87514

Merged
RomneyDa merged 1 commit into
mainfrom
codex/perf-build-artifacts
May 28, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
codex/perf-build-artifacts

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

Adds lightweight phase timing instrumentation to scripts/build-all.mjs so pnpm build:ci-artifacts reports each build phase duration and a slowest-first summary in CI logs. Also removes the now-duplicate Build Control UI workflow step because the ciArtifacts build profile already runs ui:build.

This is instrumentation only; build optimization is intentionally deferred until CI timing data identifies the actual bottleneck.

Related Work

Verification

  • pnpm exec oxfmt --check scripts/build-all.mjs test/scripts/build-all.test.ts test/scripts/ci-workflow-guards.test.ts .github/workflows/ci.yml
  • pnpm exec oxlint scripts/build-all.mjs test/scripts/build-all.test.ts test/scripts/ci-workflow-guards.test.ts
  • Direct Node probe for build profile order, timing summary formatting, and workflow duplicate removal
  • .agents/skills/autoreview/scripts/autoreview --mode local

Focused Vitest note: node scripts/run-vitest.mjs ... was attempted against test/scripts/build-all.test.ts and test/scripts/ci-workflow-guards.test.ts, but the local Vitest process hung without output twice in this Codex worktree. I stopped those local processes and used the direct probe plus formatter/lint/autoreview proof above.

Real behavior proof

Behavior addressed: build-artifacts CI logs did not show which build:ci-artifacts phase was slow, and CI still ran a separate pnpm ui:build after build:ci-artifacts even though the profile already includes ui:build.

Real environment tested: Local Codex worktree on macOS, Node via repo wrappers, branch codex/perf-build-artifacts at commit 0963393da8.

Exact steps or command run after this patch: Ran the formatter, oxlint, a direct Node probe that imports scripts/build-all.mjs and parses .github/workflows/ci.yml, and autoreview on the local diff.

Evidence after fix: The direct probe verified that ciArtifacts still includes ui:build before write-build-info, timing summary output sorts slowest phases first, and the build-artifacts workflow no longer contains the duplicate Build Control UI / pnpm ui:build step.

Observed result after fix: build-all now prints per-phase elapsed time and a compact final timing summary, while the CI workflow relies on pnpm build:ci-artifacts for Control UI artifacts without a second UI build.

What was not tested: A full GitHub Actions build-artifacts run was not triggered from this branch. Local focused Vitest did not complete due to the hung local runner described above.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 1:30 AM ET / 05:30 UTC.

Summary
The branch adds build-all timing output, tests duration/summary formatting and the CI workflow invariant, and removes the extra Control UI build step from build-artifacts CI.

PR surface: Tests +33, Config -3, Other +47. Total +77 across 4 files.

Reproducibility: not applicable. This PR is CI/build tooling instrumentation rather than a bug report. Source inspection confirms the cleanup premise: current ciArtifacts already runs ui:build while the workflow still runs a duplicate step.

Review metrics: 1 noteworthy metric.

  • CI workflow step removal: 1 redundant step removed. Artifact CI now relies on the ciArtifacts build profile for Control UI assets instead of invoking pnpm ui:build a second time.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Wait for the build-artifacts run on head 9cb41922d7b1607322ff171ffe596b13ea0e91d4 to complete successfully before merge.

Risk before merge

  • [P1] The PR edits artifact-building CI and the relevant build-artifacts run was still in progress during inspection, so maintainers should wait for that run or an equivalent rerun before landing.

Maintainer options:

  1. Decide the mitigation before merge
    Land the timing instrumentation and duplicate-step removal only after the current build-artifacts CI path finishes cleanly on the reviewed head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is indicated; the remaining action is normal maintainer review after the relevant artifact CI run completes.

Security
Cleared: The patch removes a workflow step and adds local timing instrumentation without new actions, permissions, dependencies, downloads, secrets handling, or package-resolution changes.

Review details

Best possible solution:

Land the timing instrumentation and duplicate-step removal only after the current build-artifacts CI path finishes cleanly on the reviewed head.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this PR is CI/build tooling instrumentation rather than a bug report. Source inspection confirms the cleanup premise: current ciArtifacts already runs ui:build while the workflow still runs a duplicate step.

Is this the best way to solve the issue?

Yes, pending completed CI; timing the existing build-all loop and deleting the duplicate workflow step is a narrow maintainable solution. I did not find a line-level defect in the patch.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 44027e72d07e.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is low-risk CI/build-log instrumentation and cleanup rather than a user-facing runtime regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-change live-output proof from formatter, lint, a direct Node probe, and autoreview; no contributor action is needed for proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-change live-output proof from formatter, lint, a direct Node probe, and autoreview; no contributor action is needed for proof.
Evidence reviewed

PR surface:

Tests +33, Config -3, Other +47. Total +77 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 39 6 +33
Docs 0 0 0 0
Config 1 0 3 -3
Generated 0 0 0 0
Other 1 50 3 +47
Total 4 89 12 +77

Acceptance criteria:

  • [P1] Wait for GitHub Actions build-artifacts on head 9cb4192 to complete successfully.
  • [P1] If rerunning locally, use repo wrappers such as node scripts/run-vitest.mjs test/scripts/build-all.test.ts test/scripts/ci-workflow-guards.test.ts for focused tests.

What I checked:

  • Current build profile already owns Control UI artifacts: Current main's ciArtifacts profile includes ui:build before write-build-info, so the workflow-step removal relies on an existing build profile contract. (scripts/build-all.mjs:117, 44027e72d07e)
  • Current workflow still duplicates the UI build: Current main runs pnpm build:ci-artifacts and then a separate Build Control UI / pnpm ui:build step in the build-artifacts job, which is the duplicate step this PR removes. (.github/workflows/ci.yml:488, 44027e72d07e)
  • Patch adds timing around the existing build loop: The PR imports node:perf_hooks, adds duration/summary formatters, records ran/cached/failed timings, and preserves a nonzero exit after printing the summary. (scripts/build-all.mjs:399, 9cb41922d7b1)
  • Patch covers the workflow invariant: The PR adds unit coverage for duration formatting and a YAML-parsed workflow guard that rejects a duplicate Build Control UI step or direct pnpm ui:build run in build-artifacts CI. (test/scripts/ci-workflow-guards.test.ts:37, 9cb41922d7b1)
  • Live PR metadata and CI state: Live GitHub API metadata shows the PR is open, authored by a MEMBER, labeled maintainer and proof: sufficient, with no review comments; check-runs for head 9cb41922d7b1607322ff171ffe596b13ea0e91d4 had relevant successes including check-test-types, while build-artifacts and several broad checks were still in progress during inspection. (9cb41922d7b1)
  • Related implementation provenance: Merged fix(scripts): include ui:build in build-all full and ciArtifacts profiles #86010 added ui:build to the full and ciArtifacts profiles and left it uncached; this current-main behavior is the dependency for this PR's workflow-step removal. (scripts/build-all.mjs:89, 6704d0ab2714)

Likely related people:

  • 1052326311: Merged fix(scripts): include ui:build in build-all full and ciArtifacts profiles #86010 added ui:build to the full and ciArtifacts profiles, which this PR now relies on to remove the duplicate workflow step. (role: introduced current build profile behavior; confidence: high; commits: 6704d0ab2714; files: scripts/build-all.mjs, test/scripts/build-all.test.ts)
  • steipete: Recent GitHub commit history for scripts/build-all.mjs and .github/workflows/ci.yml shows repeated build and CI workflow work, and the current ui:build profile merge lists Peter Steinberger as a co-author. (role: recent CI/build tooling contributor; confidence: high; commits: 6704d0ab2714, bb46b79d3c14, 8d990378a6fc; files: scripts/build-all.mjs, .github/workflows/ci.yml)
  • vincentkoc: Recent .github/workflows/ci.yml history includes build-artifacts and checkout hardening changes near the same CI surface. (role: adjacent CI workflow contributor; confidence: medium; commits: f1c2be7d3212, c867ecb1361e; files: .github/workflows/ci.yml)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@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. labels May 28, 2026
@RomneyDa RomneyDa changed the title perf(ci): instrument build artifacts phases perf(ci): instrument build artifacts phases - add timing May 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: ✨ hatched 🥚 common Pearl Test Hopper. Rarity: 🥚 common. Trait: polishes edge cases.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Pearl Test Hopper in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@RomneyDa
RomneyDa force-pushed the codex/perf-build-artifacts branch from 0963393 to 9cb4192 Compare May 28, 2026 05:26
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels May 28, 2026
@RomneyDa
RomneyDa merged commit 53704b2 into main May 28, 2026
95 of 97 checks passed
@RomneyDa
RomneyDa deleted the codex/perf-build-artifacts branch May 28, 2026 05:31
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 29, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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