Repository navigation
Persist aggregate session-count state - #335
Open
gmemuriuki wants to merge 1 commit into
Open
gmemuriuki wants to merge 1 commit into
gmemuriuki wants to merge 1 commit into
Conversation
gmemuriuki
added this pull request to stack #331
October 9, 2026 17:56
gmemuriuki
force-pushed
the
telemetry/aggregate-session-persistence
branch
2 times, most recently
from
October 14, 2026 07:51
22e0c9f to
984cedd
Compare
Add a private conversion boundary for aggregate session trackers without giving runtime tracker types general-purpose serialization. Preserve complete and permanently incomplete state through borrowed encode views and owned decode inputs. Validate raw presence, uniqueness, the 256-session bound, family-specific subset rules, and matching contribution counts through family-shaped helpers shared by encode and decode paths. Cover valid round trips and malformed representations with focused tests, and document the new persistence boundary in the module map.
nikomatsakis
force-pushed
the
telemetry/aggregate-session-persistence
branch
from
October 16, 2026 09:02
984cedd to
f13ec3a
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.
What does this PR do?
This PR adds the private wire boundary for aggregate session-count state. It is stacked on #330.
Runtime session trackers remain non-serializable. Borrowed encode views and owned decode inputs preserve complete and permanently incomplete tracking state without giving the identity-bearing runtime types a general-purpose serialization path.
Decoding rejects malformed presence combinations, duplicate or oversized session sets, invalid family-specific subset relationships, and contribution counts that disagree with their corresponding sets. The same family-shaped validation runs before encoding and after decoding.
Tests cover valid round trips, permanent incompleteness, exact set limits, duplicate sessions, subset rules, and the distinct hook/plugin versus extension contribution shapes.
Disclosure questions
AI disclosure.
Questions for reviewers.
Does this boundary preserve the trackers' completeness rules without exposing session identifiers through general-purpose serialization?