routine: memory-deprecated-at (2026-07-24) - #116
Draft
jim4226 wants to merge 1 commit into
Draft
Conversation
promote() already records promoted_at; deprecate_live() recorded a reason but not a timestamp, so the audit trail couldn't answer "how long has this been deprecated" without re-deriving it from the event log. Mirrors Claude Code 2.1.214's addition of a modified timestamp to memory file frontmatter (2026-07-18). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smd58WtDGyWszXyEcVbG6h
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
MemoryStore.promote()already stampspromoted_aton the entries it moves to live, butdeprecate_live()only recorded adeprecated_reason— no timestamp. This adds adeprecated_at: Optional[float]field toMemoryEntryand stamps it indeprecate_live(), giving the audit trail parity: "how long has this entry been deprecated" is now a direct field read instead of a re-derivation from the event log.modifiedtimestamp to memory file frontmatter."csis/contracts.py(MemoryEntry.deprecated_at),csis/memory/store.py(deprecate_live()),tests/test_memory.py(new regression test)Coordinator.__init__,_BackendTracker,writer_iteration_id, promotion CAS); the field is optional and backward-compatible, matching the existingwriter_iteration_idoptional-field pattern.Test plan
python -m pytest tests/ -q— 251 passed (was 250; addedtest_deprecate_live_stamps_deprecated_at)deprecated_atis populated within a[before, after]window around thedeprecate_live()callOpened by the CSIS daily-improvement routine per
.claude/routines/daily-improvement.md. Full day's triage (including deferred items) lands inbrain/routines/2026-07-24.mdvia a separate log PR.Generated by Claude Code