Merged
Conversation
bifurcation
approved these changes
Mar 26, 2026
Contributor
bifurcation
left a comment
There was a problem hiding this comment.
One small comment, otherwise lgtm.
Co-authored-by: Richard Barnes <rlb@ipv.sx>
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.
Add key and epoch removal API
Summary
Adds
remove_keyandremove_epochmethods toContextandMLSContextrespectively, allowing callers to remove individual keys or epochs without purging all prior state.Changes
Context::remove_key(KeyID)— Removes a single key from the SFrame context. Operations using a removed key returninvalid_parameter_error. Removing a nonexistent key is a no-op.MLSContext::remove_epoch(EpochID)— Removes a single epoch and its derived keys, without affecting other epochs. Complements the existingpurge_before()which removes all epochs below a threshold.Context::require_key(KeyID)— Protected helper that validates a key exists before use, returning an errorResultinstead of throwing viamap::at. Used byprotect,protect_inner, andunprotect_inner.map::erase(const K&)— Adds single-key erasure to the fixed-size map container.Tests
SFrame Context Remove Key— Verifies protect/unprotect fail after removal, and succeed again after re-adding the key.SFrame Context Remove Key - Nonexistent Key— Confirms removing a never-added key does not throw.MLS Remove Epoch— Verifies epoch-specific removal without affecting other epochs, and re-addition of a removed epoch.