Skip to content

Persist aggregate session-count state - #335

Open
gmemuriuki wants to merge 1 commit into
telemetry/aggregate-recording-coordinatorfrom
telemetry/aggregate-session-persistence
Open

gmemuriuki wants to merge 1 commit into
telemetry/aggregate-recording-coordinatorfrom
telemetry/aggregate-session-persistence

Conversation

@gmemuriuki

Copy link
Copy Markdown
Contributor

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.

  • The AI tool authored large parts of the code

Questions for reviewers.

Does this boundary preserve the trackers' completeness rules without exposing session identifiers through general-purpose serialization?

@gmemuriuki
gmemuriuki added this pull request to stack #331 October 9, 2026 17:56
@gmemuriuki gmemuriuki self-assigned this Oct 9, 2026
@gmemuriuki
gmemuriuki force-pushed the telemetry/aggregate-session-persistence branch 2 times, most recently from 22e0c9f to 984cedd Compare October 14, 2026 07:51
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
nikomatsakis force-pushed the telemetry/aggregate-session-persistence branch from 984cedd to f13ec3a Compare October 16, 2026 09:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant