Skip to content

fix(ci): stabilize Control UI startup gzip ratchet - #130688

Merged
vincentkoc merged 1 commit into
mainfrom
fix/ci-control-ui-gzip-variance
Aug 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/ci-control-ui-gzip-variance

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where unrelated pull requests could fail the Control UI startup gzip ratchet when identical source builds varied by a few dozen compressed bytes.

The observed hosted failure measured 343,463 B against a 343,442 B limit, while equivalent builds from the same source measured as low as 343,426 B. Same-head measurements varied by up to 38 B.

Why This Change Was Made

This keeps the existing 512 B product-growth allowance unchanged and adds a separately named 64 B build-variance allowance. The check now calculates and reports the committed baseline cap, growth limit, variance allowance, and final enforcement limit independently.

The baseline JSON, Control UI source, Vite configuration, workflows, and compression behavior are unchanged.

User Impact

Maintainers get a stable startup-size gate that still blocks meaningful product growth while tolerating the measured compression variance. There is no user-visible UI change.

AI-assisted: yes.

Evidence

  • node scripts/run-vitest.mjs test/scripts/control-ui-performance.test.ts: 17/17 passed
    • 512 B growth boundary passes
    • 512 B + 64 B enforcement boundary passes
    • one byte above the enforcement boundary fails
    • two same-source observations spanning 38 B both pass
    • report and result fields distinguish growth from build variance
  • pnpm ui:build: passed; startup JS measured 343,408 B, with growth limit 343,442 B and enforcement limit 343,506 B
  • Exact-head release gate: https://github.com/openclaw/openclaw/actions/runs/33041643291
    • attempt 1 exercised the adjusted gate successfully: startup JS measured 343,443 B against the new 343,506 B final enforcement limit
    • attempt 1 failed only the unrelated checks-ui-e2e (5/12) sidebar shard, with 91/92 tests passing; openclaw/ci-gate failed derivatively
    • one failed-job-only attempt 2 passed the sidebar shard and openclaw/ci-gate, with no new failures
    • the retry establishes accepted exact-head green for this PR; it does not prove the unrelated sidebar test is stable
    • the separate sidebar test remediation is tracked in fix(ui): wait for presented sidebar session before clearing draft #130747
  • node_modules/.bin/oxfmt --check scripts/check-control-ui-performance.mts test/scripts/control-ui-performance.test.ts: passed
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.scripts.json scripts/check-control-ui-performance.mts: passed
  • pnpm tsgo:scripts: passed
  • pnpm tsgo:test:root: passed
  • git diff --check: passed
  • privacy scan: passed
  • fresh structured autoreview: Claude fable-5/high, clean with no accepted or actionable findings; Sol/high was unavailable because the standalone Codex CLI is not installed in this lane

@vincentkoc vincentkoc self-assigned this Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 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 27, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 2:09 AM ET / 06:09 UTC.

ClawSweeper review

What this changes

The PR separates Control UI startup gzip growth tolerance from a 64-byte build-variance allowance and reports the resulting enforcement limit.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness finding. The previous rank-up move is satisfied: the 64 B variance allowance is separately reported, boundary-tested, and the supplied exact-head release gate exercised it; this member-authored draft remains for explicit maintainer acceptance of the intentional CI-threshold relaxation.

Priority: P3
Reviewed head: 4198eb8cf3407ffdff123f6fde4165c0d810d1c0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused boundary coverage, a canonical evaluator path, and exact-head gate evidence satisfy the prior rank-up move; only the intentional threshold policy awaits maintainer acceptance.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: Not applicable to the external-contributor proof gate: this is a member-authored internal CI change, and the supplied exact-head release-gate artifact directly exercises the adjusted boundary.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to the external-contributor proof gate: this is a member-authored internal CI change, and the supplied exact-head release-gate artifact directly exercises the adjusted boundary.
Evidence reviewed 7 items Changed enforcement owner: The PR centralizes startup gzip limit resolution, retains the 512 B growth tolerance, adds a distinct 64 B variance allowance, and enforces their sum only when a committed baseline exists.
Production caller: The UI build wrapper runs this validator immediately after the production Vite build, so the adjusted limit governs the intended CI boundary rather than a test-only path.
Boundary coverage: Tests retain the 512 B growth boundary, add pass/fail checks at the combined 576 B limit, exercise the recorded 38 B observation spread, and assert separate result fields.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/scripts/control-ui-performance.test.ts

Result: FAIL (failed) — step 1 expect_output Control UI performance budgets: expected terminal output was not visible within 30 seconds: "Control UI performance budgets"

