Repository navigation
feat: explore and test the app without a live Gateway - #1439
Conversation
Add a deterministic loopback Gateway, disposable app profiles, guarded host side effects, interactive and automated launchers, and passive render observation. Keep normal connection/provider/rendering paths intact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f451834c-cdd8-41cf-994c-77c0a22208b9
Cover real Gateway parsing, profile and host isolation, concurrent apps, native session switching, 240-message visibility, delayed history delivery, and empty sessions. Document the known product regression without weakening its assertion. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f451834c-cdd8-41cf-994c-77c0a22208b9
Pass the same optional wait arguments positionally so the review input scanner does not mistake C# CancellationToken named arguments for credential assignments. Test behavior is unchanged; all 29 protocol cases pass. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f451834c-cdd8-41cf-994c-77c0a22208b9
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 21, 2026, 6:56 PM ET / 22:56 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds a disposable, authenticated simulated Gateway, launch scripts, native application tests, and fixture-only isolation guards so developers can explore populated conversations without a live Gateway. Merge readiness⛔ Needs changes before merge - 1 item remains This remains useful work beyond main’s existing test fixtures. No actionable patch defect was found; current-head native desktop proof remains outstanding under the repository’s scoped validation policy. Priority: P2 Review scores
Verification
How this fits togetherThe fixture supplies synthetic Gateway responses to the Windows app’s real connection manager, chat provider, and renderer. Separate profiles and restricted host effects let MCP and native UI tests exercise browsing without importing installed pairings. flowchart TD
A[Developer launcher] --> B[Disposable profile and credentials]
B --> C[Real Windows app]
D[Authenticated loopback Gateway] --> C
C --> E[Native chat and settings]
F[MCP and UI automation] --> E
E --> G[Assertions and redacted artifacts]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the fixture opt-in, reuse the production connection and rendering paths, and preserve strict failing assertions while the separate scrolling investigation proceeds. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a development fixture. Its historical native runs demonstrate the capability; the scrolling failure they exposed is tracked separately. Is this the best way to solve the issue? Yes: testing through the real Gateway client and renderer fills a gap left by MCP-only and component fixtures, while keeping simulation code outside the application. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e7d8c05b51b5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Native UI evidence from the fixture harnessSuccessful Debug example: the real app displays the actual final message of the 240-message synthetic conversation. This is a harness demonstration, not an "after" screenshot for the separate scrolling fix. Known Release failure retained: after returning to the long conversation, the selected session is correct but the viewport is at messages 1-3. The harness failed its natural-tail assertion rather than repairing the scroll position or reporting success. This is tracked in #1437; the separate draft product fix is #1438 (fix(chat): restore the tail when switching conversations). Both captures contain only the fictional scenario and the target app window. The PR description preserves the latest Release result: 25 passing cases and one failed assertion. |
Keep polling timeout context and inner exceptions, isolate malformed upgrade failures, and cover both paths with regression tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat: explore and test the app without a live Gateway This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Maintainer landing review for
Proceeding with the authorized merge of the reviewed harness and fixes, without bypassing required checks. |


