Repository navigation
ref(android): [Nav3 Lifecycle 1] Add NavLeaseCoordinator - #6302
Open
0xadam-brown wants to merge 3 commits into
Open
0xadam-brown wants to merge 3 commits into
0xadam-brown wants to merge 3 commits into
Conversation
This was referenced Oct 20, 2026
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
0xadam-brown
marked this pull request as ready for review
October 20, 2026 15:30
0xadam-brown
requested review from
adinauer,
markushi,
romtsn and
runningcode
as code owners
October 20, 2026 15:30
Introduce the lifecycle-aware lease state machine that selects which navigation root may publish shared scope state and bind navigation transactions. Refs JAVA-274
Always forget departing navigation candidates when transaction cleanup or lease handoff fails. Preserve a successor selected before a callback throws. Add regression coverage for cleanup failures and successor lease ownership. Refs JAVA-274 Co-Authored-By: Codex <noreply@openai.com>
transferLeaseTo assigned the lease before clearing the previous owner's published nav data. When that callback threw, the new leaseholder was recorded against a stale publisher, so a later handoff cleared the wrong owner's data and never cleared the leaseholder's own. Always record the incoming candidate as the publisher once it takes the lease. Add regression coverage for handoff cleanup failures. Refs JAVA-274
0xadam-brown
force-pushed
the
feat/sentry-nav-effect-lifecycle
branch
from
October 21, 2026 11:27
c2667a5 to
c464ea3
Compare
0xadam-brown
force-pushed
the
feat/part-1-sentry-nav-effect-lifecycle
branch
from
October 21, 2026 11:27
8292382 to
a010c9e
Compare
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.
PR Stack (Nav3 Lifecycle)
📜 Description
Add the lifecycle-aware lease state machine used to coordinate multiple Navigation 3 roots that share Sentry scope state.
The coordinator selects one eligible lifecycle owner at a time, preserves displaced navigation transactions for restoration, and clears or finishes retained state when owners leave.
💡 Motivation and Context
Overlapping Activities and Fragments can keep multiple
SentryNavEffectinstances alive simultaneously. A deterministic ownership policy is needed before their scope writes can be safely coordinated.addresses: JAVA-274
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The next PR adds the lease-aware scope façade that consumes this coordinator.
#skip-changelog