Skip to content

fix(ci): stabilize Control UI stream and recovery tests - #138776

Merged
steipete merged 2 commits into
mainfrom
codex/release-loop-ui-burst-51a6
Sep 5, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/release-loop-ui-burst-51a6

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two Control UI browser fixtures failed during release verification. The stream budget fixture used nested zero-delay timers whose browser clamping could spread its supposed burst across too many frames. The startup recovery fixture inspected responsive geometry immediately after changing the viewport, before the application was required to have finished its resize update.

Why This Change Was Made

Deliver each of the 240 stream snapshots in its own MessageChannel task, with one deliberate animation-frame boundary. Keep the 180-update ceiling, two-update floor, 90% frame-scheduling ratio, and complete final-text assertion. Both direct per-message updates and a separate rAF callback for every message still fail the gate.

Await the existing mobile recovery bounds with the suite's default expect.poll timeout. The bounds and recovery interactions are unchanged. CI observed the immediate assertion fail; local original and passive-diagnostic runs passed, so this change does not claim to have captured CI's exact bad geometry. It follows the asynchronous viewport/resize/render contract used by the responsive sibling tests.

User Impact

Release verification checks browser behavior without these timer-cadence and immediate-layout assumptions. Production behavior and rendering policies are unchanged.

Evidence

  • The unchanged stream fixture failed with 225 host invalidations when the same 240 snapshots arrived 16 ms apart; every invalidation was inside rAF and the complete final snapshot was visible. The repaired five-test suite passed. Direct per-message invalidation still failed at 241 > 180; removing pending-frame dedupe and its stale-callback fence failed at 240 > 180.
  • Startup recovery preserved the original saved/chat/toast order and passed all three cases with the polling change. The original and passive-diagnostic local runs also passed; CI is the observed failing reproduction for that immediate assertion.
  • The separate dashboard gallery failure was repaired in fix(ui): align task toolbar with side-panel tabs #138769 (6832f3b61ebce90d52921b592e9d23dd83802e06). Validation includes its canonical fixture repair and exercises gallery navigation as sibling coverage.

Both complete scoped changed gates passed, including formatting, UI catalog verification, the UI E2E type graph, dead-export checks, and targeted lint. Both changed fixture files remain byte-identical after rebasing onto the canonical gallery-fix commit.

The final combined browser run passed all 9 cases across three files on head 958db6f3628da43176433647c843325296671f4f, based on 6832f3b61ebce90d52921b592e9d23dd83802e06 (210.79 seconds). This includes the five streaming budget cases, three startup recovery paths, and canonical dashboard gallery scenario. CI must be green before merge.

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts ui/src/e2e/dashboard-gallery.e2e.test.ts ui/src/e2e/new-session-page.cloud-startup.runtime-load.e2e.test.ts

Independent Codex reviews of the stream and startup fixtures are scoped-clean through P2.

Production: +0/-0. Tests: +32/-22. No baseline, inventory, timeout, or performance budget was relaxed. Original coalescing coverage and negative-proof rationale come from #106353 and #128154; the generated locale PR #138680 exposed the stream-budget failure.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 01:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 10:03 PM ET / September 5, 2026, 02:03 UTC.

ClawSweeper review

What this changes

The PR delivers simulated chat updates through separate browser message tasks instead of nested timers and checks the complete rendered final snapshot.

Merge readiness

✅ Ready for maintainer review

Keep open with no blocking findings. This is a useful, narrowly scoped correction to an existing CI guard; the reviewed main and release still contain the timer-paced fixture, and the patch preserves the regression thresholds.

Priority: P2
Reviewed head: 4d39c83675f50923ff05a0e0f38976a71644fc48

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair with preserved thresholds, reported mutation checks, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor setup gate does not apply to this MEMBER-authored test-only PR; its body reports five browser scenarios and two negative controls against the unchanged render owner.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor setup gate does not apply to this MEMBER-authored test-only PR; its body reports five browser scenarios and two negative controls against the unchanged render owner.
Evidence reviewed 9 items Verified introduced scope: The merge-base-to-head delta changes only the browser budget test. Raw test-merge parents match the pinned base followed by the exact PR head; comparison against that base also changes only this test, not the unrelated endpoint-drift files.
Still necessary on reviewed main and release: Fetched main, the PR merge base, and the supplied v2026.9.1 release commit all resolve this test to blob 87054f649eea1e3f9f8627ae1e011a1bfe57616e. Inspection confirms the nested setTimeout producer remains there. The related merged PRs establish the original rendering and budget contracts, not a replacement for this correction.
Production owner and caller: The chat event handler applies stream state before requesting an animation-frame update. The render owner deduplicates pending frames, rejects stale callbacks, and retains immediate/hidden-document behavior. Both files are unchanged between reviewed main and this head.
Findings None None.
Security None None.

How this fits together

The Control UI browser tests feed simulated Gateway messages into the real chat state and rendering code. Their runtime budgets detect excessive rendering while checking that streamed text reaches the transcript.

flowchart TD
  A[Mock chat snapshots] --> B[Separate browser message tasks]
  B --> C[Halfway animation frame pause]
  C --> D[Chat state and render queue]
  D --> E[Rendered transcript]
  D --> F[Render budget assertions]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +5. Total +5 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test scope Production net 0; tests net +5 All growth belongs to the existing browser fixture; no production behavior or test-only production API is added.
Budget strength 4 workload/threshold values unchanged The repair changes delivery cadence rather than relaxing the workload, update ceiling, sanity floor, or frame-scheduling ratio.

Technical review

Best possible solution:

Keep burst scheduling in the test producer, preserving the production render queue, existing budgets, and complete final-snapshot assertion.

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

