Skip to content

R06: compose qualified updater stack onto current package - #274

Open
Oleksii-debug wants to merge 126 commits into
r06-compose-packaged-app-update-verify-0911from
r06-compose-updater-stack-0929-sol
Open

Oleksii-debug wants to merge 126 commits into
r06-compose-packaged-app-update-verify-0911from
r06-compose-updater-stack-0929-sol

Conversation

@Oleksii-debug

@Oleksii-debug Oleksii-debug commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Compose the qualified updater lineage onto the current packaged authority, then harden the exact packaged composition where fresh changed-head review exposed user-facing failure leakage and updater TOCTOU/authority gaps.

Exact authorities

The packaged base remains the first parent and exact merge-base. No canonical Scripture/source/provenance/grading content is changed.

Package/updater composition retained

The original composition preserves both package-only work and the qualified updater subsystem:

  • packaging/build_windows.ps1 keeps package WEBU content-data embedding while building, hashing, manifesting and independently reading back the standalone updater.
  • transport/contracts.py keeps package Library/WEBU and cross-testament commands while adding updater pending/apply/restart/cancel/post-restart-health authority.
  • updater state-changing browser commands remain empty-payload-only; browser payloads cannot supply PID/path/argv/install-target authority.
  • DEV05/DEV06/DEV10 literal-head workflow authority remains package-owned.

Changed-head hardening after the original composition

Fresh implementation/review on this PR additionally:

  • sanitizes updater frontend failures so live regions do not announce raw backend exception text;
  • exposes updater busy state through aria-busy;
  • syntax-checks both updater frontend modules;
  • binds updater hashing and source copying to pre/open/post file identity, rejecting pathname replacement even for byte-identical files;
  • preserves staged/installed file identity across Authenticode verification and through the pre-publication boundary;
  • rejects host process-plan path substitution;
  • repeats same-publisher verification on the rebound canonical updater plan immediately before process launch;
  • adds focused regressions for byte-identical staged/installed/source replacement and Windows-resolved launch-plan behavior.

The post-review hardening means the current 35-path head is intentionally not claimed to be byte-identical to #257 for the modified subset; #257 is provenance, while this PR's exact head is the integration authority.

Exact-head hosted qualification

All triggered workflows are terminal SUCCESS on b8798c93038ddd32fda311df15adf39a5767d81a:

  • DEV1 Platform CI 36724515096 — Linux + Windows SUCCESS, including the exact Windows engineering release gate.
  • DEV05 runtime grading 36724515366 — SUCCESS.
  • DEV06 memory persistence 36724515234 — SUCCESS.
  • DEV10 Integration CI 36724515197 — Ubuntu + Windows integration and release-secret scan SUCCESS.
  • D2 structured runtime compatibility 36724515225 — SUCCESS.
  • Library/Search Qualification 36724515291 — SUCCESS.
  • Packaged Library Current Shell Qualification 36724515099 — Ubuntu + Windows SUCCESS.
  • Constructor V2 Direct Qualification 36724515056 — Ubuntu + Windows SUCCESS.
  • Packaged Speech Direct Qualification 36724515473 — SUCCESS.
  • Packaged Cross-Testament Qualification 36724515281 — SUCCESS.

A transient earlier changed-head failure was traced to a stale test double that did not model the production builder's resolved-path contract; the fixture was corrected without weakening the runtime authority check, and the final exact head is green.

Nonclaims

This PR does not claim:

  • production Authenticode signing identity/private key;
  • physical Windows 11/WebView2 updater end-to-end acceptance;
  • HUMAN_NVDA acceptance;
  • main-branch release authorization.

READY_FOR_INTEGRATION=YES
MAIN_MERGE_AUTHORIZATION=NO

Adopt the already integrated #260 DEV05/DEV06/DEV10 checkout authority so hosted updater-health evidence is bound to this exact candidate SHA. Product/runtime bytes are unchanged.
Compose the exact qualified #257 updater subsystem onto packaged #272 authority. Preserve package WEBU/cross-testament transport commands and packaged Scripture content data while adding the updater executable/runtime/health chain. Current package is first-parent authority; #257 is retained as provenance.

@Oleksii-debug Oleksii-debug left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FRESH COMPOSITION REVIEW — exact head 9fd5b9ae2227fda97e1ffd810612153f4a7cebea

Reviewed the full 33-path package delta, with special attention to the only two paths requiring semantic reconciliation.

Composition topology:

  • current package 58874439caad9c5c8c66504853dee1cba950d27d is the exact merge-base and first parent;
  • direct compare is BEHIND 0;
  • 31 updater paths are exact #257 blobs from qualified head 8605b8b7c4b81e7dc663474e4ad1f8677b2da959;
  • DEV05/DEV06/DEV10 workflow bytes are inherited from package because package and #257 already share the same literal-head authority.

Three-way reconciliation findings:

  • build_windows.ps1 preserves the package-only WEBU content-data embedding while retaining #257's standalone updater build, updater hash/size evidence, updater manifest and independent artifact readback;
  • transport/contracts.py preserves package Library/WEBU and cross-testament command authority while adding all five updater lifecycle commands;
  • updater lifecycle commands remain empty-payload-only, so browser payloads cannot inject PID/path/argv/update target authority;
  • package commands such as library.text_catalog and research.get_cross_testament remain present and their package validators are not replaced by the older updater-stack version.

Subsystem boundary review:

  • browser surface invokes only fixed updater command identifiers with empty payload;
  • native host owns executable/PID/path derivation;
  • updater lineage retains exact-byte handoff, parent-exit ordering, same-publisher verification, atomic replacement/rollback, relaunch and post-restart health receipt checks;
  • canonical Scripture/source/provenance/grading content is not touched by this 33-path delta.

