fix(standalone): recognize encoded Bun virtual module URLs - #6098
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
ChangesStandalone URL detection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The code, tests, and documentation agree on which Bun virtual-root URLs are recognized, and no concrete user-facing failure is established. Windows standalone runtime behavior has not been directly exercised and remains a platform-validation item. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
리뷰 · 우선순위 40 / 80윈도우에서 컴파일한 이제는 주소를 읽어서 판단해요. 이 조각은 #6079에 있던 주소 판별만 따로 가져온 거예요. #6079의 나머지 윈도우 데스크톱 작업은 그 PR에 있어요. 라인 - 메인테이너의 판단이 필요한 지점 #6079 헤드의 같은 함수는 다른 컴퓨터 이름을 거르지 않아요. 그 PR이 나중에 머지되면 윈도우 exe를 한 번 실행해 보는 일을 머지 조건으로 둘지도 정해 주세요. 지금 테스트는 주소 문자열만 봐요. 너의 추천 이 PR을 머지하세요. 거절해야 하는 주소가 테스트에 있어요. #6079를 머지할 때는 이 댓글은 grok-bot이 작성했습니다 |
9366801 to
82f73a3
Compare
Reimplements the isolated standalone URL detection fix from #6079 on dev. Hostless file URLs can decode one layer to recognize Windows ~BUN while source and network-host URLs remain outside the compiled-binary path. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
82f73a3 to
c72b88c
Compare
Summary
On Windows, a compiled
ocx.execan report its bundled module URL with an encoded tilde (file:///B:/%7EBUN/root/...).isStandaloneModuleUrlonly matched the literal~BUNform, so the binary believed it was running from source: service commands, GUI asset lookup, package-integrity checks and runtime selection then took the source-tree path.The helper now parses the URL, accepts only hostless
file:URLs, decodes the pathname exactly once, and matches the Bun virtual root at the start of the path (/$bunfs/or/<drive>:/~BUN/). Encoded tildes are recognized. Network-hostfile://server/...URLs, other schemes, double-encoded markers, malformed encoding and source paths that merely contain$bunfsdeeper in the tree stay on the source path.This is a narrow reimplementation of the standalone URL fix from #6079 by @luvs01. The rest of #6079 (Windows Desktop compatibility) stays under review in that PR. The structure map now lists
src/lib/underops/service-and-sidecars.md, which already documents this helper.Co-authored-by: luvs01 27862058+luvs01@users.noreply.github.com
Verification
bun test tests/lib/standalone.test.ts: red before the change (encoded Windows and network-host cases), then 5 pass / 0 fail.bun run typecheck,bun run structure:check,bun run privacy:scan,git diff --check origin/dev...HEAD: exit 0 on this head.bun build --compile):import.meta.urlwasfile:///$bunfs/root/probeand the new helper returnedtrue, so the POSIX compiled path is unchanged.bun run test:changedin a detached checkout of this exact commit (1297 files selected): 26181 pass / 47 skip / 20 fail. None of the failures is caused by this change. Rerun in isolation on this head, 16 of them pass (service SQLite-home, ownership state, service diagnostics, Codex and Grok toggle). The other four fail identically on unchangedorigin/dev24b2f39bon this machine: the retargeted-shim launchd case times out at 5 s, and the three launcher graceful-shutdown cases time out at 20 s. That points to machine load from parallel lanes.dev6d64ea26(two Swift tray files), then onto468b954c(fix(images): use managed Pool with proxy admission bearer, scope first #6097, image Pool admission). Neither touches this diff. Windows shards dispatched withlane=allpassed on the6d64ea26head9366801b(run 36333848482); the carry diff is identical on the current head. Thetest:changednumbers above come from the pre-rebase commit08271bdf, whose TypeScript tree is identical. After the rebase,bun test tests/lib/standalone.test.ts(5 pass) andbun run structure:checkwere rerun.lane=all, since they run only onworkflow_dispatch. No compiled Windows binary was run locally; the Windows URL shape is covered by the unit cases above.Checklist