Repository navigation
refactor(launcher): collapse per-client route-discovery copy into shared family helpers (#1440 P3) - #2453
Merged
Conversation
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2724-pr.2453.f685385This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2453.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
[bot] 🏷 Review 结论:可合(对当前 master 64443f9 mergeable=true、无冲突;唯一红 CI 是无关的既有 flake,详见下)。独立验证全部完成,证据如下。 结构化八问
CI 状态
其他观察(不阻塞本 PR)
测试有效性与 diff 整洁度
判定:可合。 flake lane re-run 转绿后即可由人合并(合并权在人,我不代操作)。 |
…red family helpers (#1440 P3)
ranxianglei
force-pushed
the
2026-10-09_launcher-route-discovery
branch
from
October 9, 2026 13:46
f733e1b to
a0aee93
Compare
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.192-master.bf2b48b # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 9, 2026
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.
What
Pure-restructure of per-client route discovery in
src/launcher.ts(discoverRoutes) — P3-A of the redundancy audit (#1440). The four copy-paste client families are collapsed into shared module-private helpers; no behavior change.interface DiscoverAcc+ three private helpers (no new exports):relayWrapRoute(acc, cfgRaw, fallback, key)— relay-wrap semantics (claude/codebuddy/gemini/iflow/antigravity), byte-for-byte.addStaticHosts(acc, hosts, stripPort)— static-host whitelist semantics (qoder/trae/jcode/qwen/copilot/amp/crush/zed).addProxyUrlSet(acc, urls, keyPrefix, skipWrappedLoopback, anonCountsAll)— proxy URL-set walk with loopback carve-out (dsh/kimi/mcode/aider).acc.*: classify closure, pi/opencode/omp one-liners, codebuddy modelUrls MITM loop, hermes, goose, codex else-branch, crush/zed custom-baseUrlshttps-only loops, kimi/mcode/aider fallback loops.src/launcher.ts, +161/−267).Documented deviation from the naive helper signature
addProxyUrlSettakes a 5th parameteranonCountsAll: dsh increments itsdsh-<n>counter for every unique parseable URL before the loopback test, while kimi/mcode/aider increment only inside it. A 4-param helper cannot reproduce both counter behaviors exactly.Verification (zero behavior change proven, not assumed)
discoverRoutesover all 24 launch clients × (empty config + 117 targeted fixtures exercising every family variant: wrapped loopbacks, port-suffixed hosts incl.host:443, mixed URL ordering/dups, kimi provider/modelUrls/envUrls matrix, empty-fallback cases, crush/zed baseUrls, goose customProviders, codex classify variants) → 141/141 entries byte-identical before vs after (diff empty; re-run independently by the reviewer).tsc --noEmitclean,npm run buildclean,check:unused-exportsclean (run on the staged file).Out of scope (queued follow-ups)
resolveClientCommand(~9 per-client ifs) and the heterogeneousrunLaunchper-client blocks are intentionally NOT touched here — each gets its own review-sized PR. This PR is deliberately a single-file, single-function surface so the equivalence proof stays mechanical.