No blocking static/composition defect found. This review does not replace fresh exact-head CI and does not claim production Authenticode signing, physical Windows 11/WebView2 update E2E, or HUMAN_NVDA acceptance.

COMPOSITION_REVIEW=PASS
READY_FOR_INTEGRATION=NO pending terminal exact-head hosted qualification.

Copy link
Copy Markdown
Owner Author

CI_TERMINAL / READY_FOR_INTEGRATION — exact composition head 9fd5b9ae2227fda97e1ffd810612153f4a7cebea

Anti-race authority is unchanged:

  • packaged base 58874439caad9c5c8c66504853dee1cba950d27d;
  • package is the exact merge-base and first parent;
  • direct compare is BEHIND 0 with exactly 33 product paths;
  • PR mergeability is clean.

Fresh exact-head hosted qualification is terminal SUCCESS across all triggered families:

  • DEV1 Platform CI 36632874685 — Linux + Windows SUCCESS, including exact Windows engineering release gate;
  • DEV05 runtime grading 36632874795 — SUCCESS;
  • DEV06 memory persistence 36632874811 — SUCCESS;
  • DEV10 Integration CI 36632874751 — SUCCESS;
  • D2 structured runtime compatibility 36632874740 — SUCCESS;
  • Library/Search 36632874788 — SUCCESS;
  • Packaged Library Current Shell 36632874706 — SUCCESS;
  • Constructor V2 Direct 36632874713 — Ubuntu + Windows SUCCESS;
  • Packaged Speech Direct 36632874709 — SUCCESS;
  • Packaged Cross-Testament 36632874699 — SUCCESS.

Fresh exact-head composition review 5358653009 is PASS.

Byte/readback evidence:

  • all 31 non-overlapping updater paths are byte-identical to qualified R06: bind update-health reads and artifact hashing to opened descriptors #257 head 8605b8b7c4b81e7dc663474e4ad1f8677b2da959;
  • merged build_windows.ps1 preserves package WEBU content-data embedding and adds the standalone updater build/evidence;
  • merged transport/contracts.py preserves package Library/WEBU + cross-testament authority and adds the five empty-payload updater lifecycle commands;
  • package-owned literal-head workflow authority remains unchanged.

No canonical Scripture/source/provenance/grading content is changed by this composition. No production Authenticode signing identity/private key, physical Windows 11/WebView2 updater E2E, or HUMAN_NVDA acceptance is claimed.

READY_FOR_INTEGRATION=YES
MAIN_MERGE_AUTHORIZATION=NO — no package/main merge performed.

Copy link
Copy Markdown
Owner Author

INDEPENDENT SECURITY REVIEW — remaining launch TOCTOU acceptance item

Reviewed current updater launch authority after the host-path rebinding and second same-publisher verification.

What is now covered:

  • host-derived updater/install/staging paths are rebound after plan construction;
  • process-plan substitution is rejected;
  • same-publisher Authenticode is verified again immediately before launch;
  • updater self-identity rebinds direct invocation to its canonical installed-app sibling.

Remaining gap before treating updater launch as fully race-hardened:

  • there is still a path-based interval between the final signer verification and subprocess.Popen(plan.argv());
  • current regressions cover verifier verdict changes and plan substitution, but not replacing the updater executable after the final verification and before process creation;
  • updater-side self-verification cannot protect this exact interval if a different executable is what actually gets spawned.

Acceptance should either:

  1. hold a Windows handle/lock that denies replacement/delete from final verification through process creation, with a replacement-race regression; or
  2. document and prove an equivalent OS-enforced immutable installation boundary for that interval.

This is not a claim that an exploit is currently demonstrated; it is an unclosed TOCTOU boundary in the present path-based proof.

UPDATER_VERIFY_TO_SPAWN_TOCTOU=OPEN

Copy link
Copy Markdown
Owner Author

CHANGED-HEAD QUALIFICATION / INTEGRATION HANDOFF — exact head b8798c93038ddd32fda311df15adf39a5767d81a

Fresh review after the original composition found and repaired three concrete classes of defects rather than relying on the earlier green head:

  1. Accessible failure boundary

    • updater live regions no longer render raw backend exception text;
    • technical details remain in console diagnostics;
    • updater sections expose aria-busy;
    • both updater frontend modules have Node syntax qualification.
  2. Updater file-identity continuity

    • hashing and source copying bind lstat → opened descriptor → post-read identity;
    • byte-identical pathname replacement now fails closed;
    • staged and installed identities remain bound across same-publisher verification and until pre-publication;
    • focused regressions cover staged/installed/source swaps.
  3. Host launch authority

    • process-plan output must exactly match resolved host-owned updater/app/staging authority;
    • same-publisher proof is repeated on that rebound plan before launch;
    • Windows-resolved-path test doubles now model the production builder contract.

Anti-race re-read immediately before handoff:

  • base 58874439caad9c5c8c66504853dee1cba950d27d unchanged;
  • head b8798c93038ddd32fda311df15adf39a5767d81a;
  • PR mergeable = true;
  • 35 changed paths;
  • no review threads open.

Exact-head hosted qualification is terminal SUCCESS in all 10 triggered workflow families:
DEV1 36724515096; DEV05 36724515366; DEV06 36724515234; DEV10 36724515197; D2 36724515225; Library/Search 36724515291; Packaged Library 36724515099; Constructor V2 36724515056; Packaged Speech 36724515473; Cross-Testament 36724515281.

No production signing, physical Windows/WebView2 update E2E, HUMAN_NVDA, or main-release authorization is claimed.

CHANGED_HEAD_REVIEW=PASS
READY_FOR_INTEGRATION=YES
MAIN_MERGE_AUTHORIZATION=NO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant