1.6.1: add update_expiration tool - #5
Merged
Merged
Conversation
New MCP tool that updates or resets an entry's expiration without touching the underlying S3 object — distinguishing reset (preserve data) from delete (remove data). - Accepts a UUID or word reference + optional ttl_hours. - For active entries: only adjusts expires_at. - For expired entries: reactivates with collision resolution against the base word, mirroring restore_entry semantics. - ttl_hours follows store_entry conventions (nil = default, 0 = permanent). - File entries are preserved: handler does not call DeleteFileObject, so resetting expiration on a file entry never clears its S3 object. Tests cover extending active TTL, clearing expiry with ttl=0, reactivating expired, collision on reactivation, by-word lookup, not-found, invalid TTL, empty reference, MCP-level wiring, and the S3-preservation contract.
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.
Summary
update_expiration(id-or-word + optionalttl_hours)expires_at; expired → reactivates with collision resolution (mirrorsrestore_entry)ttl_hours=0→ permanent; nil → server defaultDeleteFileObject, so resetting expiration on a file entry preserves its S3 object — establishing the "reset = preserve, delete = remove" boundaryTest plan
go build ./...go test ./...(all passing, 13 new tests)