Conversation
Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
…ll SDKs Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add method to SDK for purging stale pending attestation
Add Mar 18, 2026
retain_attestations API and CLI purge command for removing stale pending attestations
lightsing
requested changes
Mar 18, 2026
…tions_mut variant Co-authored-by: lightsing <15951701+lightsing@users.noreply.github.com>
retain_attestations API and CLI purge command for removing stale pending attestationsretain_attestations API and CLI purge command for removing stale pending attestations
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.
Adds a generic
retain_attestationsprimitive for filtering attestation leaves in timestamp trees, apurgeCLI command with interactive selection, and syncs across all SDKs.Core (
crates/core)Timestamp::retain_attestations<F>(&mut self, f: F)— generic filter takingFnMut(&RawAttestation) -> bool, returnstrueto keep. Collapses single-branch FORKs after removal.Timestamp::retain_attestations_mut<F>(&mut self, f: F)— same as above but provides&mut RawAttestationaccess, allowing in-place modification of attestations during filtering.Timestamp::purge_pending()— convenience wrapper removing all pending attestations.Rust SDK (
packages/sdk-rs)Sdk::list_pending(),Sdk::purge_pending(),Sdk::purge_pending_by_uris(stamp, uris)— built onretain_attestationsCLI (
crates/cli)uts purge <FILES>— interactive numbered selection of which pending attestations to removeall, ornone;-y/--yesskips promptTypeScript SDK
retainAttestations(stamp, shouldRetain)— genericpurgePending(stamp, urlsToPurge?)— convenience with optional selective filterGo SDK
RetainAttestations(stamp, shouldRetain)— genericPurgePending(stamp)/PurgePendingByURIs(stamp, uris)— conveniencePython SDK
retain_attestations(stamp, should_retain)— genericpurge_pending(stamp, uris_to_purge=None)— conveniencePurgeResultdataclass🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.