Repository navigation
fix(proxy): keep WebChat and Codex loopback calls direct - #154013
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 rejected material in this revision. No detected value, path, or scanner output is reproduced here. ClawSweeper will not retry this unchanged revision. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
In 9.4, 8169aac added the native Codex loopback inference relay while managed proxy routing still cleared NO_PROXY. Use Proxyline's shared bypass policy and supply loopback exclusions to native children. Explicit proxy/block modes remain unchanged. Doctor reports failed loopback probes with recovery commands. Fixes #153930. Reported by @eefreenyc.
bc041be to
630e6f5
Compare
Keep default loopback routing direct after canary readiness and assert that external requests still reach the proxy. Attribute readiness failures to the proxy only in explicit proxy mode. Keep the TUI client and proxy lifecycle in one module generation after mock resets, assert the full block-mode recovery message exactly once, and verify the inherited policy at Gateway WebSocket construction. Include the existing test-only outbound custody repair from c159663 (#154123), preserving nested maintenance, physical exclusion, native writability, failure causes, and migration receipts without longer budgets. Related: #153930
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (49 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (44 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
…4013) * fix(proxy): keep native runtime loopback requests direct In 9.4, d6bd911 added the native Codex loopback inference relay while managed proxy routing still cleared NO_PROXY. Use Proxyline's shared bypass policy and supply loopback exclusions to native children. Explicit proxy/block modes remain unchanged. Doctor reports failed loopback probes with recovery commands. Fixes openclaw#153930. Reported by @eefreenyc. * fix(proxy): align loopback diagnostics and client regression coverage Keep default loopback routing direct after canary readiness and assert that external requests still reach the proxy. Attribute readiness failures to the proxy only in explicit proxy mode. Keep the TUI client and proxy lifecycle in one module generation after mock resets, assert the full block-mode recovery message exactly once, and verify the inherited policy at Gateway WebSocket construction. Include the existing test-only outbound custody repair from f5b7014 (openclaw#154123), preserving nested maintenance, physical exclusion, native writability, failure causes, and migration receipts without longer budgets. Related: openclaw#153930 * test(proxy): remove userinfo from Doctor fixture
Closes #153930. Thanks @eefreenyc for the report and proxy-environment comparison.
What Problem This Solves
Fixes WebChat/native Codex loopback 502 and handshake failures after upgrading a managed-proxy installation from 9.3 to 9.4/9.5.
User Impact
Default managed routing keeps runtime loopback HTTP/WebSocket listeners direct while external requests still use the proxy. Explicit
proxyandblockmodes remain enforced. Doctor reports failed loopback probes with recovery commands, and update-readiness diagnostics identify the route correctly. No new configuration option or migration is required.Why This Change Was Made
Commit
8169aacdda92, first shipped in 9.4, added a native Codex loopback inference relay while managed routing still clearedNO_PROXY. The shared Proxyline bypass policy and loopback exclusions for native children repair that boundary. Per-request registrations are no longer needed; retained callbacks still enforce explicit block policy.The CI follow-up preserves that routing contract. Main's wildcard-listener change
192ff574a21concerns TCP readiness, and7723e490386concerns Doctor completion/cleanup; neither calls for sending default loopback traffic through an external proxy.Evidence
CI attached to head
e5310014ee9386015eb0ea896d0c5975cfc9f8f6: run 35557127865, in progress at handoff.Input-safety fixture follow-up: replaced the Doctor test proxy URL containing username/password userinfo with an unauthenticated reserved
.testURL. Production code and assertions are unchanged. All 17 Doctor tests passed, with a longest case of 148 ms; local wrapper wall time was 195.80 s, including 116.886 s preparing the shared subprocess bundle (11,195 inputs / 15,060 outputs). The initial local build could not execute tests because the pre-rebase install had fs-safe 0.16.0; restoring the existing frozen lockfile installed the declared 0.17.0 without source/lockfile edits. Scoped formatting, lint, and fresh P1 autoreview passed. Exactly one re-review request was posted for this revision.Testbox proof: owned Linux runner. All 197 focused tests passed. The four original CI shard selections each passed three replays in their original order, totaling 15,822 passing cases per replay. TUI and outbound-custody files each passed 20/20 standalone reliability runs after fixing their causes. The new direct-probe diagnostic regression was also demonstrated failing against the original readiness implementation.
Final
node scripts/check-changed.mjscompleted with exit 0, including core/test typechecks, formatting, lint, guards, and all three dead-export scans. The first gate caught the TUI fixture's unsupportedPromise.withResolvers; replacing it with the existingcreateDeferredhelper was followed by a fresh TUI run (18 passed) and the complete green gate. Fresh P1 autoreview: scoped-clean, no accepted/actionable P0 or P1 findings. The owned Testbox is stopped; its wrapper's successful exit/timing evidence is authoritative if lease cleanup marks the Actions container run cancelled.Measured focused-file wall time with one worker on Testbox:
src/tui/gateway-chat.test.ts(final corrected run)src/infra/update-candidate-canary.test.tssrc/gateway/client.test.tssrc/infra/state-migrations.outbound-custody.test.tssrc/infra/state-migrations.outbound-preparation.test.tsThe test interdiff is +143/−101 lines (net +42); the production interdiff is detailed below.
src/tui/gateway-chat.test.tssrc/infra/update-candidate-canary.test.tssrc/gateway/client.test.tssrc/infra/state-migrations.outbound-custody.test.tsc159663b126). The 90-second failure came from a fixture running four broad Doctor sweeps. Reuse the focused nested-maintenance test repair, preserving native writability, physical exclusion, exact acquisition/disposal causes, and receipt coverage. Deadlines are unchanged.The production interdiff against
630e6f50dd9is +6/−2 lines, solely insrc/infra/update-candidate-canary-readiness.ts: proxy attribution now comes from the effective mode rather than the removed registration's return value. No routing-policy narrowing was needed.Initial proof remains: 75 focused tests, routing and Doctor regressions demonstrated failing before the fix, and an isolated real-Gateway/native-Codex turn completed in 15.144 seconds with zero loopback proxy attempts and four external proxy connections to a scripted provider. Cleanup confirmed the owned Gateway stopped.
Known separate defect: the first isolated attempt spent 70.3 s reaching Gateway readiness, then failed with
codex app-server request timed out. Native model discovery applies its 2.5 s acquisition budget atextensions/codex/src/app-server/model-catalog.ts:126; the timed scope inrequest.ts:308includes app-server preparation and startup before catalog reads. The exact expired phase was not captured. This is assigned to a separate native-startup budget repair lane; the successful instrumented turn is proxy-routing evidence, not a repair of that timeout.Landing review disposition
The latest ClawSweeper comment (5752252448, updated 2026-09-21 02:20:59 UTC) reports that its input-safety check blocked review; it contains no completed verdict or Rank-up moves. There are therefore no Rank-up changes to apply or skip. The native ClawSweeper gate reports
completed review is missing or expired, so landing is stopped pending maintainer qualification of the flagged material and a completed review. This does not assert that the material is a real credential or a safe fixture. No source changes or test reruns were made during this landing attempt.