fix(parallels): preserve final IP discovery query errors - #2480
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 25, 2026, 5:35 AM ET / 09:35 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch makes Parallels IP-wait errors report a failed final VM inventory query, identify older state and MAC observations, and suppress stale troubleshooting advice, with regression tests and documentation. Merge readiness⛔ Needs changes before merge - 1 item remains Current main and v0.66.0 still discard the final inventory-query error, so this PR remains useful. The patch has no identified correctness defect, but the maintainer’s explicit request for after-fix output through Crabbox’s Parallels path remains unmet. Priority: P2 Review scores
Verification
How this fits togetherCrabbox’s Parallels provider polls VM inventory and optionally checks host DHCP records while waiting for a guest address. It either passes that address to guest preparation or returns an operator-facing diagnostic. flowchart TD
A[VM acquisition or lookup] --> B[Poll Parallels inventory]
B --> C{Guest address found?}
C -->|Yes| D[Prepare guest connection]
C -->|No| E[Check optional DHCP fallback]
E --> F{Wait expired?}
F -->|No| B
F -->|Yes| G[Report query failure or discovery hints]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep timeout guidance tied to the latest inventory result while preserving the existing IP discovery, cancellation, and VM cleanup behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: a failed final inventory query reaches the timeout formatter without its error on current main. The synthetic regression cases exercise this path; this review did not establish a native reproduction. Is this the best way to solve the issue? Yes. The branch repairs the existing timeout owner without adding a competing discovery path or changing clone defaults. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dc28186e4ee5. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Maintainer disposition: the missing after-fix real-path proof remains a merge hold. The PR already distinguishes its passing synthetic regressions from the unsuccessful candidate native attempt, and no native proof is claimed. Returning this to draft until that evidence is available; the test restriction has not been weakened and no alternate native entrypoint was used. The changelog P3 finding does not apply: this is maintainer-authored integration work under No functional code finding was reported. The underlying linked-clone boot issue remains separate and open: #2398. |
634a725 to
9f7c216
Compare
9f7c216 to
59a9adf
Compare
Problem and fix
When Parallels IP discovery times out after its final VM inventory query fails, the query's actual error is discarded. If an earlier query succeeded, the timeout can instead show stale DHCP and linked-clone boot advice—even though current inventory is unavailable.
Preserve the final query error in the timeout. Explicitly identify state/MAC values as the last successful observation, if any, and prioritize inventory access rather than stale guest-boot, DHCP, or clone-mode advice. A later successful query still clears the earlier failure and retains the existing normal discovery hints.
The six production lines change only diagnostics. Timeout exit code 5, polling cadence and budget, cancellation ordering, successful IP results, ambiguous DHCP handling, clone defaults, native commands, and VM lifecycle remain unchanged. Documentation and the Unreleased changelog are updated.
Proof
The new
TestParallelsWaitForIPRetainsFinalQueryFailureextends the existing test harness and uses virtual time for command failure, malformed JSON, missing VM, successful query followed by failure, and failure followed by a successful query. Against the original code it failed for the missing query errors and stale DHCP/clone advice. It passes with this patch.The broader Parallels race checks passed in 114.61s and vet in 14.14s. Independent Codex review of the complete introduced scope through P2 found no accepted/actionable findings. Regression runs used isolated credential-free environments with external networking denied.
A read-only direct native preflight with Parallels 27.0.2 (58673) confirmed the real
prlctl list -i -f -j <random-missing-uuid>error. However, the candidate harness could not reach its query: the restricted test sandbox denied process inspection used by Parallels' launcher, and native initialization failed. That attempt is not candidate native proof. The restriction was not weakened, no alternate entrypoint was used, and no VM was started, cloned, or changed. The proof of this diagnostic-only fix is the failing-before/passing-after regression and unchanged command/lifecycle path, not a claimed live lifecycle test.Issue boundary
Related: #2398. This does not resolve the underlying linked-clone boot failure or establish an Apple-silicon compatibility boundary, and must not close that issue as fixed. Current main already includes linked-clone troubleshooting; this patch repairs the separate loss of current query evidence discovered while rechecking that issue.