Fix bundled mode detection for bun-compiled sidecars - #440
Conversation
PR quality triageChanged areas: area:cli-core CLI core policy: Blocked by policy until a maintainer applies Missing-test policy: No missing-test policy block detected. Coverage baseline policy: No coverage-baseline policy block detected. CLI core files:
Coverage policy files:
Expected checks:
Test coverage signals:
Risk notes:
Hard merge gates still come from GitHub Actions, not AI review. Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask: @dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact. |
|
Here's my review across the requested dimensions: Changed-Area Risk: 🟡 MediumThe fix is additive — it adds an OR condition ( The consolidation of Test Coverage: 🟢 GoodNew Minor gaps:
Documentation Impact: 🟢 LowInternal implementation detail only. The inline JSDoc comment explaining why Desktop Startup Risk: 🟡 MediumThis is the most important dimension. The ripgrep fallback chain [2] uses Before this PR: Bun-compiled sidecars with empty The risk direction is toward correctness, not away from it. The remaining concern is a false positive (regular Bun dev scripts whose argv[1] somehow contains CLI Core Impact: 🟡 MediumThe PR touches Overall assessment: This is a well-scoped, low-risk fix that addresses a real correctness issue. The additive OR logic ensures no regressions for existing working paths, and the new tests validate the critical edge case. The Recommend: ✅ Approve after manual desktop startup verification on macOS/Windows confirms embedded ripgrep dispatches correctly with the updated detection. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
db6f900 to
787a4fc
Compare
Summary
isInBundledMode()对 Bun 编译产物的误判,不再只依赖Bun.embeddedFilesclaude-sidecar继续走内嵌rgFeature Quality Contract
bun test ./src/utils/__tests__/bundledMode.test.tsbun test ./src/utils/__tests__/ripgrep.test.tsbun run verify已执行server-checks通过,见artifacts/quality-runs/2026-05-14T05-49-29-566Z/logs/server-checks.log,结果为668 pass / 0 failverify当前被persistence-upgradelane 的仓库既有失败阻断,详见下文cli-core,需要维护者审核并添加allow-cli-core-changeVerification
bun run verifyfor code changes, including the coverage gate.实际执行命令
额外验证证据
1.3.14):bun probe.ts时,process.argv[1]是真实文件系统脚本路径,且Bun.embeddedFiles.length === 0bun build --compile probe.ts && ./probe-bin时,process.argv[1]变为/$bunfs/root/probe-bin,但Bun.embeddedFiles.length === 0Bun.embeddedFiles.length > 0不是可靠的 bundled mode 判定条件Quality report / blocker
bun run verify报告目录:artifacts/quality-runs/2026-05-14T05-49-29-566Z/artifacts/quality-runs/2026-05-14T05-49-29-566Z/logs/server-checks.logartifacts/quality-runs/2026-05-14T05-49-29-566Z/logs/persistence-upgrade.logdesktop/src/lib/persistenceMigrations.test.ts失败,报错为TypeError: window.localStorage.clear is not a functionorigin/mainworktree 上单独执行同一条 desktop 测试,并复现完全相同的失败,说明这是仓库当前基线问题,不是本 PR 引入Risk
allow-cli-core-change.allow-missing-tests.allow-coverage-baseline-change.@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.