Description
The formatted SSN patterns in ssn_filter.py handle ASCII hyphens, unformatted numbers, and ASCII spaces. They do not cover nonbreaking hyphens (U+2011), or an ASCII hyphen followed by a newline between groups.
Fixture difference: the Java audit used 078-05-1120, but Python explicitly excludes that identifier. Use 123-45-6789 for this parity regression so the formatting fix does not require weakening the existing exclusion rules. The exclusion itself is not the defect reported here.
Expected behavior and parity
Track parity with philterd/phileas#385, opened for finding R4 from the Philter 4.0 release audit. Recognize supported Unicode separators and line wrapping within an otherwise valid SSN. Redaction must cover the complete original identifier and preserve surrounding text.
Use these fabricated test inputs (decode the escapes before filtering):
| Case |
Input |
| ASCII control |
SSN: 123-45-6789 |
| Nonbreaking hyphens |
SSN: 123\u201145\u20116789 |
| Line wrapping |
SSN: 123-45-\n6789 |
The two variant gaps were identified by source inspection in this implementation; an end-to-end runtime reproduction has not yet been performed. Confirm the behavior with regression tests before implementing the correction.
Acceptance criteria
Description
The formatted SSN patterns in
ssn_filter.pyhandle ASCII hyphens, unformatted numbers, and ASCII spaces. They do not cover nonbreaking hyphens (U+2011), or an ASCII hyphen followed by a newline between groups.Fixture difference: the Java audit used
078-05-1120, but Python explicitly excludes that identifier. Use123-45-6789for this parity regression so the formatting fix does not require weakening the existing exclusion rules. The exclusion itself is not the defect reported here.Expected behavior and parity
Track parity with philterd/phileas#385, opened for finding R4 from the Philter 4.0 release audit. Recognize supported Unicode separators and line wrapping within an otherwise valid SSN. Redaction must cover the complete original identifier and preserve surrounding text.
Use these fabricated test inputs (decode the escapes before filtering):
SSN: 123-45-6789SSN: 123\u201145\u20116789SSN: 123-45-\n6789The two variant gaps were identified by source inspection in this implementation; an end-to-end runtime reproduction has not yet been performed. Confirm the behavior with regression tests before implementing the correction.
Acceptance criteria