Repository navigation
Conversation
added 8 commits
October 17, 2026 20:29
CHENZlHAO
marked this pull request as ready for review
October 18, 2026 02:52
This branch has not been deployed
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.
Purpose: advance the investigation and eventual fix of #395
This PR is a diagnostic step toward fixing #395: it adds the extension-side evidence needed to locate the cause of the reported reconnect failure and develop a targeted, verifiable fix.
During the reconnect silence reported in #395, daemon INFO logs cannot distinguish an outstanding physical socket attempt, a skipped controller request, pending cleanup, or a worker/alarm delivery gap. The Windows restart/sleep and controlled handshake experiments did not reproduce the reported prolonged failure; the root cause remains unconfirmed.
This adds default-off extension connection diagnostics and an investigation record. The extension options page explicitly starts/stops recording, reads stored data, exports JSON, and clears the log. Recording retains at most 2048 locally stored events with allowlisted fields, timestamps, boot/build provenance, socket generations, controller gates, cleanup/handshake outcomes, and delivered alarms. It excludes page content, URLs, tokens, arbitrary error/close text, and RPC payloads; nothing is uploaded automatically.
Opening, refreshing, and exporting the page only read stored data. Explicit controls may wake the worker. Storage failures are isolated from connection startup; pending diagnostic writes are drained before clearing. Stop/start in the same worker preserves event sequence identity. Tests cover filtering, bounds, persistence races, failure isolation, controls, and observation hooks.
Retry delays, handshake deadlines, cleanup ordering, and keepalive policy are unchanged. The manifest only adds
options_ui; the extension name, version, and permissions match the upstream baseline.Investigation and validation
docs/investigations/395-reconnect.mdrecords six successful real Windows daemon/sleep cycles, actual MV3 worker physical/application handshake faults, experimental recorder persistence across a manual reload, and simulated pending-cleanup probes, with their limits.docs/connection-diagnostics.mddescribes capture steps, privacy boundaries, and the possible scheduling effect of recording.git diff --checkpassed.options_uidiffers.This remains a draft: the new 0.3.3 opt-in controls still need manual validation in an installed Edge extension. The built options page was previewed with explicitly synthetic storage; that preview is not an installed-extension test. Actual-worker measurements in the investigation used the earlier 0.3.2 official/experimental builds. Repository-wide CI remains to run on the PR.
Related to #395. The goal remains to fix the reported reconnect failure. This PR delivers the investigation and instrumentation stage; the next step is to correlate a real failure with daemon logs, identify the cause, and add a targeted regression test and fix. The current changes do not yet resolve the failure, so #395 should remain open.