[codex] support persisted web resolution modes - #285
Merged
Conversation
patsyang
marked this pull request as ready for review
June 3, 2026 10:40
yl-jiang
added a commit
to yl-jiang/OpenHarness
that referenced
this pull request
Jun 5, 2026
Manually ported from main commit 257916d. Original: fix(web): support persisted resolution modes (HKUDS#285) - 新增 WebSettings 模型 (proxy / resolution_mode / synthetic_dns_cidrs) - 新增 config CLI 子命令 (show / set),支持持久化嵌套配置 - network_guard 重构为三模式验证:direct / proxy / synthetic_dns - 支持 OPENHARNESS_WEB_* 环境变量覆盖 - 适配 dev 分支:保留 max_children / _normalize_* 等独有代码, config show 使用 model_dump_json 替代 main 的 _settings_json_for_display Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
wmd-1
pushed a commit
to wmd-1/OpenHarness
that referenced
this pull request
Jun 15, 2026
yl-jiang
pushed a commit
to yl-jiang/OpenHarness
that referenced
this pull request
Jun 18, 2026
yl-jiang
added a commit
to yl-jiang/OpenHarness
that referenced
this pull request
Jun 18, 2026
Manually ported from main commit e9f0c09. Original: fix(web): support persisted resolution modes (HKUDS#285) - 新增 WebSettings 模型 (proxy / resolution_mode / synthetic_dns_cidrs) - 新增 config CLI 子命令 (show / set),支持持久化嵌套配置 - network_guard 重构为三模式验证:direct / proxy / synthetic_dns - 支持 OPENHARNESS_WEB_* 环境变量覆盖 - 适配 dev 分支:保留 max_children / _normalize_* 等独有代码, config show 使用 model_dump_json 替代 main 的 _settings_json_for_display Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
websettings for outbound web proxy and resolution behaviorauto,direct,proxy, andsynthetic_dnsURL validation modes innetwork_guardoh config setsupport for persisted nested settingsWhy
Some TUN/fake-IP environments resolve public domains to synthetic non-public CIDRs. The previous guard rejected those DNS results before the request, which made
web_searchandweb_fetchunusable in those environments unless every OpenHarness process manually supplied environment variables.This keeps the default strict direct-network behavior unchanged while allowing users to opt in once through persisted settings.
Validation
./.venv/Scripts/python.exe -m pytest tests/test_utils/test_network_guard.py tests/test_config/test_settings.py tests/test_entrypoints/test_config_cli.py tests/test_tools/test_web_fetch_tool.py./.venv/Scripts/python.exe -m ruff check src/openharness/utils/network_guard.py src/openharness/config/settings.py src/openharness/cli.py tests/test_utils/test_network_guard.py tests/test_config/test_settings.py tests/test_entrypoints/test_config_cli.py tests/test_tools/test_web_fetch_tool.py