Repository navigation
refactor(launcher): consolidate per-client binary-resolution copies into shared helpers (#1440 P3) - #2553
Merged
Conversation
…nto shared helpers (#1440 P3) - Added two module-private helpers before resolveClientCommand: firstOnPath (left-to-right alias-chain PATH probe) and probeInstalledBin (ordered ext probing over an install-dir base path incl. the try/catch swallow). - Rewrote the codebuddy, qoder, trae branches onto firstOnPath; the mcode and antigravity branches onto probeInstalledBin; comments moved verbatim. - kimi left as-is: its fallback has no extension probing, so routing it through probeInstalledBin would add a pointless fs stat with zero behavioral value. - pi ladder, BILI_CLIENT_BIN pre-pass, codex-win32 guard, and default tail are untouched. - Equivalence proof: canonical-JSON snapshot matrix 24 clients x 3 platforms x 6 fixtures = 432 rows via tsx harness; before/after diff empty. - Suites: launcher.test.ts 292/292 pass; launcher-gemini-family 28/28; fix-679-windows-launch 14/14 (2 skipped, platform-gated); route-passthrough 7/7. tsc --noEmit clean, build OK, unused-export gate clean, lane-guard LANE-CLEAN.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2733-pr.2553.54ba230This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2553.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
Owner
Author
[bot] 🏷 Review 完成(PR 分支
补充:diff 整洁度合格(单文件,每行都服务于去重目的,无无关改动/空白噪音);review 中未发现需要顺手修的小问题。master 在分支点后前进了 9 个提交(#2545/#2546/#2547/#2548/#2549/#2550/#2551 等),但逐一核对过文件清单,没有一个触碰 判定:可合。 |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.198-master.4fce5d3 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 10, 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.
Follow-up to #2453 in the same audit (#1440 P3 copy-paste matrix): the per-client binary-resolution copies inside
resolveClientCommand(src/launcher.ts) collapse onto two module-private helpers. Pure move — zero behavior change, no new exports, one file touched.What moved
firstOnPath(names, env)— ordered alias-chain PATH probe; used by the three true chains: codebuddy (codebuddy→cbc), qoder (qoder→qodercli), trae (traecli→trae-cli→trae). Short-circuits in the same left-to-right order as the olda ?? bchains.probeInstalledBin(base, exts)— the install-dir extension probe (try/catch-swallowed existsSync loop) that mcode and antigravity each had inline; keeps each client's exact ext order (mcode win32.cmd/.bat/.exe, antigravity win32.exe) and returns first hit else bare base. The moved// Unreadable candidate…comment travels verbatim.Net: +28/−26 lines — the win is removing two duplicated probe bodies and three duplicated lookup patterns, not raw size.
Verification
resolveClientCommandover all 24 LAUNCH_CLIENTS × {linux, darwin, win32} (platform passed explicitly) × 6 env fixtures (PATH-hit / no-PATH home-fallback / PI_BIN / BILI_CLIENT_BIN / …), 432 rows, captured pre-edit on pristine tree and post-edit — diff empty.tsc --noEmit,npm run build, unused-export gate clean; lane-guard keyword precheck clean (no side-lane terms in diff).