Skip untouched Drive mirrors and expose sync queue diagnostics - #394
Merged
Merged
Conversation
Signed-off-by: Jeremy lewi <jeremy@lewi.us>
Signed-off-by: Jeremy lewi <jeremy@lewi.us>
Collaborator
Author
|
Reviewed the source-selection predicate, local/OPFS recovery paths, queue transitions and timing, owner RPC/protocol compatibility, chart retention/polling, and the status page's bulk action. No external review threads were present. Addressed findings:
Focused review regressions: 299 passing tests across storage, RPC, queue, Actions and status/chart UI. |
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.
Mirroring a Drive folder currently marks every empty checksum as pending work, including files never downloaded or edited. This can enqueue hundreds of untouched notebooks ahead of new upstream creations. Require an OPFS log reference or cached legacy model for unknown-checksum work, while retaining pending creation, failed-download retries and conflict handling. Untouched placeholders now show as not-downloaded and are excluded from the status page’s bulk Sync Required action.
Add owner-side queue diagnostics to Drive status: an hour of peak queue depth in 10-second buckets, an eligible-to-dequeue wait histogram, and current eligible/delayed/active counts, oldest eligible wait and active duration. Metrics are bounded, shared across tabs and available even when the view was closed. Repeated wake/manual requests preserve already-eligible timestamps. Diagnostics time out after ten seconds with a specific error; charts show their last update time. The added RPC advances the storage-owner protocol to 3; existing tabs may need reopening together after deployment.
Validation:
runme run build test; full app suite (1,769 passing tests with two workers); focused review regressions (299 passing); browser inspection of both charts. An existing Actions lifecycle test hit its five-second timeout in the default-parallel full run; the complete rerun passed without changing timeouts. Regressions cover 1,000 untouched mirrors, bulk-sync exclusion, legitimate pending work, deduplication, eligibility/backoff timing, bounded history and two-tab RPC access. Standalone app typecheck has 125 errors on both base and branch, with no added file/error-code diagnostics.Design and acceptance cases are in
docs-dev/design/20260923_drive_queue_over_enqueuing.mdanddocs-dev/CUJs/drive-sync-recovery.md.Fixes #393