Skip to content

Presidio fail-loud: surface NER degradation instead of silent regex fallback#18

Merged
0xadvait merged 1 commit into
mainfrom
presidio-fail-loud
Jun 23, 2026
Merged

Presidio fail-loud: surface NER degradation instead of silent regex fallback#18
0xadvait merged 1 commit into
mainfrom
presidio-fail-loud

Conversation

@0xadvait

Copy link
Copy Markdown
Collaborator

Review finding 1.4. If .presidio is set (NER expected) but Presidio/spaCy fails to import or warm up, the bridge silently fell back to the regex scrubber -- which, with an empty denylist, scrubs no names. The only signal was a log line. For a privacy tool that's the dangerous quiet-failure mode.

Now the bridge verifies NER actually works at startup; if not, it writes a .presidio_failed marker (and logs loudly), and bin/ghost surfaces it in the status line (⚠️ NER scrubber OFF (regex fallback)). Cleared on success / when NER isn't expected. pytest tests/ -> 34 pass; verified live (NER active -> no marker, status clean).

…t regex fallback

If the .presidio marker is set (NER expected) but Presidio/spaCy fails to import or
warm up, the bridge silently fell back to the regex scrubber -- which with an empty
denylist scrubs NO names. Only signal was a log line. For a privacy tool that's the
dangerous failure mode.

Now the bridge proves NER works at startup and, if not, writes a .presidio_failed
marker (and logs loudly); bin/ghost surfaces it in the status line (⚠️ NER scrubber
OFF). The marker is cleared on success / when NER isn't expected. Tests -> 34.
@0xadvait
0xadvait merged commit 77ee4de into main Jun 23, 2026
3 checks passed
@0xadvait
0xadvait deleted the presidio-fail-loud branch June 23, 2026 20:10
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