Yes at source level: spreading 240 snapshots over more than 180 render frames can exceed the fixed ceiling despite correct coalescing, matching the supplied cadence diagnostic. Tests were not executed here, and the original CI failure's exact timing cause remains unestablished.

Is this the best way to solve the issue?

Yes—the patch corrects the producer's burst assumption rather than raising thresholds or modifying the correct rendering owner, while preserving separate event tasks and strengthening final-text verification.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This repairs a concrete false-failure mechanism in a CI performance guard without changing user-facing runtime behavior.
  • 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 external-contributor setup gate does not apply to this MEMBER-authored test-only PR; its body reports five browser scenarios and two negative controls against the unchanged render owner.

Label justifications:

  • P2: This repairs a concrete false-failure mechanism in a CI performance guard without changing user-facing runtime behavior.
  • 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 external-contributor setup gate does not apply to this MEMBER-authored test-only PR; its body reports five browser scenarios and two negative controls against the unchanged render owner.

Evidence

What I checked:

  • Verified introduced scope: The merge-base-to-head delta changes only the browser budget test. Raw test-merge parents match the pinned base followed by the exact PR head; comparison against that base also changes only this test, not the unrelated endpoint-drift files. (ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts:197, 4d39c83675f5)
  • Still necessary on reviewed main and release: Fetched main, the PR merge base, and the supplied v2026.9.1 release commit all resolve this test to blob 87054f649eea1e3f9f8627ae1e011a1bfe57616e. Inspection confirms the nested setTimeout producer remains there. The related merged PRs establish the original rendering and budget contracts, not a replacement for this correction. (ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts:229, f9b00a558261)
  • Production owner and caller: The chat event handler applies stream state before requesting an animation-frame update. The render owner deduplicates pending frames, rejects stale callbacks, and retains immediate/hidden-document behavior. Both files are unchanged between reviewed main and this head. (ui/src/pages/chat/chat-state-render.ts:16, 4d39c83675f5)
  • Fixture boundary and retained assertions: The complete test was inspected. Both callers use positive fixed counts; the producer starts its receiving port and closes both ports after delivery. The mock dispatches each emitted Gateway frame synchronously into the browser client. The 240-message workload, 180-update ceiling, two-update floor, and 90% frame ratio remain unchanged; final-text checking now includes inline code and trailing text. (ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts:211, 4d39c83675f5)
  • Browser contract verified: The affirmative dependency signal is the changed MessageChannel/requestAnimationFrame producer and the PR's timer-cadence claim. WHATWG specifies a minimum four-millisecond timeout after sufficient timer nesting, initially disabled MessagePort queues enabled by start(), and ordered animation-frame callback processing. These support the producer change and deliberate midpoint frame boundary. No changed behavior depends on the Codex runtime or protocol. citeturn97024search1turn97024search0turn97024search2.
  • Sibling coverage and existing platform pattern: Existing tests separately cover frame coalescing, hidden-document updates, and preservation of every text delta. The production submit-yield helper already uses the same MessageChannel listener/start/close pattern. This patch adds no production seam or competing rendering implementation. (ui/src/pages/chat/chat-state.test.ts:2994, 4d39c83675f5)

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: 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 force-pushed the codex/release-loop-ui-burst-51a6 branch from 4d39c83 to 958db6f Compare September 5, 2026 03:27
@steipete steipete changed the title fix(ci): avoid false chat stream budget failures fix(ci): stabilize Control UI stream and recovery tests Sep 5, 2026
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The final diff also updates the startup recovery geometry assertion while preserving its existing bounds and default timeout. Both changed files have clean independent reviews, and the combined nine-case browser run passes on this head. Dashboard resolution is supplied by the already-merged #138769.

@clawsweeper

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

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready verification for 958db6f3628da43176433647c843325296671f4f: the final combined browser run passed all 9 cases in 210.79 seconds, both complete scoped changed gates passed, and independent Codex reviews are clean through P2. CI 33941903045 and all PR checks are green. Native review artifacts validated. The two-file diff changes tests only (+32/-22), with all budgets and geometry constraints preserved; canonical dashboard repair #138769 is in the base.

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts ui/src/e2e/dashboard-gallery.e2e.test.ts ui/src/e2e/new-session-page.cloud-startup.runtime-load.e2e.test.ts

The startup evidence limitation remains explicit: CI observed the immediate assertion fail, while local original and passive runs passed. The frozen repo E2E workflow did not upload browser failure captures, so the precise bad bounds cannot be recovered. The fix awaits the same constraints with the existing polling timeout. Both mutation controls still reject broken stream coalescing.

@steipete
steipete merged commit a0ca1cf into main Sep 5, 2026
87 checks passed
@steipete
steipete deleted the codex/release-loop-ui-burst-51a6 branch September 5, 2026 03:54
@steipete

steipete commented Sep 5, 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 5, 2026
)

* test(ui): decouple stream burst budgets from timer cadence

* test(ui): await responsive startup recovery layout
vincentkoc added a commit to LiuwqGit/openclaw that referenced this pull request Sep 5, 2026
* refs/remotes/origin/main:
  fix(codex): reject stale control commands after session rollover (openclaw#138820)
  fix: normalize small Responses output budgets (openclaw#138828)
  test(voice-call): reuse presence guards in notify helpers (openclaw#138246)
  refactor(logbook): type reads and bound observation queries (openclaw#138816)
  fix(workboard): stop services before retiring SQLite stores (openclaw#138810)
  fix(ci): stabilize Control UI stream and recovery tests (openclaw#138776)
  fix(cli): share recorded gateway state path inspection (openclaw#138822)
  refactor(anthropic): replace Agent SDK with direct CLI transport (openclaw#138707)
  fix(agents): preserve per-turn settings and diagnostics (openclaw#138695)
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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