Summary
The ABBREVIATE redaction strategy is documented as "reduce the detected value to its initials," but it only produces initials on the PhEye NER person path. Applied to the dictionary-based name entities (SURNAME, FIRST_NAME, PHYSICIAN_NAME), it compiles and validates but at runtime silently falls back to full redaction instead of initials.
Where it works vs. does not
- Works (PhEye/NER path):
PhEyeFilterStrategy implements ABBREVIATE for the PER label via WordUtils.initials(...) so "John Smith" becomes "JS" (src/main/java/ai/philterd/phileas/services/strategies/ai/PhEyeFilterStrategy.java:184-190).
- Broken (dictionary name entities):
SurnameFilterStrategy, FirstNameFilterStrategy, and PhysicianNameFilterStrategy all extend StandardFilterStrategy (line 35 of each), and StandardFilterStrategy has no ABBREVIATE branch. An unrecognized strategy therefore hits the trailing else and is fully redacted via getRedactedToken(...) (src/main/java/ai/philterd/phileas/services/strategies/StandardFilterStrategy.java:121-124).
The strategy constant is defined at src/main/java/ai/philterd/phileas/services/strategies/AbstractFilterStrategy.java:60 (ABBREVIATE = "ABBREVIATE").
Impact
A policy intended to reduce names to initials (for example FRBP 9037 / bankruptcy redaction that reduces minors' names to initials) silently over-redacts to {{{REDACTED-...}}} when written against the dictionary name entities. The redaction is stronger than intended rather than weaker, so it is not a data-exposure bug, but the output is wrong and fails silently, and it diverges from the documented strategy semantics. The PhiSQL catalog documents ABBREVIATE as "Reduce the detected value to its initials," and PhiSQL example 04-frbp-9037.phisql and the accept case abbreviate.phisql both apply ABBREVIATE to SURNAME as if it yields initials, reinforcing the wrong expectation.
Fix
Implement ABBREVIATE in StandardFilterStrategy so it returns the value's initials (mirroring PhEyeFilterStrategy's use of org.apache.commons.text.WordUtils.initials(...)) instead of falling through to redaction. Leave the existing PhEye ABBREVIATE behavior unchanged.
This is a conformance fix that restores the documented catalog semantics; it does not require a PhiSQL RFC (per phisql CONTRIBUTING.md: "bug fixes where the spec is unambiguous and the implementation diverged from it").
Acceptance Criteria
Summary
The
ABBREVIATEredaction strategy is documented as "reduce the detected value to its initials," but it only produces initials on the PhEye NER person path. Applied to the dictionary-based name entities (SURNAME,FIRST_NAME,PHYSICIAN_NAME), it compiles and validates but at runtime silently falls back to full redaction instead of initials.Where it works vs. does not
PhEyeFilterStrategyimplementsABBREVIATEfor thePERlabel viaWordUtils.initials(...)so "John Smith" becomes "JS" (src/main/java/ai/philterd/phileas/services/strategies/ai/PhEyeFilterStrategy.java:184-190).SurnameFilterStrategy,FirstNameFilterStrategy, andPhysicianNameFilterStrategyallextend StandardFilterStrategy(line 35 of each), andStandardFilterStrategyhas noABBREVIATEbranch. An unrecognized strategy therefore hits the trailingelseand is fully redacted viagetRedactedToken(...)(src/main/java/ai/philterd/phileas/services/strategies/StandardFilterStrategy.java:121-124).The strategy constant is defined at
src/main/java/ai/philterd/phileas/services/strategies/AbstractFilterStrategy.java:60(ABBREVIATE = "ABBREVIATE").Impact
A policy intended to reduce names to initials (for example FRBP 9037 / bankruptcy redaction that reduces minors' names to initials) silently over-redacts to
{{{REDACTED-...}}}when written against the dictionary name entities. The redaction is stronger than intended rather than weaker, so it is not a data-exposure bug, but the output is wrong and fails silently, and it diverges from the documented strategy semantics. The PhiSQL catalog documentsABBREVIATEas "Reduce the detected value to its initials," and PhiSQL example04-frbp-9037.phisqland the accept caseabbreviate.phisqlboth applyABBREVIATEtoSURNAMEas if it yields initials, reinforcing the wrong expectation.Fix
Implement
ABBREVIATEinStandardFilterStrategyso it returns the value's initials (mirroringPhEyeFilterStrategy's use oforg.apache.commons.text.WordUtils.initials(...)) instead of falling through to redaction. Leave the existing PhEyeABBREVIATEbehavior unchanged.This is a conformance fix that restores the documented catalog semantics; it does not require a PhiSQL RFC (per phisql
CONTRIBUTING.md: "bug fixes where the spec is unambiguous and the implementation diverged from it").Acceptance Criteria
StandardFilterStrategy.getStandardReplacement(...)handles theABBREVIATEstrategy and returns the value's initials (for example "John Smith" produces "JS") rather than redacting.SURNAME,FIRST_NAME, andPHYSICIAN_NAMEfilters produce initials when their policy specifies theABBREVIATEstrategy.ABBREVIATEbehavior (PERlabel produces initials) is unchanged.ABBREVIATEon at leastSURNAMEandFIRST_NAME, asserting initials output for both a multi-token value ("John Smith" produces "JS") and a single-token value.04-frbp-9037.phisqlreduces surnames to initials end to end.