web: portable entry-point guard for check-devbox-image-reachable (typecheck fix) - #12154
Merged
Merged
Conversation
`import.meta.main` is Bun-only and is not part of TypeScript's ImportMeta type, so `bun run typecheck` has failed on main since #12132: scripts/check-devbox-image-reachable.ts(148,17): error TS2339: Property 'main' does not exist on type 'ImportMeta'. Use the portable `fileURLToPath(import.meta.url)` vs `process.argv[1]` check that the sibling devbox scripts already rely on. Behavior is unchanged: `bun scripts/check-devbox-image-reachable.ts --print-key` still runs main, and importing `reachabilityKey` from the test does not. Closes #12147 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qiy38q5XFYQU3CeccDENty
austinywang
temporarily deployed
to
cloud-vm-image-checks
September 8, 2026 11:21 — with
GitHub Actions
Inactive
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
This was referenced Sep 8, 2026
austinywang
added a commit
that referenced
this pull request
Sep 8, 2026
Brings in #12131 (cmux notify inside a machine), #12154, #12144 (cmux cr bootstrap), #12112 (cloud notifications with per-client acks), #10623, #11358, #12118. Conflicts resolved: - cmux.xcodeproj/project.pbxproj: cmuxTests group children — kept both sides (CloudFileDeliveryTests from this branch, CloudNotificationSyncTests from main); normalized, test-wiring lint ok (813 test files). - web/scripts/check-devbox-image-reachable.ts: took main's portable entry-point guard over this branch's typed import.meta.main fix. Checks on the merged tree: 18 web suites 372 pass / 0 fail, tsc clean, shim image copy byte-identical, sh -n clean, swiftc -parse on every file both sides touched, VMClientError switch still exhaustive, no duplicate definitions introduced. Claude-Session: https://claude.ai/code/session_01QBDetMeke87gUWzvok9LWr
austinywang
added a commit
that referenced
this pull request
Sep 8, 2026
Takes main's portable entry-point guard for check-devbox-image-reachable.ts (#12154), which supersedes the equivalent fix this branch carried. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
aerickson
pushed a commit
to aerickson/cmux
that referenced
this pull request
Sep 13, 2026
…aflow-ai#12154) `import.meta.main` is Bun-only and is not part of TypeScript's ImportMeta type, so `bun run typecheck` has failed on main since manaflow-ai#12132: scripts/check-devbox-image-reachable.ts(148,17): error TS2339: Property 'main' does not exist on type 'ImportMeta'. Use the portable `fileURLToPath(import.meta.url)` vs `process.argv[1]` check that the sibling devbox scripts already rely on. Behavior is unchanged: `bun scripts/check-devbox-image-reachable.ts --print-key` still runs main, and importing `reachabilityKey` from the test does not. Closes manaflow-ai#12147 Claude-Session: https://claude.ai/code/session_01Qiy38q5XFYQU3CeccDENty Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This branch was successfully deployed
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.
Closes #12147
Problem
web/scripts/check-devbox-image-reachable.ts(added by #12132) ends withif (import.meta.main) await main();.import.meta.mainis Bun-only and not part of TypeScript'sImportMetatype, sobun run typecheck(tsgo --noEmit) fails on main:ci.ymlis path-gated for pull requests, so main's own PR checks never ran this job; every PR that touchesci.yml(which forces all CI areas) now failsweb-typecheck,linux-preflight,tests, andci-status(#12140, #12141, and the #12100 dispatch).Fix
Replace the guard with the portable entry-point check the sibling devbox scripts already use (
fileURLToPath(import.meta.url)compared withpath.resolve(process.argv[1])). No Bun ambient types are added to the web typecheck config.Verification
Run in a sparse clone of current main with this patch, using an installed
web/node_modules:A manual
ci.ymldispatch on this branch runs theweb-typecheckjob as CI evidence.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qiy38q5XFYQU3CeccDENty
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Typecheck-only guard change with no logic or security impact; entry-point behavior is preserved.
Overview
Fixes
webtypecheck by replacing Bun-onlyimport.meta.mainat the bottom ofcheck-devbox-image-reachable.tswith a portable entry-point guard that comparespath.resolve(process.argv[1])tofileURLToPath(import.meta.url), matching the approach used by other devbox scripts.Adds
node:pathandnode:urlimports only to support that guard. Runtime behavior is unchanged: direct script execution still runsmain(), while importing the module (e.g.reachabilityKeyin tests) does not.Reviewed by Cursor Bugbot for commit de39d89. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes the web typecheck failure by replacing the Bun-only
import.meta.mainguard inweb/scripts/check-devbox-image-reachable.tswith the portable entry-point check the sibling devbox scripts already use.import.meta.mainis not part of TypeScript'sImportMetatype, sobun run typecheckerrored with TS2339. The new check comparesfileURLToPath(import.meta.url)withpath.resolve(process.argv[1]); running the script directly still callsmain(), and importingreachabilityKeyfrom tests still does not. Closes #12147.Written for commit de39d89. Summary will update on new commits.