SRE tooling: Remove target administration helpers - #198
Conversation
Remove internal onboarding details, private platform paths, device codenames, and hard-coded test environment defaults. Keep reusable recovery tooling platform-neutral through explicit inputs. Assisted-by: GitHub Copilot:gpt-5.6-sol
Correct the patina_sre re-export comment and describe the recovery artifact without referring to a removed zip or internal artifact system. Assisted-by: GitHub Copilot:gpt-5.6-sol
Document controller-specific assumptions, platform-owned recovery policy, configurable image sizing, and arbitrary boot payload support without changing the WinVOS workflow. Assisted-by: GitHub Copilot:gpt-5.6-sol
Distinguish the BPINFO.BPSZ field from its resulting byte size and use consistent controller-specific terminology for the download route hint. Assisted-by: GitHub Copilot:gpt-5.6-sol
Use the BPINFO field calculation consistently so the controller-specific image size requirement is unambiguous. Assisted-by: GitHub Copilot:gpt-5.6-sol
Remove remote administration, boot-entry manipulation, and internal-style operator procedures. Keep USB staging limited to copying locally supplied firmware and payload artifacts. Assisted-by: GitHub Copilot:gpt-5.6-sol
There was a problem hiding this comment.
Pull request overview
Removes target-side administration helpers and internal end-to-end operator procedures from the SRE recovery tooling, narrowing the remaining USB staging workflow to locally supplied firmware and payload artifacts. The remaining documentation is adjusted toward platform-neutral requirements and explicitly shifts authorization/policy responsibility to integrators.
Changes:
- Deleted remote administration / boot-entry manipulation scripts and internal operator runbooks.
- Narrowed
Stage-SreflashUsb.ps1to stage onlyNvmeBpWrite.efiand the recovery image, removing companion-script handling and in-repo binary auto-discovery. - Updated SRE UEFI app comments/docs to be more platform-neutral (controller-/platform-specific wording, policy/authorization ownership).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uefi/SrePkg/Application/SreRecoveryLoader/SreRecoveryLoader.inf | Clarifies tool status and shifts policy/authorization responsibility to platforms. |
| uefi/SrePkg/Application/NvmeBpWrite/Stage-SreflashUsb.ps1 | Narrows staging behavior; removes companion scripts and repo-walk tool discovery. |
| uefi/SrePkg/Application/NvmeBpWrite/Set-NextBootToUsb.ps1 | Removed (target boot-entry manipulation helper). |
| uefi/SrePkg/Application/NvmeBpWrite/Reset-NvmeBpResult.ps1 | Removed (legacy target-side NVRAM reset helper). |
| uefi/SrePkg/Application/NvmeBpWrite/README.md | Reframes as platform-neutral dev tool; removes internal procedures and remote/boot-entry guidance. |
| uefi/SrePkg/Application/NvmeBpWrite/NvmeBpWrite.c | Updates controller-/platform-specific wording in comments. |
| uefi/SrePkg/Application/NvmeBpWrite/Flash-BP1.md | Removed (internal end-to-end flashing procedure). |
| uefi/SrePkg/Application/NvmeBpWrite/enable-remote.ps1 | Removed (WinRM/token-filter bootstrapper). |
| uefi/SrePkg/Application/BpRecoveryLoader/SRE-onboarding.md | Removed (internal onboarding content). |
| uefi/SrePkg/Application/BpRecoveryLoader/Run-WinVosFromBp.ps1 | Removed (host orchestrator script). |
| uefi/SrePkg/Application/BpRecoveryLoader/BuildBpFatImage.ps1 | Documentation wording tweaks for platform-neutral guidance. |
| uefi/SrePkg/Application/BpRecoveryLoader/BpRecoveryLoaderApp.inf | Clarifies unconditional entrypoint and platform-owned authorization/policy gating. |
| uefi/SrePkg/Application/BpRecoveryLoader/BpRecoveryLoader.c | Comment wording adjustments toward platform-neutral language. |
| uefi/crates/patina_sre/src/lib.rs | Comment wording tweaks around re-exports/consumers. |
| uefi/crates/patina_boot/src/proxy.rs | Comment wording tweaks to avoid platform-specific header paths. |
Suppressed comments (1)
uefi/SrePkg/Application/NvmeBpWrite/NvmeBpWrite.c:30
- Similarly, the controller-specific behavior list mentions BPINFO.BPSZ-derived sizing, but the code currently requires a fixed 1 GiB image (TARGET_UPLOAD_BYTES). Keeping these consistent helps integrators understand what needs to be adapted for other controllers.
- Staged image MUST equal BPINFO.BPSZ * 128 KiB; shorter commits return
SCT=1 SC=0x1E even after FID=0x85 unlock.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Align the recovery tool comments with its fixed 1 GiB upload size and current content-comparison flow. Document both supported ways to clear the force-reflash override. Assisted-by: GitHub Copilot:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 53809ea8-9748-401b-a132-83652fd5c7a8
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
Suppressed comments (2)
uefi/SrePkg/Application/NvmeBpWrite/Stage-SreflashUsb.ps1:228
- The staging script says the tool will run a "content-hash check", but NvmeBpWrite’s startup logic is a byte-compare content check (no hashing). Consider changing the wording to avoid implying a cryptographic/hash-based validation.
Write-Host "Removed pre-existing $flagPath — tool will run normal content-hash check." -ForegroundColor Cyan
}
# --- Report staged contents ---
uefi/SrePkg/Application/BpRecoveryLoader/BpRecoveryLoaderApp.inf:4
- The header comment says this app "Reads the SRE WIM" from BP1, but the implementation chainloads from a FAT image stored in BP1 (see BpRecoveryLoader.c’s comment about a FAT32 image). Updating the wording to "recovery payload image" (or similar) would better match the actual data format.
# BpRecoveryLoaderApp - SRE entry application. A platform may dispatch it
# as a BootOption after applying its own recovery policy. Reads the SRE WIM
# from NVMe Boot Partition 1, registers the payload
Summary
Stack
mainwill narrow automatically after the preceding PRs mergeReview scope
Run-WinVosFromBp.ps1Flash-BP1.mdNvmeBpWrite/README.mdReset-NvmeBpResult.ps1Set-NextBootToUsb.ps1Stage-SreflashUsb.ps1enable-remote.ps1