Repository navigation
R06: preserve rollback until post-restart health commit - #251
Oleksii-debug wants to merge 10 commits into
Conversation
Adopt canonical #260 DEV05/DEV06/DEV10 exact-head checkout authority without changing update-health product bytes.
|
HEAD_CHANGED / EXACT-HEAD QUALIFICATION AUTHORITY REPAIRED — #251 now carries the same already-integrated #260 literal-head checkout/assertion authority in DEV05, DEV06 and DEV10. This fast-forward changes qualification workflows only; the update-health receipt, runner, packaged host/UI and their regression bytes are unchanged from Direct compare to stacked parent #250 remains BEHIND 0 with exact parent merge-base. Earlier failures on
|
Scope
Canonical successor to #250. Closes the stale-pending/rollback lifecycle after successful apply + relaunch without changing the existing apply authority or weakening rollback semantics.
Exact lineage
r06-host-updater-launch-0929-sol@56eb145bc9f741d39f7c240a4156c45e32376105(R06: launch trusted updater from packaged host #250)r06-update-health-receipt-0929-sol@b840c8dc080037778e55a91b40767123bc20f579Root cause closed
The canonical updater intentionally preserved same-directory rollback bytes after publication, but after successful relaunch it removed only
apply-update.json; the oldpending-update.jsonremained bound to the previouscurrent_version. The updated application would therefore encounter stale old-version pending authority during startup recovery, while rollback bytes had no durable commit lifecycle.Runtime health authority
Adds fixed-path
update-health.jsonwith strict schema and no filesystem paths. It is published only after exact installed-byte publication while the exact prior rollback bytes still exist, and binds:Publish/inspect re-verify the installed EXE and same-directory rollback as regular non-symlink files and exact hashes. Existing identical receipt is idempotent; divergent receipt fails closed.
Updater transaction ordering
execute_trusted_updaternow performs:If health-receipt publication fails, prior bytes are rolled back before receipt disarm. If relaunch fails, prior bytes are rolled back before receipt disarm. If rollback itself fails, receipt is deliberately preserved as durable recovery evidence rather than discarded.
Post-restart commit
Adds an outer packaged-host
application_update.commit_post_restart_healthempty-payload command. Browser code cannot supply path/version/hash authority. Onpywebviewready, frontend calls this health commit before normal pending recovery. Native runtime verifies:Only then it removes stale
pending-update.json, disarms the health receipt, and removes rollback bytes. A failed proof returns a bounded error and preserves rollback recovery state; pending recovery is not allowed to run first.Qualification coverage
Runtime tests cover receipt publish/readback/idempotence, strict schema, installed/rollback tamper, target-version mismatch, symlink receipt rejection, commit cleanup, failed-proof preservation, receipt-only disarm, runner ordering, publish failure rollback, spawn failure rollback/disarm, target-substitution behavior, and callable authority validation.
Packaged-host tests cover empty-payload-only health commit, exact host-owned path/version forwarding, request-id correlation, no path disclosure, failed-proof recovery preservation, unrelated-command passthrough, and static startup ordering proving health commit precedes pending status plus aria-live/textContent/no-innerHTML constraints.
Explicit non-claims / remaining blockers
A proposed additional cross-platform executable-name hardening edit was rejected by the GitHub connector before repository mutation; no claim is made that this rejected edit landed. Existing receipt identity still requires exact equality to the host-owned
target.namebefore cleanup.READY_FOR_INTEGRATION=NOpending exact-head hosted qualification and changed-head review.