-
-
Notifications
You must be signed in to change notification settings - Fork 132
feat(delegates): restore-from-snapshot API and CLI for delegate secrets #4036
Copy link
Copy link
Open
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionA-developer-xpArea: developer experienceArea: developer experienceE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-mediumMedium priorityMedium priorityS-needs-designStatus: Needs architectural design or RFCStatus: Needs architectural design or RFCT-featureType: New functionality requestType: New functionality request
Metadata
Metadata
Assignees
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionA-developer-xpArea: developer experienceArea: developer experienceE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-mediumMedium priorityMedium priorityS-needs-designStatus: Needs architectural design or RFCStatus: Needs architectural design or RFCT-featureType: New functionality requestType: New functionality request
Problem
PR #4034 added per-secret snapshot-on-write retention so prior values survive an accidental overwrite. The snapshots are encrypted, decryptable, and bounded — but there is no API or CLI to actually restore one. Today users must manually move files in
{delegate_dir}/.snapshots/{secret_id}/over the active path.Proposal
A read API on
SecretsStore:And an
fdevwrapper:Restore semantics: copy the chosen snapshot back through the same hard-link + atomic rename path that
store_secretuses, taking a fresh snapshot of the value being replaced first (so restore is itself recoverable).Why a separate issue
The base PR scoped to "preserve prior values, don't lose data". User-facing recovery UX has its own design questions (timestamp display, partial restores, dry-run). Worth its own review cycle.
Related
[AI-assisted - Claude]