Related: #1437. The separate product-fix investigation is #1438 (fix(chat): restore the tail when switching conversations). Its current candidate is rejected, not a verified fix.
Maintainer update (2026-09-21)
Updated head:
825ecd401c70f5710a3172933d575a93e303f369. Review fixes are in8183bfc3; currentmain(e7d8c05b) was merged without conflicts before exact-head validation.What Problem This Solves
Developers need to test the populated desktop application without provisioning a real Gateway, pairing a machine, or paying for AI calls.
User Impact
Developers can launch the real app against a fictional Gateway, browse several conversations and settings pages, and run repeatable native UI smoke tests. Each run owns its profile, credentials, ports and processes, so installed pairings are not imported.
There is no change to normal installed-app behavior unless the explicit fixture mode is enabled.
Known limitation: the strict Release session-tail test can fail on existing chat behavior tracked in #1437. This PR preserves that failure rather than weakening the test or changing production scrolling.
Why This Change Was Made
This adds the missing middle tier between unit/component tests and full system E2E. The fixture speaks the normal Gateway WebSocket protocol; the app still uses its real connection manager, chat provider, history loader and renderer.
The same synthetic scenario supports interactive exploration and automation: five sessions, 240 mixed-height messages, an empty conversation, model/agent data and read-only Gateway configuration. MCP handles discovery, readiness and navigation; UI Automation operates the actual session picker and scrollbar.
The changes stay focused: test-only server/run infrastructure, narrow WSL/autostart/toast isolation guards, and passive fixture-only render metadata. No production scrolling workaround, provider replacement, new AI dependency, or Gateway installation.
CI boundary: existing unit-test jobs pick up the new tests in their projects. The real-app fixture smoke remains opt-in. This PR does not add a required desktop CI check, edit workflows relative to current main, or change branch protection. Mandatory CI promotion is a separate decision after the known runtime failure and runner reliability are addressed.
Evidence
winnode --list-toolsandapp.status; it exited successfully and removed its owned profile and process.Usage:
docs/GATEWAY_FIXTURE_TESTING.md.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: populated native chat, actual picker/scrolling/navigation, isolated startup and MCP proof. Historical Windows x64 proof collected; the known Release scrolling failure is retained. No fresh desktop smoke on the maintainer-update head.windows-11-arm64: current-head native ARM64 build and non-UI suites passed. Native ARM64 desktop runtime proof remains not verified.Validation
Current head:
825ecd401c70f5710a3172933d575a93e303f369Native Windows ARM64, .NET SDK 10.0.401. Required tests used isolated settings, explicit
OPENCLAW_REPO_ROOT, and no desktop/E2E opt-ins. Missing Windows SDK was installed using the repository setup script before the final runs. No--no-buildshortcut was used..\build.ps1win-arm64, including documentation validationdotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.IntegrationTests\OpenClaw.Tray.IntegrationTests.csproj --no-restore --filter 'FullyQualifiedName~GatewayFixtureProfileTests|FullyQualifiedName~GatewayFixtureRunTests'git diff --checkThe focused protocol suite passed all 35 cases on the fix tree before merging main; those cases also run in the full current-head Shared suite. The initial regression-test run reproduced the two defects before the fixes.
Both independent reviewers found no actionable findings in the seven-file fix delta. The conflict-free main merge's overlapping documentation/project-file hunks were checked directly. The current-host structured helper attempt (
python .\.agents\skills\autoreview\scripts\autoreview --mode local --engine codex) was blocked by missing Python and is not claimed as a successful structured-helper run.Original publication evidence:
afc3e9f7e616bde264ed78490e6738d0c1bbbd44These are the author's historical Windows x64 results, not fresh runs on the updated head:
.\build.ps1GatewayFixtureProtocolTestsGatewayFixtureProfileTestsandGatewayFixtureAppTests(--no-restore -r win-x64 -p:Platform=x64).\scripts\test-gateway-fixture.ps1 -AppPath '<Debug app>' -Screenshots.\build.ps1 -Project WinUI -Configuration Release.\scripts\test-gateway-fixture.ps1 -AppPath '<Release app>' -Configuration Release -Screenshots.\scripts\validate-docs.ps1andgit diff --checkOriginal structured Codex reviews completed cleanly with no accepted/actionable findings:
The implementation and complete test/documentation range were reviewed separately to respect the helper's per-diff size limit, without truncating or omitting files. The original frozen-tree runs both exited 0.
Real behavior proof
Current-head fix coverage: real loopback TCP regression cases send blank, malformed, oversized and prematurely disconnected HTTP upgrades, verify metadata-only unexpected-request diagnostics, connect the real Gateway client afterward, and verify clean server disposal. Polling regressions cover delayed probes, original timeout preservation, ordinary exceptions, app-liveness checks, and cancellation. These tests do not launch the desktop app.
Historical native application evidence:
DevBuild=false,System.Diagnostics.Debugger.IsSupported=false, and no attached debugger.afc3e9f7e616bde264ed78490e6738d0c1bbbd44. Full build/required tests, 22 real app/profile/MCP checks and final source review ran on that committed tree. Native UI evidence was collected from the identical production source in implementation commit7def9212; subsequent original-publication commits added tests/documentation and equivalent test-only cancellation argument formatting.run-gateway-fixture.ps1 -DurationSeconds 90exited 0; the generated profile and app process were both gone afterward. The same running app returned:{ "connectionStatus": "Connected", "overallState": "Ready", "operatorState": "Connected", "nodeState": "Disabled", "gatewayVersion": "fixture-1", "sessionCount": 5, "nodeCount": 0, "operatorScopes": ["operator.read"] }Security Impact
The explicit fixture guards suppress WSL keepalive/stale cleanup, Windows autostart writes and toast registration. Auto-start changes through local MCP also fail explicitly before saving. Normal isolated runs without the fixture flag retain their existing behavior. The supported workflow is browsing and safe local preferences, not a general OS sandbox.
Compatibility and Migration
OPENCLAW_GATEWAY_FIXTURE=1, isolated tray/setup roots, a dedicated MCP port, and safe fixture settings in the child process only. The app advertisesOpenClaw.GatewayFixtureIsolationVersion=1for preflight.Review Conversations