Skip to content

fix: omo-system-reminder filter strips blocks, preserves user content - #271

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-04_filter-strip-user-content
Aug 3, 2026
Merged

fix: omo-system-reminder filter strips blocks, preserves user content#271
ranxianglei merged 1 commit into
masterfrom
2026-08-04_filter-strip-user-content

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Bug: Filter drops user content with <system-reminder> blocks

Problem

The omo-system-reminder filter (v1.2.0) returned { action: "drop" } for ANY user message containing <system-reminder> blocks — even when user text was also present. Phase 2 keepLastOnly then hard-dropped older matches entirely, losing the user's actual message content.

Fix (2 changes)

1. Filter v1.3.0: Strip <system-reminder> blocks, return modify when user content remains, drop only for pure OMO messages.

2. Phase 2: Apply filter's actual decision for older matches instead of unconditional drop.

Tests

  • 954 tests pass, typecheck clean
  • New regression test: mixed user content + blocks, oldest stripped (text preserved), latest kept

Filter v1.2.0 returned { action: "drop" } for ANY user message containing
<system-reminder> blocks, even when user text was also present. Phase 2
keepLastOnly then hard-dropped older matches entirely — losing the user's
actual message content.

Two fixes:
1. Filter v1.3.0: strip <system-reminder> blocks, return modify when user
   content remains, drop only for pure OMO messages (no user text)
2. Phase 2: apply filter's actual decision for older matches instead of
   unconditional drop — strips stale blocks while preserving user text
@ranxianglei
ranxianglei merged commit 411fe4f into master Aug 3, 2026
5 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