Commit d334858
committed
harden(scaffold): Resolve-PythonExe — robust host python3/python resolution + fold-in #6 stderr surfacing at the gate seam
Fold-in #1 (Resolve-PythonExe):
Hard `& python3` breaks Windows hosts — the Windows Python installer provides `python`
not `python3`. Resolve-PythonExe probes python3 first (Linux/macOS), then python
(Windows/cross-platform); throws fail-closed naming both if neither resolves.
Defined in Invoke-Voidseal.ps1 (before Resolve-DeployProfile); BuilderVM.ps1 reuses
it via the dot-source chain rather than duplicating it.
Changed in Invoke-Voidseal.ps1 seam-#2 gate (line ~548):
- was: `& python $readScript ...`
+ now: `$pyExe = Resolve-PythonExe; $pyOut = & $pyExe $readScript ...`
Fold-in #6 (stderr surfacing):
The original `2>&1 | Out-Null` swallowed read_outbox.py diagnostics. stderr is now
captured and appended to the throw message on non-zero exit so the operator sees the
actual OutboxError / parse-failure rather than a bare exit-code.
Example (now visible in the InvokeVoidseal test WARNING line):
"...releasing nothing. stderr: read_outbox: FAIL-CLOSED: OutboxError: sha256
mismatch for '...' (tamper)"
Cross-reference comments added at the seam listing the outbox container constants
(MAGIC=VSOUTBX1, 24-byte header, 104-byte record) pointing to guest/outbox.py as
the single source of truth (consistent with the existing reference in host/read_outbox.py).
Test floor: 564/566 Pester green (0 new failures, 2 pre-existing skips); 20/20 pytest.1 parent 1b3b786 commit d334858
1 file changed
Lines changed: 52 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
65 | 98 | | |
66 | 99 | | |
67 | 100 | | |
| |||
512 | 545 | | |
513 | 546 | | |
514 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
515 | 555 | | |
516 | | - | |
517 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
518 | 568 | | |
519 | 569 | | |
520 | 570 | | |
| |||
0 commit comments