Repository navigation
fix: preserve outbound provider policy when the current target is missing - #147939
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check could not safely complete for this revision. ClawSweeper will not retry this unchanged revision. Next step: No contributor action is requested. Maintainers should inspect the linked workflow run. |
|
Codex review: blocked before merge. Reviewed September 14, 2026, 5:46 AM ET / 09:46 UTC (Revision 5). ClawSweeper reviewWhat this changesPreserves cross-provider messaging restrictions during targetless continuations and recovery, keeps unbound CLI turns unbound, and updates regression tests, upgrade documentation, and a Docker fixture assertion. Merge readiness⛔ Blocked before merge - 1 item remains The fix remains necessary: current main and the latest release still bypass provider policy when the current target is missing. No actionable introduced defect was found. The discussion resolves the earlier upgrade-policy concern. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway carries a turn’s source provider into agent execution. Shared outbound routing uses that context and configured messaging policy to decide whether a message action may reach a channel transport. flowchart TD
A[Incoming turn or recovery] --> B[Gateway source context]
B --> C[Agent message action]
C --> D[Outbound provider policy]
E[Global and agent settings] --> D
D -->|Denied| F[Policy error]
D -->|Allowed| G[Channel transport]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +26, Tests +295, Docs +2. Total +323 across 13 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared policy owner and the explicitly accepted upgrade behavior, preserving existing global and per-agent opt-ins without adding another setting. Do we have a high-confidence way to reproduce the issue? Yes, from source: a guarded action with a different source provider and no current target returns before policy enforcement on current main. No tests or runtime commands were executed during this read-only review. Is this the best way to solve the issue? Yes. Moving provider enforcement ahead of target-dependent checks and carrying recovery source context through the existing owner repairs the gap while preserving explicit opt-ins and unbound CLI behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c665e63e221. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
The intended upgrade behavior is to enforce the existing provider policy consistently: successful targetless sends through the early-return gap do not retain an exception. The PR body and FAQ now state that upgraded workflows will be denied unless an existing explicit opt-in permits them. Added compatibility coverage in 23c043d using the existing Control UI recovery-claim shape. The test reconstructs the targetless WebChat source and calls the message-action runner with either a global opt-in or a per-agent opt-in overriding global denial. Both reach only the synthetic transport and pass; the full changed send-policy suite passes 15/15. Defaults, stored schemas, and live configuration are unchanged. Independent review of the complete updated candidate remains clean through P2. The first CI run's Control UI gzip budget failure is being checked on the updated head. The original compared trees have identical UI sources, packages, lockfile, and performance tooling; no budget or baseline exception was added. |
2efc0a6 to
c5009d0
Compare
Preserve correlated recovery source providers independently of complete delivery authority. Keep cross-provider defaults and explicit overrides unchanged across restart and requester-settle continuations.
The explicit WebChat route fixture depended on the missing-target policy gap. Verify both the denial without opt-in and the unchanged normal outbound route when explicitly allowed.
b136f1b to
7e4ef9c
Compare
|
Merged via squash.
|
…sing (openclaw#147939) * fix: enforce outbound provider policy without a current target Preserve correlated recovery source providers independently of complete delivery authority. Keep cross-provider defaults and explicit overrides unchanged across restart and requester-settle continuations. * test: preserve configured cross-provider opt-ins during recovery * test: cover provider policy on explicit source reply routes The explicit WebChat route fixture depended on the missing-target policy gap. Verify both the denial without opt-in and the unchanged normal outbound route when explicitly allowed. * fix: preserve unbound CLI messaging context * test: distinguish unbound and WebChat agent requests
What Problem This Solves
Fixes cross-provider message actions bypassing the configured policy when a turn retains its source provider but has no current conversation target.
User Impact
Provider restrictions apply consistently to ordinary, restarted, and requester-settle turns. Existing global and per-agent opt-ins retain their meaning, and genuinely unbound CLI requests remain unbound. No configuration or data migration is required. After upgrading, targetless cross-provider actions that previously bypassed the check are denied unless explicitly permitted; this intentionally enforces the documented default.
Why This Change Was Made
Provider mismatch is checked before target-dependent policy. Exact correlated recovery claims retain their source provider independently of complete delivery authority; a missing target does not grant an address, sender identity, or source-turn authority. Requester-settle already forwards channel-only origins and now has regression coverage.
The Gateway also stops treating an internal delivery fallback as a WebChat source for an unbound request. Tests cover real delivery planning, execution dispatch, command-context resolution, and Gateway RPCs. Genuine WebChat clients and explicit or remembered provider context retain their binding, while session/image forwarding, requested delivery, response ordering, and replay remain covered.
Evidence
Earlier full outbound validation passed 1,921 tests across 109 files; requester-settle delivery passed 308 tests. The final RPC, handler, execution-owner, and delivery follow-up suites passed 456 tests. The original implementation failed the missing-target and recovery regressions, and the unbound CLI cases failed before the compatibility correction. Existing global and per-agent opt-ins are covered with synthetic transports.
Changed-file checks passed, including core/test typechecks, lint, formatting, and repository guards. Independent Codex reviews through P2 have no unresolved actionable findings.
The broader hosted fallback reproduced a 6 GiB SDK-report heap failure and a mocked-UI cloud-reconciliation timeout. Both also occur on the unrelated test-only #148038 (baseline run); the UI scenario replaces Gateway WebSocket calls in the browser and does not execute the changed backend modules. These are recorded separately from this repair. Final regular PR CI passed on the exact published head, including the required aggregate gate (CI run).
Validation uses isolated state and synthetic transports. No live messaging, deployments, restarts, or configuration changes were performed.