Repository navigation
fix(e2e): stabilize offline extensions scenario - #6343
Conversation
🔎 IronLoop Review StatusHead: Current reviewers:
Reviewer summaries
Recent activity
Available commands
Run metadataAdmission: webhook accepted the request and IronLoop persisted reviewer state before this projection. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe legacy extensions E2E test now mocks the LLM providers endpoint, waits for its response during settings navigation, and verifies the OpenAI provider card before continuing with offline extension catalog assertions. ChangesLegacy extensions E2E flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 updates the end-to-end test test_reborn_legacy_extensions_offline_attempts_catalog_requests to mock the LLM providers API endpoint (/api/webchat/v2/llm/providers) with a mock OpenAI provider. It registers this route handler, waits for the response during page navigation, and asserts that the corresponding LLM provider card is visible. There are no review comments, and I have no feedback to provide.
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.
There was a problem hiding this comment.
⚠️ IronLoop Review: reviewer
Review at a glance
| Verdict | Blocking | Notes | Inline | Head |
|---|---|---|---|---|
| 0 | 0 | 0 | 162cdc311480 |
Head: 162cdc311480c2b7f4f2bcfad31383dd355c2d10
Next: Human review or validation is required before merging.
Run details
Status: Current
Needs human: no
Needs validation: yes
Summary
No actionable defect found in the focused E2E stabilization. Runtime validation is still required.
Findings
None.
Developer follow-up
After fixing this feedback:
- Push the fix to this PR branch.
- Re-run this reviewer with
@ironloopai review --agent reviewerif you only changed this reviewer's findings. - Re-run all reviewers with
@ironloopai reviewwhen the fix may affect multiple areas.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/e2e/scenarios/test_reborn_webui_v2_legacy_extensions.py`:
- Around line 716-740: Update handle_llm_providers to pass the provider payload
through the json parameter of route.fulfill, removing the manual json.dumps
conversion and redundant content_type argument while preserving the existing
response structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2c80ff6c-3ad4-4163-9610-0bdcdd52b4bd
📒 Files selected for processing (1)
tests/e2e/scenarios/test_reborn_webui_v2_legacy_extensions.py
| async def handle_llm_providers(route): | ||
| await route.fulfill( | ||
| status=200, | ||
| content_type="application/json", | ||
| body=json.dumps( | ||
| { | ||
| "providers": [ | ||
| { | ||
| "id": "openai", | ||
| "description": "OpenAI API", | ||
| "adapter": "open_ai_completions", | ||
| "base_url": "https://api.openai.test/v1", | ||
| "default_model": "mock-model", | ||
| "builtin": True, | ||
| "api_key_set": True, | ||
| "api_key_required": True, | ||
| "base_url_required": False, | ||
| "accepts_api_key": True, | ||
| } | ||
| ], | ||
| "active": {"provider_id": "openai", "model": "mock-model"}, | ||
| } | ||
| ), | ||
| ) | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
🧩 Analysis chain
🌐 Web query:
Does Playwright Python's Route.fulfillaccept ajson keyword argument?
💡 Result:
Yes, Playwright Python's Route.fulfill method accepts a json keyword argument [1][2]. This argument was added in version 1.29 and allows you to provide a dictionary that will be serialized as a JSON response [1][2]. When this argument is used, Playwright automatically sets the content-type header to application/json if it has not been set otherwise [1][2].
Citations:
- 1: https://playwright.dev/python/docs/api/class-route
- 2: https://playwright.dev/python/docs/next/api/class-route
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='tests/e2e/scenarios/test_reborn_webui_v2_legacy_extensions.py'
printf '\n== imports and json usage ==\n'
grep -nE '^(import json|from json|import .*json|from .* import .*json)' "$file" || true
printf '\n'
grep -n '\bjson\.' "$file" || true
printf '\n== surrounding lines ==\n'
sed -n '700,760p' "$file"Repository: nearai/ironclaw
Length of output: 3172
Use json= in route.fulfill here. Route.fulfill already serializes dict payloads and sets the JSON content type, so json.dumps(...) plus content_type="application/json" is redundant.
🧰 Tools
🪛 ast-grep (0.44.1)
[info] 719-737: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"providers": [
{
"id": "openai",
"description": "OpenAI API",
"adapter": "open_ai_completions",
"base_url": "https://api.openai.test/v1",
"default_model": "mock-model",
"builtin": True,
"api_key_set": True,
"api_key_required": True,
"base_url_required": False,
"accepts_api_key": True,
}
],
"active": {"provider_id": "openai", "model": "mock-model"},
}
)
Note: [CWE-116] Improper Encoding or Escaping of Output.
(use-jsonify)
🪛 Ruff (0.15.21)
[warning] 716-716: Missing return type annotation for private function handle_llm_providers
Add return type annotation: None
(ANN202)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/e2e/scenarios/test_reborn_webui_v2_legacy_extensions.py` around lines
716 - 740, Update handle_llm_providers to pass the provider payload through the
json parameter of route.fulfill, removing the manual json.dumps conversion and
redundant content_type argument while preserving the existing response
structure.
|
🚅 Deployed to the ironclaw-pr-6343 environment in ironclaw-ci-preview
|
Coverage ratchetReborn integration-tier coverageLine coverage (Reborn crates): 86.21% — 319818 / 370969 lines Per-crate breakdown (65 crates, lowest-covered first)
This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors. Exemptions (3 entry/entries excluded from the accounting above)
|
Summary
Root cause
Scheduled run https://github.com/nearai/ironclaw/actions/runs/29717067979 failed only in the legacy-settings-extensions shard. The offline scenario started on Settings without synchronizing the first-run provider query. When that query resolved with no active provider before the Extensions click, the onboarding gate redirected the SPA to Welcome instead of mounting Extensions. The test then waited for an alert that could never render. The aggregate Reborn Playwright job failed because that shard failed.
Verification