[WRONG BRANCH] fix(minimax): keep MMX bridge traffic on loopback - #294
[WRONG BRANCH] fix(minimax): keep MMX bridge traffic on loopback#294luvs01 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe MiniMax text bridge now forces requests through the configured loopback upstream origin instead of inherited proxy settings. Integration coverage verifies direct routing when HTTP, HTTPS, and SOCKS proxy variables are present. ChangesMiniMax proxy isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The bridge now keeps upstream traffic on the selected loopback listener, with regression coverage for proxy-related egress and successful focused checks; no actionable merge-blocking risk remains beyond normal review. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
|
Superseded by lidge-jun#1845, which ports this fix onto current |
Motivation
fetch, which can honorHTTP_PROXY/HTTPS_PROXY/ALL_PROXYand route intended loopback traffic off-machine.Description
startMmxTextBridgethe bridge now constructs an explicitRequestfor the upstream and callsfetch(upstreamRequest, { proxy: { url: upstreamOrigin } })to force the hop to the chosen loopback OpenCodex listener instead of relying on the parent process global fetch behavior.tests/fixtures/minimax-bridge-direct.tsthat runs a bridge, an upstream, and a simulated attacker proxy and records upstream body and proxy hits.tests/minimax-clients.test.tsthat spawns the fixture with proxy environment variables set and asserts the bridge reaches only the local upstream and that the external proxy receives no requests.Testing
node_modules/.bin/bun test tests/minimax-clients.test.tsand the new regression passed.bun run typecheck(bun x tsc --noEmit) and it succeeded.bun run privacy:scanand it succeeded.bun run testrun; focused checks and static checks passed but a full-suite run experienced unrelated timing-sensitive failures/timeouts in other tests and was not used as the gate for this focused change.Codex Task
Summary by CodeRabbit
Bug Fixes
Tests