Skip to content

test(ui): retain synthetic widget failure evidence - #139229

Merged
steipete merged 1 commit into
mainfrom
codex/ui-widget-failure-evidence
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ui-widget-failure-evidence

Conversation

@steipete

@steipete steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The synthetic widget sandbox E2E occasionally times out waiting for chat.send after a resize and Refresh click. The failed release job retained only console output, leaving no pointer, focus, or private-port timeline to distinguish a missed click from a rejected or undelivered prompt. See the observed UI4 failure.

Why This Change Was Made

The existing fixture now keeps a bounded, restricted-field event timeline and writes it before context cleanup when its scenario fails. Normal CI and reusable repository E2E upload only this synthetic fixture's failure timeline and existing PNG/WebM files, gated on both failure and timeline presence, with seven-day retention. URLs, message bodies, credentials, DOM dumps, arbitrary errors, general UI artifacts, and trace archives are excluded.

User Impact

No application behavior changes. This improves future failure evidence; it does not claim to repair the intermittent failure. The original actions, assertions, security checks, and timeouts remain unchanged. Release qualification and publication remain independent of this follow-up.

Evidence

  • The unchanged original 100-file shard passed all 425 tests on Linux/Node 24.19. Eight additional focused instrumented cases also passed, so no failing causal sequence was established.
  • The normal fixture passes with the final helper. A temporary, explicitly labeled injected diagnostic failure after the original flow succeeded preserved its original error, a 28,433-byte timeline across five frames, three screenshots, and finalized video. The injected throw was removed and the source byte identity verified; the normal case passed again.
  • The injected timeline contains the trusted click, focused/visible iframe, private-port receipt, and host prompt event. Its field allowlist and absence of URLs, source credential, prompt body, and note text were checked. The sampled screenshot was visually inspected and contains synthetic data only.
  • Workflow guards cover both owning workflows and all four failure/capture combinations, including no upload on success or absent evidence. The full workflow suite passed 445 tests with two skips; workflow lint passed.
  • Full changed checks (both typecheck lanes, dead-export scans, core/scripts lint, formatting and guards) and fresh independent P2 review pass. Product runtime delta is zero; workflow metadata adds 26 lines, and tests/test support add 157 lines and remove one.

Capture bounded pointer, focus, size and prompt-port diagnostics before the
synthetic fixture closes. Retain only its timeline and existing images/video
on failure in normal and reusable E2E CI, with seven-day retention.

This improves evidence for an unreproduced intermittent timeout; it does
not change widget behavior, assertions, security checks, or timeouts.
@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: S maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 17:07
@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 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 1:37 PM ET / 17:37 UTC.

ClawSweeper review

What this changes

The PR records bounded browser-event diagnostics when the synthetic widget test fails and uploads its timeline, screenshots, and video from CI.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-owned work remains useful and absent from current main. No blocking patch defects were identified.

Priority: P3
Reviewed head: f20d2f0036dd138c98b702fd7cd2449bd7c61a01

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused diagnostics change with appropriate bounds, existing lifecycle reuse, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The contributor-proof gate does not apply to this maintainer-authored test/CI change. The supplied body reports after-change failure capture through the actual Chromium fixture and cleanup owner; retained artifacts were not independently inspected.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor-proof gate does not apply to this maintainer-authored test/CI change. The supplied body reports after-change failure capture through the actual Chromium fixture and cleanup owner; retained artifacts were not independently inspected.
Evidence reviewed 11 items Verified introduced scope: The original head has the recorded parent d013798. The independently inspected test merge has the pinned base followed by the exact PR head as parents; its comparison contains only the five introduced files.
Bounded, observational diagnostics: The helper limits each timeline to 256 events and collects at most eight frames. It records selected event metadata without prompt bodies or URLs and observes MessagePorts without starting, closing, or posting through them.
Cleanup owner and error preservation: The existing withPage cleanup callback runs before browser-context closure. Its runQaGatewayFixture callee preserves the body error and continues later cleanup phases; existing tests cover error identity and ordered cleanup.
Findings None None.
Security None None.

How this fits together

The Control UI test harness exercises widgets in Chromium using synthetic documents and mocked Gateway responses. Its cleanup and CI workflows preserve evidence for diagnosing failed interactions.

flowchart TD
  A[Synthetic widget scenario] --> B[Bounded browser timeline]
  B --> C{Scenario failed?}
  C -->|Yes| D[Save timeline before cleanup]
  C -->|No| E[Normal cleanup]
  D --> F[Close browser and finalize video]
  F --> G[Upload selected artifacts for seven days]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +156, Config +26. Total +182 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 157 1 +156
Docs 0 0 0 0
Config 2 26 0 +26
Generated 0 0 0 0
Other 0 0 0 0
Total 5 183 1 +182

Review metrics

Metric Value Why it matters
Production versus test growth Product runtime 0; tests/support +156 net; CI metadata +26 Growth is confined to failure diagnostics and artifact retention, with no application behavior added.
Diagnostic bounds 8 frames maximum; 256 events per frame; 7-day retention Explicit limits bound collected timeline data and artifact lifetime.

Technical review

Best possible solution:

Keep diagnostics scoped to the synthetic fixture and use captured failures to investigate the intermittent timeout separately.

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

Not applicable to the diagnostic addition. The underlying intermittent timeout remains unreproduced; the reported injected failure exercises evidence retention only.

Is this the best way to solve the issue?

