Skip to content

fix(browser-session): close navigation authority on download start #320

Description

@seonghobae

Problem

The Browser Session navigation-authority contract models complete-positive (browsingContext.load / complete fragment) and typed negative (navigationAborted / navigationFailed) terminal paths, but a navigation that transitions into a download needs a distinct liveness closure. If presentation authority is invalidated at navigationStarted and download start cannot close that pending navigation, a legitimate navigation-to-download can strand authority even though no ordinary document load follows.

Standards provenance boundary

The protocol semantic under review is browsingContext.downloadWillBegin carrying navigation/context correlation and the navigation algorithm admitting a download-start outcome. Volatile WebDriver BiDi publication-currentness and the separately runtime-qualified OriginWeave revision are canonical #229 evidence in docs/traceability/webdriver-bidi-publication-current.md; this issue does not maintain a second dated latest/previous publication snapshot.

Before implementation or runtime acceptance, #316 must prove that the admitted #229 revision actually supplies the required downloadWillBegin correlation semantics. A newer publication does not silently repin the runtime. The Editor's Draft is research input only until admitted through the #229 capability/requalification path.

Ownership boundary

Current dependency authority — 23 September 2026 KST

#229 is exact 60318092c410111924415b3e20ee3f4186e6472a, open / Draft / mergeable. W3C's live WebDriver BiDi publication history lists 16 September 2026, 14 September 2026, 9 September 2026, then 3 September 2026 Working Drafts. Current #229 owns that volatile publication receipt and keeps the independently runtime-qualified adapter pin at 3 September 2026; publication freshness alone does not repin runtime compatibility. Exact CI 35713817985 is Draft-skipped; SAST 35713817883 and Security 35713817945 are terminal SUCCESS. CodeQL 35713817902 remains nonterminal: Detect 106700519278 is SUCCESS, Actions/Python/JavaScript compatibility jobs executed and failed closed only because the authenticated terminal current-head verdict was absent, and coordinator 106826100321 remains pre-step queued with runner_id=0 and steps=[]. Fresh review inspection has 0 unresolved threads and no qualifying current-head APPROVED review.

#317 is exact 70cc9d8ab9cbb79e3f7c8635ba5c4bec67d80b73, open / Draft / non-mergeable. Fresh GitHub compare from current #229 is ahead 634 / behind 31 / diverged at merge base 8dcacbaebf2a6f02c5bbda8e8d6cc8bce474b693. Reconciliation must preserve current parent truth and all 634 valid child deltas, including Browser Session's stronger single-writer publication-provenance contract, through ordinary/non-force history.

#318 remains exact 983fa652180e47e479c99b8903755f1fd60f0746 on predecessor #317 ancestry; #321 remains 9d3c51e7ff66c952dba203a04704e53df78d2b0e; #316 remains 8ca6c5a190d9ad2b4c7843d440e91f6070d681c2. Issue #212 owns the volatile central workflow/sandbox/admission prerequisites. Canonical .github#2278 owns the AnyIO 4.14.0 → 4.14.2 repair and is GREEN on SAST/Python Security/Security while CodeQL/current-head review acceptance remains open. Canonical .github#2291 is GREEN on Runtime Quality/SAST/Security, fails Python Security only at inherited AnyIO 4.14.0 pip-audit, and has nonterminal CodeQL. Those owner lanes must converge before full central acceptance; neither source may be copied here.

The former 21 September authority named #229 3ec6326b... and a 634-ahead/25-behind relationship. Earlier history named #229 ce5074f..., #317 54d7367..., and a 164-ahead/7-behind relationship. Those values are historical only and no longer define the implementation order.

Do not implement this issue by patching volatile standards dates, central workflow logic, or parent-owned Browser Session blobs into #318/#321/#316. Required order is #212 central dependency/trusted-runtime/admission prerequisite acceptance → #229 current executable native CI/CodeQL/current-review/ruleset acceptance, with exact SAST/Security already GREEN → #317 ordinary non-force parent adoption preserving all valid deltas and current standards authority → #318/#321 ordered restack → #316 protocol proof integration → this download-start acceptance on the current generation.

Acceptance

  1. navigationStarted invalidates existing presentation mutation authority with zero adapter I/O and issues the aggregate-owned pending witness.
  2. A matching, protocol-qualified downloadWillBegin for that same navigation closes the pending navigation in a typed, auditable way without treating command ACK as browser success and without spending a presentation epoch.
  3. Retained pre-navigation authority remains fail closed.
  4. Exactly one explicit reestablish_presentation_authority may follow the qualified download-start transition; duplicate re-establishment is rejected without adapter I/O or epoch consumption.
  5. Stale, superseded, cross-context, cross-incarnation, post-destruction, or post-trust-loss download evidence is rejected before state mutation or adapter I/O. Reused raw session/context values are insufficient provenance.
  6. Destroy/recreate ABA reuse of the same raw BrowsingContextId must produce a newer aggregate-issued BrowserContextEpoch; download evidence from the destroyed ownership generation cannot close the recreated generation's pending navigation, mutate recovery evidence, resurrect retained authority, or consume a presentation epoch.
  7. A download transition in context A must not clear pending navigation state in sibling context B.
  8. Once matching downloadWillBegin consumes a navigation witness for authority transitions, delayed/replayed navigationCommitted, complete-positive, navigationAborted, and navigationFailed evidence for that consumed witness must fail AuthorityMismatch before lifecycle/recovery/authority/epoch/I/O mutation. Before re-establishment the one download-derived opportunity remains usable; after re-establishment the fresh authority remains executable and no second opportunity is created.
  9. Real runtime-qualified Chromium acceptance must exercise a response that becomes a download and prove the browser-observed post-condition, including delayed progress/terminal replay; command acknowledgement alone is insufficient.
  10. Standards doctoring/TRACEABILITY must state why downloadWillBegin is a navigation-liveness boundary while later download lifecycle events do not themselves mint Browser Session authority.
  11. Owned production rustdoc and function/line/region/branch coverage remain 100%; exact-head repository/security/browser gates must execute rather than being inferred from predecessor or skipped evidence.

Keep runtime qualification separate from standards publication freshness. This issue does not authorize a runtime repin, browser-policy widening, download persistence, central-owner source copy, or cross-owner SQL.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions