Skip to content

fix(ci): settle draft setup before measuring composer renders - #135075

Merged
steipete merged 1 commit into
mainfrom
codex/ci-composer-budget-settlement-20260901
Sep 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-composer-budget-settlement-20260901

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a flaky CI performance check where the first draft's asynchronous save can overlap the interval intended to measure ordinary typing. The composer budget failed with two host updates against its limit of one in run 33492093127; the unchanged-head retry passed.

Why This Change Was Made

Wait for the seeded draft's committed browser-store record before installing the render probe, using the existing helper that also crosses a browser render boundary. Keep that same probe active until the typed draft commits, so asynchronous invalidations remain covered. The initial save publishes draft presence to shared subscribers; later content-only saves do not.

This preserves real keyboard input, the long transcript, all assertions, and the one-host-update budget. It adds no sleeps, retries, larger timeouts, or production changes. The failed run did not retain requestUpdate call stacks, so its exact two callers are unknown; the precondition race is verified from the persistence and subscription owners.

User Impact

No product behavior changes. CI measures steady-state composer work after setup has completed and includes the asynchronous completion of the measured edit.

Evidence

  • Source inspection: composer persistence publishes the presence transition synchronously before requesting durable storage; the existing committed-draft helper awaits the exact IndexedDB record and a browser frame.
  • Targeted formatting and lint pass; git diff --check passes.
  • Fresh managed Codex review: no accepted or actionable findings at the required priority.
  • Exact-head browser proof in the native PR checkout: the repaired composer case passed (1/1), then the complete runtime-budget file passed (5/5, 19.588 seconds of test execution). Its unchanged composer assertion covers the complete edit through durable persistence; the other streaming, heap, and idle budgets also passed.
  • The native checkout received one frozen dependency install after the linked checkout's stale dependencies prevented browser startup. No tracked dependency files changed. Hosted CI is run 33494931388.
  • Production/tooling LOC: +0/-0. Existing test: +6/-0; no test cases or assertions removed.

Related: #135039, #133465.

@steipete steipete self-assigned this Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 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 app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The initial review failed before publishing its result. The head is unchanged; focused browser proof and all required CI checks are green.

@clawsweeper

clawsweeper Bot commented Sep 1, 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:

@clawsweeper clawsweeper Bot added 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 Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 6:27 AM ET / 10:27 UTC.

ClawSweeper review

What this changes

The branch updates a Control UI browser performance test to wait for seeded and typed composer drafts to reach browser storage before measuring render updates.

Regression provenance

Possible regression — probable (reviewed change; failure trace; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings. This active maintainer PR correctly isolates the steady-state composer render measurement from the first draft’s asynchronous presence notification; current main still lacks that stabilization.

Priority: P3
Reviewed head: c3f9440dc41efd11184c92fa845d68a9e556bf7f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned test stabilization with supplied exact-head browser coverage and no functional or security finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored, test-only PR is outside the external-contributor proof gate; its supplied exact-head browser result is supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR is outside the external-contributor proof gate; its supplied exact-head browser result is supplemental validation.
Evidence reviewed 5 items Introduced stabilization: The PR adds a settled draft wait before probe reset and another after the measured edit, with no production-code change.
Owner-boundary race: A draft write notifies subscribers only when empty/non-empty presence changes; the app-shell subscriber requests a host update synchronously, which can overlap the prior measurement setup.
Settlement helper contract: The reused helper polls the exact IndexedDB record and requires it to survive a browser render boundary, covering the asynchronous durable-write completion rather than adding a timing delay.
Findings None None.
Security None None.

How this fits together

The Control UI composer synchronously saves draft presence for sidebar subscribers, then asynchronously persists the draft to IndexedDB. The browser test counts unrelated host renders while users type in a long chat transcript.

flowchart LR
A[Long chat setup] --> B[Composer draft]
B --> C[Draft presence update]
C --> D[Sidebar subscribers]
B --> E[IndexedDB commit]
E --> F[Render measurement]
F --> G[Composer render budget]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed; this is an active, focused maintainer PR with no identified corrective work.
Agent review details

Security

None.

PR surface

Tests +6. Total +6 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 0 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 0 +6

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +6/-0 The change strengthens an existing browser performance test without changing product behavior or its render budget.

Technical review

Best possible solution:

Keep the existing one-host-update budget and land this focused settlement change so the test measures ordinary typing rather than initial draft-presence setup.

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

Yes: the current-main sequence resets the probe before the first draft’s asynchronous durable persistence has settled, and the supplied failed CI run observed the resulting extra updates. This read-only review did not rerun the flaky case.

Is this the best way to solve the issue?

Yes: waiting on the durable draft owner and a render boundary is the appropriate test precondition, unlike adding sleeps, retries, or relaxing the render budget.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 998529f81a97.

Labels

Label changes:

  • add P3: This is a contained CI-test reliability repair with no user-facing runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: This maintainer-authored, test-only PR is outside the external-contributor proof gate; its supplied exact-head browser result is supplemental validation.

Label justifications:

  • P3: This is a contained CI-test reliability repair with no user-facing runtime change.
  • 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. Not applicable: This maintainer-authored, test-only PR is outside the external-contributor proof gate; its supplied exact-head browser result is supplemental validation.

Evidence

What I checked:

  • Introduced stabilization: The PR adds a settled draft wait before probe reset and another after the measured edit, with no production-code change. (ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts:633, c3f9440dc41e)
  • Owner-boundary race: A draft write notifies subscribers only when empty/non-empty presence changes; the app-shell subscriber requests a host update synchronously, which can overlap the prior measurement setup. (ui/src/pages/chat/composer-persistence.ts:363, c3f9440dc41e)
  • Settlement helper contract: The reused helper polls the exact IndexedDB record and requires it to survive a browser render boundary, covering the asynchronous durable-write completion rather than adding a timing delay. (ui/src/e2e/settle.test-support.ts:53, c3f9440dc41e)
  • Current-main comparison: Fetched current main retains the prior test sequence with probe installation immediately after filling the seed draft; its diff against the PR head is exactly this test stabilization. (ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts:631, 998529f81a97)
  • Related history: The related merged CI work recorded this exact missing setup-settlement follow-up; the earlier merged UI work established the long-transcript composer budget this test protects. (7370255722e9)

Likely related people:

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

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.

@steipete
steipete merged commit 1dc3d5f into main Sep 1, 2026
114 checks passed
@steipete
steipete deleted the codex/ci-composer-budget-settlement-20260901 branch September 1, 2026 10:34
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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