Harden CLI fallback paths and gate unvalidated UUEFI host mutations for alpha#264
Conversation
Agent-Logs-Url: https://github.com/HyperionGray/PhoenixBoot/sessions/08d81c37-b34e-48b3-84d7-db11bcbda051 Co-authored-by: P4X-ng <223870169+P4X-ng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/HyperionGray/PhoenixBoot/sessions/08d81c37-b34e-48b3-84d7-db11bcbda051 Co-authored-by: P4X-ng <223870169+P4X-ng@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 6967f1b. Configure here.
| echo | ||
|
|
||
| INSTALL_SCRIPT="$PROJECT_ROOT/scripts/uefi-tools/uuefi-install.sh" | ||
| APPLY_SCRIPT="$PROJECT_ROOT/scripts/uefi-tools/uuefi-apply.sh" |
There was a problem hiding this comment.
Test references non-existent script paths at repo root
High Severity
INSTALL_SCRIPT and APPLY_SCRIPT are set to $PROJECT_ROOT/scripts/uefi-tools/uuefi-install.sh and uuefi-apply.sh, but the actual scripts live at $PROJECT_ROOT/components/core/scripts/uefi-tools/. The scripts/ directory at the repo root contains compatibility symlinks per scripts/README.md, but these symlink targets are not resolvable in the repository tree (confirmed by Read returning "File not found" for both paths). On a fresh clone without out-of-tree symlink setup, all three tests will fail to find the scripts and report spurious failures — the bash "$INSTALL_SCRIPT" invocations will error with "No such file" rather than exercising the alpha gate logic being tested.
Reviewed by Cursor Bugbot for commit 6967f1b. Configure here.
| echo " - If the launcher exists but python deps are missing, run: pip install --user -e ./pf-runner" >&2 | ||
| echo " - You can also point PF_PYTHON at a working Python 3 interpreter if needed." >&2 | ||
| dod_audit_log "ABORT: pf runner unavailable for arguments: $attempted_args" | ||
| } |
There was a problem hiding this comment.
Duplicated probe functions across two CLI scripts
Low Severity
pf_runner_launcher(), pf_runner_probe(), and print_pf_runner_unavailable() are copy-pasted almost verbatim between phoenixboot and phoenixboot-dod. The only difference is an added dod_audit_log call in the DoD variant of print_pf_runner_unavailable. Extracting these into a shared sourced library (e.g., alongside includes/lib/common.sh) would avoid divergence risks when fixing bugs in the probe logic.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6967f1b. Configure here.


Description
Reviewed the install and CLI experience for alpha-readiness, with specific attention to DoD wrapper behavior and UUEFI safety. This change fixes incorrect CLI delegation behavior when
pfis present but unusable, restores the missingpbalias, and gates UUEFI host-side mutating helpers that are not yet broadly validated.CLI fallback correctness
phoenixbootandphoenixboot-dodnow probe thepfrunner before delegating.pfexists but cannot actually run, both CLIs emit curated, actionable install guidance instead of leaking the raw runner failure.phoenixboot listandphoenixboot-dod listnow fall back to useful wrapper/help output in broken-runner environments.pb -> phoenixbootsymlink.UUEFI alpha safety
uuefi-installanduuefi-applybehindPHOENIXBOOT_ALPHA_ALLOW_UNTESTED_UUEFI_HOST=1.uuefi-reportas the safe default alpha path.BootX64.efiplaceholder fallback fromuuefi-install; host install now requires a realUUEFI.efi.Coverage and docs
# Host-side mutating UUEFI helpers are now explicit opt-in for alpha PHOENIXBOOT_ALPHA_ALLOW_UNTESTED_UUEFI_HOST=1 ./pf.py uuefi-install PHOENIXBOOT_ALPHA_ALLOW_UNTESTED_UUEFI_HOST=1 ./pf.py uuefi-applyHow This Was Tested
bash components/core/scripts/testing/test-phoenixboot-cli.shbash components/core/scripts/testing/test-uuefi-host-helpers.shbash components/core/scripts/testing/test-uuefi-source.shbash components/core/scripts/testing/test-dod-helper.sh./phoenixboot list./phoenixboot invalid_command_xyz./phoenixboot-dod list./phoenixboot-dod invalid_command_xyzIntegration Instructions
PHOENIXBOOT_ALPHA_ALLOW_UNTESTED_UUEFI_HOST=1explicitly.Note
Medium Risk
Medium risk because it changes CLI task delegation/fallback behavior and adds safety gating to host-side UEFI mutation scripts, which can affect user workflows and system boot configuration.
Overview
Hardens CLI delegation when
pfis present but not runnable.phoenixbootandphoenixboot-dodnow probepf versionbefore delegating, and on failure fall back to curated wrapper output plus actionable install hints instead of surfacing raw runner errors.Gates unvalidated host-side UUEFI mutations for the alpha.
uuefi-installanduuefi-applynow refuse to run unlessPHOENIXBOOT_ALPHA_ALLOW_UNTESTED_UUEFI_HOST=1is set, anduuefi-installno longer falls back toBootX64.efiwhenUUEFI.efiis missing.Adds regression coverage for the new DoD CLI fallback paths and the UUEFI alpha gate, restores the
pbalias, and updates alpha/docs to reflect the gated UUEFI surface.Reviewed by Cursor Bugbot for commit 6967f1b. Configure here.