Skip to content

feat: Browser extension H2 browser runtime lifecycle protected sessions and actual browser harnesses (#703) - #719

Merged
efraespada merged 13 commits into
developfrom
feature/703-browser-extension-h2-browser-runtime-lifecycle-protected-sessions-and-actual-browser-harnesses
Oct 26, 2026
Merged

efraespada merged 13 commits into
developfrom
feature/703-browser-extension-h2-browser-runtime-lifecycle-protected-sessions-and-actual-browser-harnesses

Conversation

@efraespada

@efraespada efraespada commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Adds the shared H2 runtime for the complete GitHub productivity extension. Navigation, revoked permissions and concurrent Connect attempts cannot publish an obsolete page/account result or disconnect a newer connection. Native GitHub drafts, selection and focus remain owned by GitHub.

Changes

  • Add scoped mount/refresh/dispose with immutable route/object/settings/credential fences, bounded atomic settings/migration/rollback and localized connection/recovery UI.

  • Keep credentials and scheduler state in protected session storage; local storage holds only nonsecret preferences. Expose closed semantic GET projections with bounded quotas, cache, independent cancellation and provider backoff.

  • Fence Connect preference persistence and failure cleanup to the current operation/session. Native tab URL/loading events cancel background page leases, including protected routes and same-URL reloads.

  • Open private runtime settings through a trusted native button and closed background action in the originating verified window. Same-document messages validate both native frame provenance and the current tab; arbitrary URLs, extra message fields and protected/private contexts remain rejected. No new permissions or public extension resources.

  • Package all three targets reproducibly. Native harnesses focus only their inert authored fixture heading, require real visibility, click the actual settings button and follow exactly one new native context. Safari verifies the actual registered containing extension identity, signature and embedded resources. Cleanup finishes before success evidence is published.

  • Pin and verify official ESR/driver archive digests before extraction. Update the SDD, capability catalog and user/developer documentation together. The complete 150-feature/803-case product and local center/setup journeys retain their owning milestone scope.

  • Reject computed network API acquisition outside the designated reader, including function/key aliases, optional access, computed binding names and literal-union keys. Eight actual AST regressions preserve unrelated data and the reader exemption.

Verification

Current head: 0ab51bfcbfa86eaa8b81631365d9287a106b268c. Complete extension input-tree SHA-256: 60c22c6de3c06bd5e3b34320ac7acfc733a77ec9601c5aa04805b4e04da843c5.

  • Mandatory commit checks pass: build, lint, 717 Jest suites / 12,144 tests (35 pre-existing skips).
  • Extension: 267 tests in 30 files, including all 38 H2 case IDs and eight additional architecture regressions. 1,193 lines / 1,472 branches / 1,803 statements / 291 functions: all 100% covered. No exclusions or thresholds were weakened.
  • The same 267-case suite passes with the verified official Node 24.0.0 binary and the same measured coverage. Locked dependencies retain the compatible graph.
  • Actual Chrome 156.0.8078.47, Firefox 158.0.1 and Safari 27.0.1 each pass all 19 native loaded-extension assertions on this exact revision and digest. This includes real private-settings navigation, 20 route cycles, native draft/selection/focus, protected-route disposal/resume, native APIs/manifest semantics, all three executed source stamps, explicit Disconnect, arbitrary-fetch rejection and completed driver cleanup.
  • Safari uses the verified registered ad hoc containing extension invalid.extensions.copilot.h2.Extension (UNSIGNED) on macOS 27.0.1 / Xcode 27.1. Its actual embedded resources match the current three-target build.
  • Architecture/package gates, two clean reproducible builds, types, specification/catalog and documentation validation pass; Graphify is current. Official browser/driver archives were checked against the retained upstream pins before extraction.
  • Fresh CI, hosted platform jobs, Linux ESR native receipt, Codecov and automated finding verification are still pending. The computed-authority finding is corrected in this head and awaits automated reconciliation. No merge or clean current-head review is claimed yet.

Evidence limits

No real credential or private repository is used. Native evidence executes genuine extension code/APIs against an independently authored fixture after a public github.com bootstrap. API-floor/absence contracts remain separate deterministic tests; older floor browser binaries are not presented as executed. The macOS ESR startup failure remains separate from Linux ESR acceptance. Full product features, multi-OS/version and human accessibility/performance acceptance, store signing and publication retain their owning milestone scope.

Closes #703

vypbot and others added 2 commits October 25, 2026 22:20
…sessions-and-actual-browser-harnesses: Implement scoped browser runtime protected read sessions and native harnesses for #703
@docs-page

docs-page Bot commented Oct 26, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/copilot~719

Documentation is deployed and generated using docs.page

@vypbot vypbot added size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. state:ai-processing labels Oct 26, 2026
@vypbot vypbot changed the title Implement browser extension H2 runtime, protected sessions and native harnesses feat: Browser extension H2 browser runtime lifecycle protected sessions and actual browser harnesses (#703) Oct 26, 2026
@vypbot
vypbot self-requested a review October 26, 2026 09:12
@vypbot vypbot added this to vypdev Oct 26, 2026
@vypbot vypbot moved this to In Progress in vypdev Oct 26, 2026
@vypbot
vypbot changed the base branch from develop to master October 26, 2026 09:12
@vypbot
vypbot changed the base branch from master to develop October 26, 2026 09:13
@vypbot vypbot added the 65% Progress: 65% label Oct 26, 2026

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 3 potential problems when commit 3fb9bd3 was analyzed. This snapshot is historical; use the status block above for current state. 3 findings are linked to changed code.

Findings

  • medium: ESR version check rejects the pinned browser — extension/tooling/runtime_harness.mts:12
  • medium: Safari extension installation uses an unsupported WebDriver route — extension/tooling/webdriver.mts:70
  • low: HTTP-date Retry-After values are ignored — extension/src/adapters/github/get_reader.ts:27

Comment thread extension/tooling/runtime_harness.mts Resolved
Comment thread extension/tooling/webdriver.mts Resolved
@vypbot

vypbot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Bugbot: review complete

Current status: No active findings on 0ab51bf.

Pull request · Verified commit · Workflow run

@vypbot

vypbot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Copilot approval · Human review needed

Status: A protected workflow, policy, or trust-boundary file changed.
Completed: 1/1 observed checks succeeded; Bugbot complete.
Action required: Ask a human reviewer to decide.
Impact: No new approval is confirmed for this revision.
See checks

Technical evidence

Revision: 0ab51bfcbfa8; base: 70ce42834220; reason: protected-path.

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.42%. Comparing base (70ce428) to head (0ab51bf).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #719      +/-   ##
===========================================
+ Coverage    94.25%   94.42%   +0.16%     
===========================================
  Files          990     1024      +34     
  Lines        32046    32997     +951     
  Branches      9404     9728     +324     
===========================================
+ Hits         30205    31156     +951     
  Misses         702      702              
  Partials      1139     1139              
Files with missing lines Coverage Δ
extension/src/adapters/browser/api.ts 100.00% <100.00%> (ø)
extension/src/adapters/browser/cancellation.ts 100.00% <100.00%> (ø)
extension/src/adapters/browser/resource_scope.ts 100.00% <100.00%> (ø)
extension/src/adapters/browser/storage.ts 100.00% <100.00%> (ø)
extension/src/adapters/dom/runtime_panel.ts 100.00% <100.00%> (ø)
extension/src/adapters/github/get_reader.ts 100.00% <100.00%> (ø)
extension/src/application/lifecycle.ts 100.00% <100.00%> (ø)
extension/src/application/message_gateway.ts 100.00% <100.00%> (ø)
extension/src/application/protected_session.ts 100.00% <100.00%> (ø)
extension/src/application/read_scheduler.ts 100.00% <100.00%> (ø)
... and 29 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…sessions-and-actual-browser-harnesses: Preserve provider retry deadlines and local recovery guidance for #703

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit 90332c5 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • low: Failed Xcode builds do not save the build log — extension/tooling/safari_container.mts:43

Comment thread extension/tooling/safari_container.mts Resolved

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 3 potential problems when commit 47c6b3f was analyzed. This snapshot is historical; use the status block above for current state. 3 findings are linked to changed code.

Findings

  • medium: Release the background page lease when the route becomes ineligible — extension/src/infrastructure/content_runtime.ts:31
  • medium: A stale Connect request can revoke a newer session — extension/src/application/message_gateway.ts:76
  • low: Use separate storage areas in the browser fixture — extension/test/fixtures/browser.ts:21

Comment thread extension/test/fixtures/browser.ts Resolved
…sessions-and-actual-browser-harnesses: Fence gateway persistence and native navigation scopes for #703

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit 742ab5b was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • medium: Downloaded browser binaries are hashed but not verified — .github/workflows/setup_platform_smoke.yml:672

…sessions-and-actual-browser-harnesses: Verify native browser download digests before extraction for #703
@vypbot vypbot added 55% Progress: 55% state:ai-processing and removed 65% Progress: 65% labels Oct 26, 2026

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit be6e2be was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • medium: Oversized response assertion fails on a locked stream — extension/test/contracts/runtime_reads.test.ts:69

…sessions-and-actual-browser-harnesses: Open private settings through native browser actions for #703
…sessions-and-actual-browser-harnesses: Establish native fixture focus before browser acceptance for #703
…ifecycle-protected-sessions-and-actual-browser-harnesses
@vypbot

vypbot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Branch synchronized

develop was merged into feature/703-browser-extension-h2-browser-runtime-lifecycle-protected-sessions-and-actual-browser-harnesses and pushed as a80860501df9d11ec3dd8c0ff0a3d3891bec92f3.

6 verification checks passed.

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current status: All findings originating in this review are resolved.
Last reconciled on 0ab51bf. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit a808605 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • medium: Bracket access bypasses the network-authority check — extension/tooling/architecture_validation.mts:49

…sessions-and-actual-browser-harnesses: Reject computed network authority outside the reader for #703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

60% Progress: 60% size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. state:verified

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

✨🧑‍💻 - Browser extension H2 browser runtime lifecycle protected sessions and actual browser harnesses

3 participants