Skip to content

Fix ABBREVIATE strategy to return initials - #62

Merged
jzonthemtn merged 1 commit into
philterd:mainfrom
iamvalenciia:agent/fix-abbreviate-strategy
Jul 13, 2026
Merged

Fix ABBREVIATE strategy to return initials#62
jzonthemtn merged 1 commit into
philterd:mainfrom
iamvalenciia:agent/fix-abbreviate-strategy

Conversation

@iamvalenciia

Copy link
Copy Markdown

Summary

  • implement the ABBREVIATE runtime strategy by returning the uppercase initial of each whitespace-separated word
  • expose the runtime strategy constant and document the supported behavior
  • add coverage for SURNAME, FIRST_NAME, and the PhEye/NER person path, including multi-token and single-token values

Root cause

ABBREVIATE was present in the policy model, but StandardFilterStrategy.GetStandardReplacement(...) had no matching switch arm. Policies could therefore request the strategy, but runtime filters silently fell through to the default redaction behavior.

Impact

Values such as John Smith now produce JS instead of a full redaction token. Because the fix is in the shared standard strategy, dictionary name filters and PhEye use the same behavior.

Validation

  • dotnet test tests/Phileas.Tests/Phileas.Tests.csproj --no-restore --verbosity minimal
  • .NET 8: 1,094 passed, 0 failed, 5 skipped
  • .NET 10: 1,094 passed, 0 failed, 5 skipped

Closes #58

@jzonthemtn

Copy link
Copy Markdown
Member

Thanks @iamvalenciia!

@jzonthemtn
jzonthemtn marked this pull request as ready for review July 13, 2026 16:23
@jzonthemtn
jzonthemtn merged commit 3377ed4 into philterd:main Jul 13, 2026
1 check 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.

ABBREVIATE strategy redacts all entities instead of producing initials

2 participants