review: harden flash-readiness gates before next release - #5
Draft
Zhanfg wants to merge 148 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
SECOND STATIC/DYNAMIC AUDIT CLOSED ON REVIEW BASE; PHYSICAL FR-014 STILL OPEN. DO NOT MERGE OR RELEASE YET.
PR #5 remains Draft and keeps
module/FLASH_REVIEW_BLOCKED.Current reviewed runtime base
f927a2738b7b3ae4cfc4a811897a1be9bc6acbe3Exact same-head formal review checks:
31273286848: PASS31273286854: PASSThe second audit intentionally invalidated the older FR-014 candidate
857e963...for final evidence. A new isolated candidate is PR #8.What the second audit additionally closed
Beyond the earlier transaction/readback/superkey/rollback work, this pass found and fixed several release-blocking or validation-corrupting paths:
abort()that recursively deleted the installedpatch/recovery-helper directory; runtime failure paths now terminate without deleting persistent helpers, and the imported helper itself is de-risked;recovery_export.jsonwhose target/SHA still match the exact live preflight boot;flash_imageis reached;unresolvedor arm bootloop recovery before PatchNest has ever touched boot;/data/adb/patchnestrescue credentials/backups/bindings because uninstalling a root-manager module does not itself restore boot;unzipmaterialize archive metadata/paths directly; entries are vetted and emitted as regular files, with traversal/duplicate/ambiguous package rejection;kptools -l -M;.autoloadmarkers and revalidates KPMs immediately before kernel load;openssl pkeyutl -verify -rawin, with deployment-key positive and tamper/malformed/symlink negative tests;kpatch kpm loadpaths, including bare WebUI uploads, are centralized behindkpatch_runtime_wrapper.sh+validate_kpm_file.sh; the reviewed ARM64 binary is provenance-checked and preserved askpatch.realduring installation;KPM_CYCLEpath may load a candidate module.Expanded dynamic safety matrix
Flash safety #221 executed and passed:
kpatchwrapper admission and fail-closed missing-helper/real-CLI cases;Build #293 additionally passed source/WebUI checks, pinned dependency hashes, Android ARM64 Public1158 CLI rebuild, kp-safemode, ABI inspection, final module validation, assembled-package release-safety validation, deterministic double packaging and artifact upload.
Current physical candidate
Draft PR #8:
validation/device-flash-candidate-v2Reviewed runtime base:
f927a2738b7b3ae4cfc4a811897a1be9bc6acbe3Candidate head:
a056541b99cbb2b3f64b6de404bfe040ba5745a4Candidate exact-head checks:
31273464054: PASS31273464107: PASSExact installable v2 module ZIP:
PatchNest-Module.zip1,984,705bytesa9c7edba70f9c98daf3522599f75a65e4c78254da009b976e1ed6b12b5602ce5Relative to the reviewed runtime base, PR #8 changes runtime behavior only by removing
FLASH_REVIEW_BLOCKEDand adding the inertFR014_DEVICE_CANDIDATEmarker. Candidate packaging additionally requires that marker and rejects the blocker.Remaining release blocker — physical FR-014
A real supported ARM64 A/B device must still prove the exact v2 ZIP through the full lifecycle:
sys.boot_completed=1;hello1158,kpver, KPM query/list, secure credential/transaction state;Do not remove
FLASH_REVIEW_BLOCKED, mark PR #5 ready, merge it, or publish a release until the physical evidence is attached and reviewed.