Skip to content

1.6.1: add update_expiration tool - #5

Merged
glani merged 1 commit into
mainfrom
1.6.1-alpha
May 4, 2026
Merged

1.6.1: add update_expiration tool#5
glani merged 1 commit into
mainfrom
1.6.1-alpha

Conversation

@glani

@glani glani commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New MCP tool update_expiration (id-or-word + optional ttl_hours)
  • Active entry → adjusts expires_at; expired → reactivates with collision resolution (mirrors restore_entry)
  • ttl_hours=0 → permanent; nil → server default
  • File entries: handler does NOT call DeleteFileObject, so resetting expiration on a file entry preserves its S3 object — establishing the "reset = preserve, delete = remove" boundary

Test plan

  • go build ./...
  • go test ./... (all passing, 13 new tests)
  • Service tests cover: extend active, ttl=0 clears, reactivate expired, reactivate-with-collision (UUID), by-word lookup, not-found, invalid TTL, blank ref
  • MCP handler tests for active update, ttl=0, reactivate expired, not-found
  • File-service test asserts S3 fake records zero deletes during update_expiration on a file entry

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.
@glani
glani merged commit 9f7be2c into main May 4, 2026
12 checks passed
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