Repository navigation
Conversation
Local review checkpoint for origin-scoped send admission, memory-only custody and receipt reconciliation. Scoped model/preparation transport and final closeout follow in this task branch. Co-authored-by: Copilot App <[email protected]>
Keep Files and Canvas declarations in independently owned partials. Co-authored-by: Copilot App <[email protected]> (cherry picked from commit 3cb8aae)
Keep omitted advertisements waiting, reset facts per transport, and retain cloned Gateway code/details without changing InvalidOperationException catch compatibility. Update rejection assertions to the precise response subtype. Co-authored-by: Copilot App <[email protected]> (cherry picked from commit b72a644)
…text Preserve receipt-only streaming identity, qualify first-turn continuations, and keep uncertain setting outcomes from unblocking sends. Preserve the legacy four-argument request path and restrict local cancellation to unsent or failed rows. Co-authored-by: Copilot App <[email protected]>
Capture the reset generation atomically and apply the scoped write boundary to every provider abort path, including late acknowledgement cleanup. Co-authored-by: Copilot App <[email protected]>
Seed the captured incarnation from the same accepted session snapshot and preserve reset-cleared UUID fencing. Exercise the real socket interleaving and retain equivalent typed-send and canonical cancellation source guards. Co-authored-by: Copilot App <[email protected]>
…d list Honor the accepted gateway snapshot before seeding initial session incarnations. Cover a newer UUID arriving before an older cached Load without weakening the send guard. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 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 real behavior proof before merge. What this changesThis PR separates immediate steering from deferred input and retains uncertain sends for receipt-based recovery. Example: A controller submits “Focus on tests” while run root-42 is active.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 6 items remain Keep this maintainer-authored draft open: it adds distinct functionality, but two introduced chat regressions block merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe native composer passes submissions through conversation and queue state to the authenticated Gateway socket; acknowledgements, receipts, and live events update payload ownership and the transcript. flowchart LR
Composer[Native composer] --> Controller[Composer controller]
Controller --> Provider[Chat provider]
Provider --> Queue[Conversation and queue state]
Provider --> Socket[Gateway socket client]
Socket --> Gateway[Authenticated Gateway]
Gateway --> Provider
Technical reviewBest possible solution: Complete recovery in the existing timeline and controller, distinguish profile refresh from account replacement, and bind final writes to the actual conversation owner's current authority. Do we have a high-confidence way to reproduce the issue? Source tracing establishes both introduced failure paths; no target code was executed during this read-only review. Is this the best way to solve the issue? The existing ownership boundaries and exact receipt reconciliation are appropriate, but activating changed ordinary-send behavior before recovery UI and canonical origin integration is incomplete. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ca63eb746bf. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Final socket checks exist, but canonical account and environment authority remains unverified. 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 22, 2026, 10:58 AM ET / 14:58 UTC. |
Related: #1828 (fix(chat): reject stale sends and approvals after reconnect).
Stacked on its exact frozen
5691fc16bb812d71966f776f936536c7512c9f60.Maintainer access: this is a same-repository upstream PR. GitHub rejects its
fork-only "Allow edits" toggle on same-repository PRs; maintainers with repository
write access can edit the branch.
What Problem This Solves
Inputs sent during an active response need distinct immediate and deferred behavior without duplicate sends after uncertain delivery.
User Impact
This draft establishes native controller/provider support for immediate Steer, separately deferred Queue, exact-root Stop, and retained uncertain input. Local Cancel is available only for Queued/Failed rows, not Gateway-owned Accepted or Unconfirmed input.
Integration limits: new native action buttons, action preferences/alternate keyboard behavior, genuine conversation-only origin construction, and full canonical account-qualified data/cache provenance are not complete here. This is not a claim of full web-chat parity or real backend steering.
Why This Change Was Made
The provider retains immutable input ownership until positive receipt/message evidence. Recovery reads exact input IDs; omission is not proof of non-delivery and never triggers a fresh-ID replay. Steer ACKs do not replace the active response's Stop target. Receipt-only recovery preserves active streaming entry identities.
Captured mutation origins are checked again under the real socket semaphore before send, model/effort updates, preparation, and abort writes. Pre-write refusal differs from a possibly applied mutation. External prompts require an actual owner lease, cannot borrow the composer, and reject slash commands or implicit retargeting. First-turn continuation requires the accepted-create materialization receipt.
New wire fields require the advertised
chat-input-custody-v1marker and write authority. The marker describes transport, not backend injection or exactly-once delivery. openclaw/openclaw#180651 is a separate draft dependency, not consumed runtime proof.Canonical READ/history/live/catalog/cache provenance is an actively assigned separate producer slice. Its exact READ-only registry hook was reviewed separately and is not imported into this control PR. Server-pending exact cancellation and adoption/fencing of #1757 (fix(chat): show live progress and interactive agent questions) remain explicit integration stages.
Evidence
Current candidate:
8b629d8d399c765dda5552aa809eb3af6ea74e14, clean tree70b880babcfe6018b2a1e8b1dc89a3718a3fe252.Real-socket regressions cover stale/throwing predicates after a held send lock, no target frame, removed pending entries, structured rejection, lost-ACK uncertainty without replay, real provider/client read-lock contention, and stale aborts. Production-provider fixture coverage includes an identical session UUID arriving mid-send without retiring the legitimate first-send lease; foreign/reset-cleared UUIDs remain fenced. Focused correction batch: 98 passed, 0 failed, 0 skipped.
The independent review's stale cached-load ordering finding is fixed: a gateway-accepted newer UUID/model cannot be rolled back by an older cached Load. Its focused batch passed 87 cases with no failures/skips.
Designated independent whole-source review and proof-plan challenge: source-only DRAFT readiness; its P2 stale cached-load finding is fixed and source-cleared on this exact head. Full closeout passes below. Native component/MCP, signed real Gateway custody/recovery, and backend same-run inference remain blocked, not substituted by fixture tests.
Lock direction and compatibility audit
Permitted integration order is socket
_sendLock, provider state, manager snapshot read, client session-list read, then profile/revision. Non-nested reads release their locks between stages. In this source, provider state is released before external currentness and rechecked in a separate transaction.WebSocketClientBase.cs:109,834-902ChatConversationState.cs:14,32,787-824GatewayConnectionManager.cs:214,ConnectionStateMachine.cs:10OpenClawGatewayClient.cs:51,196,4692,4716,4773_sessionsLockbefore subscriber events.PendingRequestRegistry.cs:63,138-207,258,278,301The receive loop resolves registry entries after their gate is released. Session parsing/state updates do not call send while holding
_sessionsLock; events follow release. Source guards inChatInputLockContractTestsenforce state-owner no-network/no-wait, session/registry no-send/no-event/no-TCS-completion under lock, and no unscoped provider abort path.The legacy four-argument request wrapper retains its virtual transport and exception behavior. The additive non-null scoped overload shares its registry/core, uses the final socket guard, and preserves explicit GatewayRequestException rejection. No parallel request map or auth cache was added.
The future genuine canonical origin is still unverified. These source/socket checks do not establish remote atomicity, a complete account-qualified data origin, or native visual proof.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: current-head queue/footer accessibility and native action integration. Not executed; no proof slot allocated and TOP action/origin composition is not implemented.windows-wsl-gateway-e2e: actual authenticated Gateway custody, recovery and exact Stop path. Not executed; lab has no qualified running service and its portable offline dependency closure is blocked.Validation
All commands use this worktree as OPENCLAW_REPO_ROOT and isolated tray data,
roaming and local roots. No shared runtime or production credentials were used.
Per-process
ProduceReferenceAssembly=false,UseSharedCompilation=false,BuildInParallel=false,MSBUILDDISABLENODEREUSE=1andDOTNET_CLI_USE_MSBUILD_SERVER=0work around observed zero-filled SDK referenceassemblies without repository build-configuration changes.
.\build.ps1with the per-process properties abovedotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore -m:1 -p:UseSharedCompilation=false -p:BuildInParallel=false -p:ProduceReferenceAssembly=false --logger "trx;LogFileName=results.trx" --blame-hang-timeout 120s --blame-hang-dump-type none --verbosity quietdotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore -m:1 -p:UseSharedCompilation=false -p:BuildInParallel=false -p:ProduceReferenceAssembly=false --logger "trx;LogFileName=results.trx" --blame-hang-timeout 120s --blame-hang-dump-type none --verbosity quietdotnet test .\tests\OpenClaw.WinNode.Cli.Tests\OpenClaw.WinNode.Cli.Tests.csproj --no-restore -m:1 -p:UseSharedCompilation=false -p:BuildInParallel=false -p:ProduceReferenceAssembly=false --logger "trx;LogFileName=results.trx" --blame-hang-timeout 120s --blame-hang-dump-type none --verbosity quietThe CLI project initially needed restore assets; it was restored and the full
build, Shared, Tray and CLI commands were all rerun successfully on this exact
clean source. An intervening GitVersion invocation failed; the final normal
build passed without a versioning bypass. Earlier-checkpoint results are not
used as final closeout. Safe metadata for both real tray profile roots was
unchanged across validation: 31145 files, zero metadata differences. No app,
Gateway, shared service or production credential was borrowed.
Real Behavior Proof
8b629d8d399c765dda5552aa809eb3af6ea74e14.Yes/No/N/A): N/A. Local TRX/logs exist but are not public attachments.@babel/[email protected]. Signed auth, users.self, receipt recovery and exact Stop are not live-verified. No credential or backend borrowing.Security Impact
Yes/No): No.Yes/No): No.Yes/No): Yes.Yes/No): Yes.Yes/No): No.Yes, explain the risk and mitigation: existing authenticated chat.send/history/abort and session preparation/patch calls carry scoped context and additive advertised-contract fields. Existing queue-list output may include Accepted/Unconfirmed; local cancellation fails closed. External prompt admission rejects stale context and lifecycle slash commands. Unknown account payloads remain memory-only per real client/epoch, with no automatic reconnect replay or new durable cache. Ordinary account-qualified data provenance remains an explicit separate P1 stage.Compatibility and Migration
Yes/No): Yes for ordinary legacy requests and their four-argument transport behavior. Explicit new modes require the marker; absent means older/unknown support, never an inferred release floor.Yes/No): No product configuration change.Yes/No): No.Review Conversations