Yes for the stated diagnostic purpose: it reuses existing cleanup and artifact ownership while avoiding broader trace collection or speculative runtime changes.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a focused test-diagnostics improvement with no production behavior change.
  • 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 contributor-proof gate does not apply to this maintainer-authored test/CI change. The supplied body reports after-change failure capture through the actual Chromium fixture and cleanup owner; retained artifacts were not independently inspected.

Label justifications:

  • P3: This is a focused test-diagnostics improvement with no production behavior change.
  • 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 contributor-proof gate does not apply to this maintainer-authored test/CI change. The supplied body reports after-change failure capture through the actual Chromium fixture and cleanup owner; retained artifacts were not independently inspected.

Evidence

What I checked:

  • Verified introduced scope: The original head has the recorded parent d013798. The independently inspected test merge has the pinned base followed by the exact PR head as parents; its comparison contains only the five introduced files. (49a545c11be1)
  • Bounded, observational diagnostics: The helper limits each timeline to 256 events and collects at most eight frames. It records selected event metadata without prompt bodies or URLs and observes MessagePorts without starting, closing, or posting through them. (ui/src/e2e/chat-widget-sandbox.diagnostics.test-support.ts:6, f20d2f0036dd)
  • Cleanup owner and error preservation: The existing withPage cleanup callback runs before browser-context closure. Its runQaGatewayFixture callee preserves the body error and continues later cleanup phases; existing tests cover error identity and ordered cleanup. (ui/src/e2e/control-ui-e2e-suite.test-support.ts:484, f20d2f0036dd)
  • Existing diagnostics are complementary: The existing timeout collector records application state and Gateway requests, rather than the new pointer, focus, and private-port timeline. The fixture reuses the established unique artifact-directory allocator; sibling autosizing and real-Gateway fixtures remain separate owners. (ui/src/test-helpers/control-ui-e2e.ts:3081, f20d2f0036dd)
  • Upload selection and guard coverage: Both workflows require failure and timeline presence, select only the synthetic fixture's timeline/PNG/WebM paths, and retain them for seven days. The added table checks all four failure/capture combinations for both workflows; permissions and action pins are unchanged. (test/scripts/ci-workflow-guards.test.ts:12960, f20d2f0036dd)
  • Current-main and release necessity: The four existing touched files are unchanged between the merge base and fetched main, and main lacks the new diagnostics helper and timeline references. The synthetic sandbox fixture itself is absent from the supplied latest release, v2026.9.1; no merged replacement was established. (886aaa689076)

Likely related people:

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

Copy link
Copy Markdown
Contributor Author

Ready to land at f20d2f0036dd138c98b702fd7cd2449bd7c61a01. CI33979983143 attempt2 completed successfully after one failed-job retry. The first attempt failed in untouched A2UI dark/light cases; both passed one unchanged focused replay, and the branch was not modified for the retry.

The final helper passed normal Chromium proof and a separately labeled injected failure. The injection retained its original error, bounded timeline, and only the fixture's existing screenshots/video; the injected source was restored byte-for-byte. Full changed checks, workflow lint, 445 workflow guard tests (two skips), independent P2 review, and the latest ClawSweeper review are clear. No Rank-up or before-merge items remain.

This is a diagnostic improvement, not a claim that the intermittent widget timeout is fixed. Product runtime delta is zero. Timeline fields and frame/event counts are bounded; CI retention is limited to this synthetic fixture's JSON/PNG/WebM files for seven days. No production behavior, assertions, security checks, or timeouts changed.

@steipete
steipete merged commit 537e347 into main Sep 5, 2026
304 of 306 checks passed
@steipete
steipete deleted the codex/ui-widget-failure-evidence branch September 5, 2026 18:24
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 5, 2026
* commit '911d7d5b0c107f7274f2415ca9655dcc6105f0e8': (867 commits)
  fix(skills): deliver pending Workshop approval controls (#139248)
  fix(gateway): deliver loopback ask_user prompts to the originating channel (#138831)
  docs: keep root agent instructions focused on repository policy (#139258)
  fix(matrix): exclude archived state roots from scans and selection (#112329)
  perf(agents): prepare exact tool names once per catalog batch (#139267)
  fix: preserve Swarm progress and simplify owner plumbing (#139269)
  fix(tailscale): release claims after gateway process-group exit (#139261)
  refactor(cli): simplify lazy command registration (#139108)
  test(ui): retain synthetic widget failure evidence (#139229)
  fix(buzz): keep implicit replies at thread root (#138879)
  test(diagnostics): await graceful Gateway shutdown before cleanup (#139247)
  fix(ci): unblock releases with different tooling package managers (#139259)
  feat(ui): add social preview links for private sessions (#139250)
  fix(codex): retain failed conversations for guarded continuation (#139246)
  chore(ui): refresh control ui locales (#139200)
  fix(ci): run browser checks for real-gateway inputs (#139256)
  fix(llama-cpp): reconcile managed router state before requests (#136363)
  chore(i18n): refresh native locales (#139237)
  refactor(worker): unify inference payload handling (#139245)
  refactor(terminal): replay wrapped prefixes in one pass (#139240)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Capture bounded pointer, focus, size and prompt-port diagnostics before the
synthetic fixture closes. Retain only its timeline and existing images/video
on failure in normal and reusable E2E CI, with seven-day retention.

This improves evidence for an unreproduced intermittent timeout; it does
not change widget behavior, assertions, security checks, or timeouts.
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: 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