Repository navigation
Conversation
Bind the existing creation dialog and request dispatch to the original authenticated epoch, validate complete create acknowledgements, and prove creation plus list refresh with unit and real-client fixture tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🦞👀 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 maintainer review before merge. What this changesThis PR binds agent creation to the dialog’s original authenticated Gateway connection and validates the complete creation acknowledgement. Example: Open Create agent on Gateway A, enter Research and ~/research, then switch to Gateway B.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this collaborator-authored draft fixes a source-confirmed connection-targeting bug still present on main; no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherWorkspace opens the native creation dialog, which passes a name and remote workspace path through AgentCreationService and the authenticated WebSocket client; the Gateway owns creation and the returned agent catalog. flowchart LR
A[Workspace selector] --> B[Creation dialog]
B --> C[AgentCreationService]
C --> D[Gateway client]
D --> E[Generation fenced socket]
E --> F[Gateway agent catalog]
F --> A
Technical reviewBest possible solution: Land the focused repair through the existing creation service and transport owners when the author considers the draft ready and its required checks pass. Do we have a high-confidence way to reproduce the issue? Current main resolves the Gateway client when CreateAsync runs rather than when the dialog opens, so switching connected Gateways before submission follows the replacement client; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch is a focused repair: it reuses the existing authenticated generation fence, preserves Gateway-owned workspace creation, rejects incomplete acknowledgements and adds no retry or competing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f6406247a0f7. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 23, 2026, 5:36 PM ET / 21:36 UTC. |
|
This pull request has been automatically marked as stale due to inactivity. |
PR cleanup reviewReviewed head: The creation-targeting defect is still present on main: the service resolves its Gateway when Submit runs, not when the dialog opens. This patch uses the existing transport generation fence and retains the Gateway as workspace owner. Keep it open. Before landing, reconcile the three current-main conflicts, refresh the original-client/reconnect and native-dialog evidence on the resulting head, and remove the draft hold through the authorized owner. Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass. |
|
Refreshing #1854 (fix: keep agent creation on its original Gateway connection) against current main in an isolated worktree. I will preserve the original client/authenticated-epoch binding and current-main identity contracts while resolving the architecture, interface and test conflicts. The existing draft/body and contributor history stay intact. Independent security-sensitive review precedes a non-force update to the original branch. Windows build/runtime proof is not yet verified on this Linux host; final results and any blockers will be recorded here. |
Preserve authenticated connection fencing alongside current identity APIs and test fixtures. Share the inherited epoch field in the profile test proxy. Co-authored-by: bkudiess <7658216+bkudiess@users.noreply.github.com>
|
Main refresh completed for #1854 (fix: keep agent creation on its original Gateway connection), with a non-force push to the original contributor branch. The PR remains a draft; its body and attribution are unchanged. This is not a ready-to-merge claim.
Conflict choices:
Validation on the new source tree:
New-head hosted Build and Test run 43296631248 is in progress, not passed. CodeQL 43296631270 and automatic ClawSweeper dispatch 43296630876 were also created. No CI rerun or re-review request was submitted. Handing back with Windows/current-head proof and CI outcomes still pending; removing the temporary actively-landing label. |
Related: #1834 (feat(chat): add scoped conversation Files, edits and diffs). Agent administration and agent-wide file editing are deliberately not duplicated here.
What Problem This Solves
Fixes: an open Create agent dialog can follow a replacement Gateway connection, and an incomplete creation acknowledgement can be presented as success.
User Impact
User impact: creation remains on the Gateway connection that opened the dialog; after reconnect or switching Gateways, close and reopen the dialog before creating an agent.
This is a bounded draft of the agents RPC category, not completion of all nine historical methods. Full-suite host failures and missing live Gateway proof remain visible below.
Why This Change Was Made
The existing production route stays Workspace assistant selector -> native creation dialog -> creation service -> Gateway client. The service now captures the original client/authenticated epoch; the transport checks the expected epoch before sending, and the service checks authority again before accepting the acknowledgement.
ok: true,agentId,name, andworkspacemust all be present with the expected types. No automatic retry or local workspace creation is added.The pinned Mac ownership rule keeps Gateway administration in Dashboard. This PR hardens the Windows creation flow already present rather than inventing a new native admin screen.
Evidence
125 focused cases pass, including 23 creation-service unit cases, three authenticated real-client socket-fixture cases, and 99 existing Workspace navigation/projection cases.
Current-head native fixture proof also passed 1/1, with no skips. The real native dialog submitted one acknowledged
agents.create, refreshed the server-issued agent in the selector, and retained the selected conversation and unsent draft. The populated dialog was inspected in an owned-window capture. The selector popup was verified by UI Automation; the main-window after-capture omits that separate popup and is not pixel proof of its contents.The real service and WebSocket client create a server-assigned agent, consume
RequestAgentsListAsync/AgentsListUpdated, and observe catalog growth from two to three agents without changing the default agent. Duplicate creation is rejected without catalog growth. Read-only scope and stale pre-reconnect dispatch epochs send no creation request. Unit cases cover changed client, reconnect/disconnect/scope loss while awaiting a reply, malformed acknowledgements and errors/timeouts without retry.Per-method reconciliation
Source baseline:
openclaw/openclaw@098e991549b7986bcfaebdbe427aeaaf95afb926. Static upstream references are not runtime proof.agents.createagents.listagents.files.listagents.files.getagents.files.setagents.updateagents.deleteagents.workspace.listsessions.files.listagents.workspace.getagents.avatar.generateThis seam adds evidence for creation and catalog refresh. Seven historical methods remain unverified, including five without a direct Windows production call. It does not claim that the overall cross-category unrecognized-wiring target has been met.
Contracts: creation, list/update/delete, editable files, workspace browser. Native Mac catalog callers: QuickChat and session actions.
Independent
rubber-duckreview examined production reachability, epoch/authority handling, acknowledgement validation and proof limits. No blocking findings. Duplicate permission checks are intentional defense in depth; valid creation results requireok:true, while Gateway rejection envelopes already propagate as exceptions. Runtime-selected reviewer model identity is unverified. Shared autoreview helper is not installed; no helperscoped-cleanverdict is claimed.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: existing native agent creation and selector refresh must remain usable against an isolated fixture.No WSL/MXC, installer, native dependency, GPU or architecture-specific behavior is changed. An ARM64 build is reported as the host used, not a separate release compatibility claim.
Validation
OPENCLAW_REPO_ROOTwas set to this task's isolated worktree before tests..\build.ps1: passed twice, all five projects, Debugwin-arm64.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: initial run failedNETSDK1004because this fresh worktree lacked test assets. After restoring withdotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj, 4,642 passed / 1 failed / 26 skipped. Exact no-restore rerun: 4,641 passed / 2 failed / 26 skipped. Failures: knownMxcFolderAdmissionTests.OwnedJunctionAndSymbolicLinkAreRejectedWithoutFollowingTheirChildren(symbolic: True)privilege denial; unrelatedMcpHttpServerTelemetryTests.ShutdownWhileWaitingForHandler_RecordsShutdownNotBusyOrTimeouttelemetry wait timeout.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --filter FullyQualifiedName~McpHttpServerTelemetryTests: 16 passed / 0 failed / 0 skipped. The original full-suite failure is retained, not converted into a full-suite pass.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 4,511 passed / 4 failed / 0 skipped, same result on both full runs. Failures are the four known ARM64BuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolverbaseline cases.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~BuildPrerequisiteTests: 0 passed / 4 failed, confirming those baseline cases without modifying prerequisites.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~AgentCreationServiceTests|FullyQualifiedName~WorkspaceNavigationTests': 125 passed / 0 failed / 0 skipped..\scripts\validate-docs.ps1: passed, 66 Markdown files..\scripts\validate-agent-skills.ps1: passed, 12 skills / 21 Markdown files.git diff --check: passed.dotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false: passed, after an initial--no-restoreattempt reported missing fresh-worktree assets; one pre-existing generatedIcondeprecation warning.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --no-build --no-restore --filter FullyQualifiedName~NewAgentUsesGatewayCreationAndRefreshesWithoutReplacingConversation: 1 passed / 0 failed / 0 skipped, 26 seconds. Fixture/screenshot environment selected the explicit freshly built app, isolated artifact root and screenshot opt-in.No privileged installation, timeout weakening, baseline test edits, shared runtime changes, or monitor/policy changes were made. Pre-fix execution was not collected; regression inputs were characterized from original source, not presented as an executed baseline.
Real Behavior Proof
ce446d2ef28e2be7a913498483207240153ff1a9; initial build/test runs used identical production source before commit, with source hashes manually recorded. The native UI project subsequently rebuilt the app from this committed head; the fixture recorded the exact executable and assembly hashes.RealClient_CreatesAndListsOnlyWithAdminAuthorityandRealClient_ReconnectionRejectsOriginalDialogAndOriginalDispatchEpochrun the production creation service/client through actual socket handshake, create and tracked catalog requests.Passed! - Failed: 0, Passed: 125, Skipped: 0, Total: 125; all three real-client fixture cases executed. Native rune3a1cac1625942258424cc7716fc8cc6also passed 1/1. Its request log records one successfulagents.create, four successfulagents.list, no failed requests, nosessions.create, and no unexpected fixture requests.fixture-created; tracked list refresh returns three agents including server-confirmedResearch; duplicate rejection leaves three. Native UI Automation observedFixture Created, fixture-createdin the refreshed selector while retaining the 240-message conversation andKeep this draft while creating an agentdraft. The inspected ready-dialog capture visibly containsFixture Created,/fixture/new-agent, and an enabled Create agent action. The main-window after-capture omits the selector popup, so it is not claimed as pixel proof of the popup's contents. The owned fixture disposed its app; no matching task-owned app process remained, and the desktop lease was released.Yes/No/N/A): N/A. Local TRX/evidence artifacts are retained but not presented as public links.Evidence source identities (SHA-256)
schema/agents-create.ts:df74cc336e706d932275086b67d379750be7b0f5af132b0678d72e65355b1a70.server-methods/agents.ts:b82850bdc4da32ddf18f92e6b1453f5526f55593914c661a5fda7854a78abd99.AgentCreationService.cs:a604e71515d1a2c6ea2e17a8e410eb949b11476705370ca1d3a7fd21ff652ea5.OpenClawGatewayClient.cs:010f311ca05fc94f6b448647fded1746d8267f9665f5252d5171ff934a7960a2.AgentCreationServiceTests.cs:a6faa0fa737c6fda86203ab5c25e90214e4b2abca2d94eda4fe143331304a722.GatewayFixtureUiTests.cs:f88a4f2aa4e489ca7e02a037f4d9ad5d679f248f2fdc125d8a405117588823bf.2ab42c8bf51e84a91759567ea3ce1007d007340ee5ccf0d840c3a88bb520b485.2e6c639c6836c23ec3520fba3764dc13742038b1e810543c9d3966518312d73b.6c3b2e071fc397b2252b4134e93c2a43bf21777dd7d160f7e017cd73411d122d.37d527f73eddd2a9f0bfb3056329b5f80e6da8cbeeacce4a80e9cd0cf3894161.Security Impact
Yes/No) No.Yes/No) No.Yes/No) Yes, existingagents.createnow uses connection-bound dispatch.Yes/No) No.Yes/No) No.Yes, explain the risk and mitigation: administrator scope is checked at admission and dispatch; a changed connection epoch fails before send. An uncertain acknowledgement is not retried. Remote workspace paths are never resolved or created on Windows.Compatibility and Migration
Yes/No) Yes for the supported creation result contract; malformed/incomplete acknowledgements now fail closed.Yes/No) No.Yes/No) No.Review Conversations