Alexander Whitestone
|
89c76e99cd
|
feat(mnemosyne): add tag management — add, remove, replace topics (#1236)
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 3s
Adds three methods to MnemosyneArchive for managing tags on existing entries:
- add_tags(entry_id, tags) — appends new tags, deduplicates case-insensitively
- remove_tags(entry_id, tags) — removes by case-insensitive match, unknown tags ignored
- retag(entry_id, tags) — replaces all tags, deduplicates the new list
All three raise KeyError for missing entries and persist changes immediately.
CLI commands added:
- mnemosyne tag <id> <comma-tags> — add tags
- mnemosyne untag <id> <comma-tags> — remove tags
- mnemosyne retag <id> <comma-tags> — replace all tags
11 new tests covering basic ops, deduplication, case-insensitivity, missing
entries (KeyError), empty lists, and persistence across archive reload.
Fixes #1236
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-11 19:31:14 -04:00 |
|