Skip to content

fix(claude): keep the NO_PROXY receipt across a failed removal, and doc follow-ups (#6936) - #6952

Merged
lidge-jun merged 2 commits into
devfrom
codex/claude-intercept-noproxy-followups
Oct 11, 2026
Merged

lidge-jun merged 2 commits into
devfrom
codex/claude-intercept-noproxy-followups

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-up to #6938 (refs #6936), which was merged at head 3588bb4a5 while these review fixes were in progress. This lands CodeRabbit's four findings on that head, plus the follow-up review of the first fix.

  • Receipt survives a failed removal. removeClaudeInterceptSettings invalidates the NO_PROXY receipt before writing settings.json. If that write fails, the removal did not happen, so the receipt is put back and a later removal can still restore the user's value. The settings write is now split into a persist step and catalog invalidation, and only the persist step is covered: once settings.json has changed, the episode is over and the receipt stays gone.
  • 405 wording. The proxy's 405 body lists 0.0.0.0 under "loopback and unspecified hosts" rather than as loopback.
  • Docs accuracy. The English Claude Code guide and structure/runtime.md now say the original NO_PROXY comes back only when OpenCodex could record it and it was not changed since; otherwise the current value, including the added entries, is kept.
  • Translations. The fr, ja, ko, ru, tr, zh-cn and zh-tw Claude Code guides gain the loopback NO_PROXY guidance from the English guide, with the same conditions.

Verification

  • bun test on the 14 directly affected files (including the new claude-intercept-no-proxy oracles O13 and O14): 355 pass, 0 fail.
  • Red-green: removing the receipt restore turns O14 red ("an uncommitted removal keeps the episode, so a retry restores the user's value"); sources were restored byte-identical.
  • bun run typecheck, bun run structure:check, bun run privacy:scan: pass. docs-site bun run build: complete.
  • Independent review: a gpt-6.1-sol reviewer returned GO-WITH-FIXES with 0 blockers and no High/Critical security findings; its one Medium (the failure oracle must keep settings intact and prove a retry) is folded in as O14.
  • The branch is a cherry-pick of the two follow-up commits onto current dev; the changed lines match the original follow-up diff exactly.
  • Full bun run test was not run locally (shared machine, load-sensitive timing tests seen earlier); CI covers it on this head.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. The receipt holds only NO_PROXY values; every receipt mutation passes the real-home guard; the 405 body is static.

Summary by CodeRabbit

  • New Features
    • Claude Code’s first-party mode now adds common local addresses to NO_PROXY, allowing local MCP servers—including *.localhost hosts—to bypass the proxy. Existing entries are preserved, and only missing addresses are added.
    • When first-party mode is disabled, the original NO_PROXY value is restored only if it was recorded and hasn’t changed; otherwise, the current value is kept.
  • Documentation
    • Updated Claude Code setup guidance across supported languages with details about local proxy bypass and restoring NO_PROXY settings.

jun added 2 commits October 11, 2026 06:55
Review follow-ups on #6938:

- A removal whose settings write fails has not ended the ownership
  episode, so it now puts the receipt back before rethrowing; a later
  removal can still restore the user's NO_PROXY.
- The proxy's 405 body labels 0.0.0.0 as an unspecified host rather
  than loopback.
- structure/runtime.md states that restoration needs the receipt, and
  what happens when it could not be written.
- The seven translated Claude Code guides now carry the loopback
  NO_PROXY guidance from the English guide.

Refs #6936
…mmit (#6936)

Review follow-ups on b796729:

- Split the settings write into persist and catalog invalidation.
  Removal now puts the receipt back only when the persist step itself
  fails; once settings.json has changed, the episode is over and the
  receipt stays gone. A test seam replaces just the persist step.
- Oracles: an uncommitted removal keeps settings and receipt intact and
  a retry restores the user's value; when the receipt cannot be put
  back either, the original settings error still surfaces.
- The English guide, the seven translations and structure/runtime.md
  now say the original value comes back only when OpenCodex could
  record it and it was not changed since.

Refs #6936
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 11, 2026 13:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T13:57:47.608285Z bae8eb3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a5a73f21-3e85-4106-abbc-57e814e5eddf

📥 Commits

Reviewing files that changed from the base of the PR and between c3a4cdf and bae8eb3.


📒 Files selected for processing (12)
  • docs-site/src/content/docs/fr/guides/claude-code.md
  • docs-site/src/content/docs/guides/claude-code.md
  • docs-site/src/content/docs/ja/guides/claude-code.md
  • docs-site/src/content/docs/ko/guides/claude-code.md
  • docs-site/src/content/docs/ru/guides/claude-code.md
  • docs-site/src/content/docs/tr/guides/claude-code.md
  • docs-site/src/content/docs/zh-cn/guides/claude-code.md
  • docs-site/src/content/docs/zh-tw/guides/claude-code.md
  • src/claude/intercept/connect-proxy.ts
  • src/claude/intercept/settings.ts
  • structure/runtime.md
  • tests/claude-integration/claude-intercept-no-proxy.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

Claude NO_PROXY guidance now covers local proxy exclusions and conditional restoration. Settings removal also attempts to restore its receipt when persisting the updated settings fails.

Changes

Claude NO_PROXY handling

Layer / File(s) Summary
Receipt rollback on persistence failure
src/claude/intercept/settings.ts, tests/claude-integration/claude-intercept-no-proxy.test.ts, structure/runtime.md
Settings persistence can be replaced in tests. If removal cannot persist settings, it attempts to restore the captured receipt and rethrows the write error. Tests cover retry after a failed write and failure to restore the receipt.
NO_PROXY host guidance
src/claude/intercept/connect-proxy.ts, docs-site/src/content/docs/guides/claude-code.md, docs-site/src/content/docs/*/guides/claude-code.md
The proxy guidance includes 0.0.0.0. The documentation describes automatic local NO_PROXY entries and conditional restoration of the original value.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix


Merge Risk: ⚪ Minimal · up to bae8e

No merge-blocking issue is identified for the receipt rollback and NO_PROXY guidance changes; merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (9 skipped: 9… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: preserving the NO_PROXY receipt after failed removal, with documentation follow-ups. It is specific, concise, and related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (9 skipped: 9 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev at exact head bae8eb39e3662a8e410db135028f85540f135c76, by lidge-jun (admin), under the dev-only maintainer-integration policy in MAINTAINERS.md. This is not a self-approval.

  • Cross-platform CI run 38145112864, event pull_request, attempt 1, conclusion success. Linux test 1/4 to 4/4, Windows 1/9 to 9/9, gates, the ci aggregate, docker smoke, docs site build, structure gate, storage policy, api usage, keyring and npm-global all succeeded. The macOS legs, desktop shell, setup action, remote helper and privacy gate were skipped by design (native-gated, path-gated, or covered by gates).
  • Catalog async contracts 38145113013, React Doctor 38145112996 and PR hygiene: success. enforce-target and label each had a first pull_request_target run cancelled; later runs of the same workflows on this head (38145250459, 38145250502) succeeded.
  • CodeRabbit: success. Codex review: complete, no inline findings. No outstanding maintainer change requests.
  • scripts/ci/assert-mergeable-review.sh --maintainer-integration 6952: OK snapshot at this head.
  • Independent review: a gpt-6.1-sol reviewer returned GO-WITH-FIXES with 0 blockers, and its security lens raised no High/Critical findings. Its one Medium is folded in as oracle O14.

@lidge-jun
lidge-jun merged commit e1a2684 into dev Oct 11, 2026
44 of 46 checks passed
@lidge-jun
lidge-jun deleted the codex/claude-intercept-noproxy-followups branch October 11, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant