Repository navigation
refactor(session-tabs): one authority-repair lane shared by every session-tabs mirror - #27093
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
7 of 9 tasks
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.
ELI5
Behavior-neutral refactor. The desktop keeps a copy of tabs published by a host. When it drops a tab frame because the frame looks like it came from a dead publisher, it can ask the host for a full census to check. Only the local mirror had that repair. This PR moves the repair into a shared module so the paired-host mirror can use it in the next PR in this stack.
What Changed
Before / after for users: none. Same behavior.
Mechanism:
local-structured-session-tabs-sync/retired-epoch-repair.ts(the bounded, decaying census scheduler) becomesweb-session-tabs-sync/session-tabs-authority-repair.ts, a factory that creates one repair lane per mirror. The census call, the "is this still the same generation" fence and the "is the epoch still retired" check are injected. The local module keeps its exported functions and just binds the shared lane, so its tests are unchanged.publisher-identity-fences.tsasadmitRetiredValueUnderAuthority, with an optional matcher so the paired mirror can apply it to a whole publication lineage. The now-unusedreviveRetiredValueexport is removed.Why
The paired mirror has the same bug the local mirror already fixed (a live publisher returning after a brief headless writer is treated as dead, #21928). Reusing one lane keeps the attempt budget, backoff and decay identical for both mirrors instead of writing a second scheduler.
Linked Issue
Prepares the fix for #21928 (next PR in the stack). No issue is fixed by this PR alone.
Visual Proof
N/A: no behavior change.
Testing
retired-epoch-repair.test.ts,local-structured-session-retired-epoch-repair.test.tsandlocal-structured-session-tabs-sync.test.tspass unchanged; theweb-session-tabs-syncandlocal-structured-session*suites pass.pnpm tc:web,oxlint,pnpm run check:code-quality:changed.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Renderer-only refactor; no wire, SSH, platform or folder-workspace impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)