Conversation
ci: make codecov wait for all coverage uploads before computing status
…ith measured results Every performance number DataFog publishes is now reproducible with one command: python benchmarks/run.py. Suites: core scan/redact throughput, LiteLLM guardrail (DataFogGuardrail), Claude Code hook (datafog-hook subprocess incl. startup), plus clearly-labeled comparisons against presidio-analyzer and spaCy NER on identical pinned payloads (manifest-verified detection counts before timing; en_core_web_sm pinned, favorable to comparison targets, so ratios are lower bounds). Claims aligned with measured results (Apple M5 Pro reference numbers in benchmarks/README.md): - LiteLLM guardrail: '~31µs per request' was really per-scan; reworded to ~40µs per message scanned (full 2-msg request: ~120µs clean / ~220µs with redaction+litellm logging). - Claude Code hook: ~70ms confirmed (69-89ms median incl. startup); reworded to ~70-90ms. - '190x performance advantage' tagline not reproducible (measured 103-170x vs Presidio, 114-140x vs spaCy); reworded to '100x+ faster than NER-based detection' in setup.py, setup_lean.py, __init__ docstrings, AGENTS.md, docs/roadmap.rst. Also refresh docs/roadmap.rst to current state (4.1-4.7.0 shipped, 4.7.x precision patches, v5.0.0 themes from the public roadmap) and add a ROADMAP.md stub pointing at it as the single source of truth (removing the stale case-insensitive Roadmap.md gitignore entry that swallowed it). Benchmark deps stay out of the core package (benchmarks/requirements.txt); benchmarks/ has no __init__.py so nothing ships in the wheel.
feat: reproducible benchmark suite; align published perf claims with measured results
redact() assigned per-type counters during the right-to-left span replacement loop, so with multiple entities of the same type the last occurrence received _1 (e.g. [EMAIL_2] ... [EMAIL_1]). Replacements are now precomputed in ascending document order and applied right-to-left, so the first occurrence of each type always gets _1 for the token and pseudonymize strategies. Also: RedactResult.entities is now ordered by document position (ascending), and mapping originals are read from the immutable input text instead of the partially-replaced string, preventing token leakage into mapping values on overlapping spans.
- redact() now suppresses overlapping/duplicate entity spans before applying replacements: longest span wins, ties broken by entity type priority then confidence (same rule as the regex scan pipeline) - mask strategy mapping is keyed by per-type indexed keys ([EMAIL_MASK_1]) instead of the mask string, which collided for distinct same-length values and silently dropped originals
fix: number redaction tokens in document order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote dev → main for the 4.8.0 stable release.
Included since v4.7.0
redact()(longest-wins, ties by type priority then confidence)maskstrategy mapping keyed by indexed keys ([EMAIL_MASK_1]) instead of the colliding mask stringNotes