Repository navigation
[codex] Add Reborn WebUI legacy E2E harness - #5345
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds Reborn WebUI v2 test support across DOM selectors, deterministic mock LLM tool behavior, and a shared Playwright/httpx harness for starting the server, opening the SPA, and driving chat thread polling. ChangesReborn WebUI v2 E2E support
Sequence Diagram(s)sequenceDiagram
participant reborn_v2_server_fixture
participant start_reborn_webui_v2_server
participant ironclaw_reborn_serve
participant api_health
reborn_v2_server_fixture->>start_reborn_webui_v2_server: create home dir and config.toml
start_reborn_webui_v2_server->>ironclaw_reborn_serve: spawn serve subprocess on a free port
start_reborn_webui_v2_server->>api_health: poll GET /api/health
api_health-->>start_reborn_webui_v2_server: ready
start_reborn_webui_v2_server-->>reborn_v2_server_fixture: base URL
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Reborn WebUI v2 in the end-to-end test suite. It adds new selectors to helpers.py, updates the mock LLM to handle Reborn-specific namespaced builtin tools and strip attachment blocks for skill detection, and introduces a new Playwright test harness in reborn_webui_harness.py to manage the Reborn server process and helper functions. The review feedback suggests awaiting proc.wait() on process lookup errors to prevent zombie processes, and wrapping timeline polling calls in try-except blocks to make the test harness resilient against transient HTTP errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| try: | ||
| proc.send_signal(sig) | ||
| except ProcessLookupError: | ||
| return |
There was a problem hiding this comment.
If proc.send_signal(sig) raises ProcessLookupError, the process has already exited but has not been reaped yet. Returning immediately without awaiting proc.wait() leaves the process as a zombie and prevents proc.returncode from being populated. Awaiting proc.wait() ensures proper cleanup.
| try: | |
| proc.send_signal(sig) | |
| except ProcessLookupError: | |
| return | |
| try: | |
| proc.send_signal(sig) | |
| except ProcessLookupError: | |
| await proc.wait() | |
| return |
| for _ in range(int(timeout * 2)): | ||
| last_timeline = await fetch_timeline(client, base_url, thread_id) | ||
| finalized = [ | ||
| message | ||
| for message in last_timeline.get("messages", []) | ||
| if message.get("kind") == "assistant" | ||
| and message.get("status") == "finalized" | ||
| and (message.get("content") or "").strip() | ||
| ] | ||
| if finalized: | ||
| return finalized[-1] | ||
| await asyncio.sleep(0.5) |
There was a problem hiding this comment.
If fetch_timeline raises a transient httpx.HTTPError (e.g., due to temporary server unreadiness during a restart or network blip), the polling loop will crash immediately. Wrapping the call in a try...except block and retrying makes the helper much more resilient against flakiness.
for _ in range(int(timeout * 2)):
try:
last_timeline = await fetch_timeline(client, base_url, thread_id)
except httpx.HTTPError:
await asyncio.sleep(0.5)
continue
finalized = [
message
for message in last_timeline.get("messages", [])
if message.get("kind") == "assistant"
and message.get("status") == "finalized"
and (message.get("content") or "").strip()
]
if finalized:
return finalized[-1]
await asyncio.sleep(0.5)| for _ in range(90): | ||
| timeline = await fetch_timeline(client, base_url, thread_id) | ||
| if finalized_assistant_count(timeline) >= expected: | ||
| return | ||
| await asyncio.sleep(0.5) |
There was a problem hiding this comment.
Transient network or HTTP errors during fetch_timeline can cause the polling loop to fail prematurely. Wrapping the call in a try...except block ensures the loop continues retrying until the timeout is reached.
| for _ in range(90): | |
| timeline = await fetch_timeline(client, base_url, thread_id) | |
| if finalized_assistant_count(timeline) >= expected: | |
| return | |
| await asyncio.sleep(0.5) | |
| for _ in range(90): | |
| try: | |
| timeline = await fetch_timeline(client, base_url, thread_id) | |
| except httpx.HTTPError: | |
| await asyncio.sleep(0.5) | |
| continue | |
| if finalized_assistant_count(timeline) >= expected: | |
| return | |
| await asyncio.sleep(0.5) |
|
🚅 Deployed to the ironclaw-pr-5345 environment in ironclaw-ci-preview
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ess-base # Conflicts: # tests/e2e/mock_llm.py
Summary
Validation
tests/e2e/.venv/bin/python -m py_compile tests/e2e/helpers.py tests/e2e/mock_llm.py tests/e2e/reborn_webui_harness.pyStack base for the follow-up Reborn runtime, OpenAI-compatible Responses API, and WebUI v2 browser coverage PRs.