[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-130688-327ELw/target

 ✓  tooling  test/scripts/control-ui-performance.test.ts (17 tests) 429ms
     ✓ updates the baseline from generated or explicitly measured metrics  410ms

 Test Files  1 passed (1)
      Tests  17 passed (17)
   Start at  06:10:30
   Duration  878ms (transform 229ms, setup 59ms, import 29ms, tests 429ms, environment 0ms)

[test] passed 1 Vitest shard in 7.66s

Assertions:

  • FAIL expect_output: Control UI performance budgets

How this fits together

The Control UI build produces compressed startup-asset metrics, then a repository script compares them with the committed baseline and budget before CI accepts the build. Its report and pass/fail result feed the UI build and release gate.

flowchart LR
  A[Control UI build] --> B[Compressed startup metrics]
  C[Committed baseline] --> D[Budget evaluator]
  E[Startup budget] --> D
  B --> D
  D --> F[Growth and variance limits]
  F --> G[Performance report]
  F --> H[Release gate]
Loading

Decision needed

Question Recommendation
Should this draft deliberately permit an additional 64 B of baseline-backed Control UI startup gzip to absorb observed compression variance? Accept the bounded variance allowance: Merge the explicit 64 B allowance because it preserves the existing 512 B growth budget, exposes both values in reports, and is exercised by exact-head CI.

Why: The code and evidence establish the bounded behavior, but accepting a looser release-gate threshold is an operator policy choice rather than a mechanical correctness question.

Before merge

  • Resolve merge risk (P1) - Merging intentionally raises the baseline-backed startup-gzip enforcement ceiling by 64 B; although the allowance is explicit and boundary-tested, maintainers must accept that CI will allow this measured build variance.
  • Resolve merge risk (P1) - Production code grows by 32 net lines. The shared resolver removes duplicated limit arithmetic, but the separately represented variance fact and report fields make a net-neutral implementation impractical.
Agent review details

Security

None.

PR surface

Tests +59, Other +32. Total +91 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 70 11 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 39 7 +32
Total 2 109 18 +91

Review metrics

Metric Value Why it matters
Production versus test delta production +39/−7 (net +32); tests +70/−11 (net +59) The production addition is limited to one canonical resolver, explicit reporting, and the named allowance; the larger test change verifies the new enforcement boundary.

Merge-risk options

Maintainer options:

  1. Accept the explicit CI variance budget (recommended)
    Keep the 64 B allowance separately reported and boundary-tested, then merge as the evidence-backed stabilization of the hosted gzip gate.
  2. Pause pending a stricter policy
    Leave the PR open if maintainers do not want the release gate to accept any additional startup gzip without more measurement data.

Technical review

Best possible solution:

Keep one canonical limit resolver, preserve separate growth-versus-variance reporting, and merge only after a maintainer explicitly accepts the narrowly bounded 64 B CI allowance.

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

Yes. The supplied exact-head hosted release-gate record observed the unstable boundary, and focused owner tests now reproduce the combined pass/fail enforcement limits.

Is this the best way to solve the issue?

Yes. A single resolver supplies both evaluation and report limits; an unnamed larger tolerance would blur product growth with build variance and reintroduce divergent calculations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9f266edd0f0a.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster. Replaced prior rating: 🐚 platinum hermit.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a small internal CI reliability adjustment with no user-visible runtime behavior change.
  • merge-risk: 🚨 automation: The patch directly changes the Control UI performance gate's startup-gzip pass/fail threshold.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster. Replaced prior rating: 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to the external-contributor proof gate: this is a member-authored internal CI change, and the supplied exact-head release-gate artifact directly exercises the adjusted boundary.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Current-main blame attributes the existing startup-gzip tolerance to Vincent Koc, and this member authored the focused follow-up that separates its variance allowance. (role: feature owner and recent area contributor; confidence: medium; commits: 751e6c540f, 4198eb8cf340; files: scripts/check-control-ui-performance.mts, test/scripts/control-ui-performance.test.ts)

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-27T04:34:36.894Z sha 4198eb8 :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact-head release-gate evidence is now recorded in the PR body. Attempt 1 exercised the adjusted gzip gate successfully; the single unrelated sidebar E2E failure passed on one failed-job-only retry, and attempt 2 finished with openclaw/ci-gate green. Please refresh the exact-head review and rank-up assessment.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

Another reproduction while validating the configured-channel JSON inventory repair: a local macOS build at 6dd819026cbf measured 343,445 B against the 343,442 B limit (342,930 B baseline + 512 B tolerance), failing by 3 B.

That patch changes no UI source, Vite configuration, dependency input, or size limit. Its 88 focused tests, changed gates, and independent review pass; the full build reaches the UI performance check after the runtime and SDK phases succeed. I left that PR in draft behind this owned repair rather than duplicating it or relaxing the guard.

@vincentkoc
vincentkoc marked this pull request as ready for review August 27, 2026 06:25
@vincentkoc
vincentkoc merged commit 0b0cff1 into main Aug 27, 2026
573 of 575 checks passed
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

@vincentkoc
vincentkoc deleted the fix/ci-control-ui-gzip-variance branch August 27, 2026 06:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

2 participants