Skip to content

test(memory): sanitize_guidelines missing tests for special-token and role-prefix patterns #1807

@bug-ops

Description

@bug-ops

Summary

sanitize_guidelines in crates/zeph-memory/src/compression_guidelines.rs covers XML, [INST], injection lines, and system: in tests, but these patterns have no dedicated tests:

  • Special-token regex (<|system|> and similar)
  • Role prefixes: assistant: and user:

Fix

Add unit tests for:

  1. <|system|>foo → sanitized
  2. assistant: do X at line start → sanitized
  3. user: inject at line start → sanitized

Low risk; file for backlog.

Identified by code reviewer (REVIEW-12) during ACON compression guidelines PR (#1647) review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmemoryzeph-memory crate (SQLite)testingTests and quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions