Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3847503e8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if reuse_existing && runtime_state_path.is_file() { | ||
| let state = read_vm_runtime_state(&runtime_state_path)?; | ||
| let (router_listener_reservations, component_reservations_by_id) = | ||
| reserve_existing_vm_runtime_ports(runtime_root, vm_plan, &state)?; |
There was a problem hiding this comment.
Avoid reserving live ports in VM launch preview path
materialize_vm_runtime now always calls reserve_existing_vm_runtime_ports when reuse_existing is true, but build_vm_site_launch_preview also calls this code path for read-only preview generation. That means preview commands now try to bind all existing runtime ports and fail with EADDRINUSE whenever the runtime is already running (or any port is occupied), which regresses launch-bundle/inspect flows that should not require taking port ownership.
Useful? React with 👍 / 👎.
| listeners | ||
| .outbound_by_export | ||
| .insert(binding.export.clone(), listener); |
There was a problem hiding this comment.
Reject or track duplicate --export bindings separately
This stores reserved listeners in a map keyed only by binding.export, so repeated --export entries for the same name overwrite earlier reservations. Because export_bindings still keeps both entries, route/listener pairing can become inconsistent (first route may consume the later listener and another route falls back to rebinding), causing unexpected ports or bind failures. Either reject duplicate export names up front or keep reservations keyed per binding instance.
Useful? React with 👍 / 👎.
No description provided.