Skip to content

fix: strip matching Tags footer only during compaction restore - #276

Closed
phil-lipp wants to merge 1 commit into
tickernelz:mainfrom
phil-lipp:fix/matching-tags-footer
Closed

fix: strip matching Tags footer only during compaction restore#276
phil-lipp wants to merge 1 commit into
tickernelz:mainfrom
phil-lipp:fix/matching-tags-footer

Conversation

@phil-lipp

Copy link
Copy Markdown
Contributor

Auto-capture embeds a "Tags: ..." footer inside the memory body (added in #131); compaction restore appends its own canonical Tags line, duplicating the tags in the restored context.

Strip a trailing Tags: footer only when its normalized value matches the structured tags, so auto-capture duplicates disappear without dropping user-authored Tags: content on manual/API/imported memories.

Replaces #249 (same change; that PR retained stale author metadata from earlier force-pushed commits).

Regression from #131.

Test plan

  • Compaction tests (isolated HOME)
  • Mutation: greedy strip fails the unmatched-footer regression
  • Typecheck, production build, full suite after build

Auto-capture embeds a Tags: line in the body; compaction also appends
structured tags. Remove the trailing footer only when it matches those
tags so user-authored Tags: content is preserved.
@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #249. Mergify cannot evaluate rules on this PR. Once #249 is merged or closed, Mergify will resume processing this PR. ⚠️

@phil-lipp

Copy link
Copy Markdown
Contributor Author

Opened by mistake; the change stays on #249.

@phil-lipp phil-lipp closed this Aug 25, 2026
@phil-lipp
phil-lipp deleted the fix/matching-tags-footer branch August 25, 2026 12:16
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