fix(coding-agent): bound native web search fallbacks#203
Merged
Conversation
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
Vendor the bounded native web-search route discovery and endpoint hardening from
code-yeongyu/pi-websearchmergesff6db5ccbd73522d683aada9f0a365205fd1c2c6and06e3ec457e86d299c20808954e18f20b23cc7a64, and make native authentication discovery honor search cancellation.Before this change, aliases that reached the same native provider endpoint each became a serial fallback attempt. A search could spend minutes walking unavailable model aliases before reaching the configured provider. After this change, discovery emits at most one attempt per effective native route, keeps the active route first, preserves configured provider order, and aborts before or during native auth discovery.
Changes
AbortSignalinto native discovery and race pending auth resolution against cancellation while removing the listener afterward.QA / Evidence
auto:truewith a pre-aborted signal started six auth resolutions, and abort during pending auth timed out after 30 seconds. Artifact:.omo/evidence/pr203-abort-red.txt.8/8. Artifact:.omo/evidence/pr203-review-followup-green.txt..omo/evidence/pr203-dotted-route-red.txt.19/19. Artifact:.omo/evidence/pr203-dotted-route-green.txt.24.17.0, with provider credential variables stripped:405files passed,3,582tests passed,31skipped. Artifact:.omo/evidence/pr203-review-followup-coding-agent-full-corrected.txt.tsgo, exact-headnpm run build, and exact-headnpm run checkincluding Neo exited0. Artifacts:.omo/evidence/pr203-dotted-route-no-excuse.txt,.omo/evidence/pr203-dotted-route-build.txt, and.omo/evidence/pr203-dotted-route-full-check.txtplus the earlier targeted receipts.24.17.0: common isolation passed9/9, direct-source RPC passed4/4, and deterministic mock-loop passed5/5with zero real provider calls. Artifacts:local-ignore/qa-evidence/20260713-websearch-fallback-cascade-abort-followup/common.txt,rpc-direct.txt, andmock-loop-direct.txtin/Users/yeongyu/.codex/worktrees/senpi-pr203-final.local-ignore/qa-evidence/20260713-websearch-fallback-cascade-abort-followup/manual-web-search-surface.txtin/Users/yeongyu/.codex/worktrees/senpi-pr203-final..omo/evidence/pr203-dotted-route-manual-qa.txt.src/cli.tscoordinator and reproduces a pre-existing inherited-stdin timeout. The direct harness differs only by selecting the byte-identical-to-mainsrc/cli-main.tsruntime entry; the one-line diff and baseline classification are retained with the QA evidence.npm run checkreports 45 pre-existing repository-wide Biome information diagnostics while exiting0; none are in the task-changed files, whose targeted Biome and no-excuse checks are clean.Risks
AbortSignal; the web-search tool stops waiting immediately and never starts fetch or fallback work afterward.100.64.0.0/10are also a pre-existing lexical allowlist gap present onorigin/main; this PR does not expand that broader SSRF policy surface.Secret safety
Evidence contains no raw tokens, auth headers, cookies, environment dumps, or credentials. It records synthetic routes, masked auth hashes, and unchanged-auth receipts only.