Skip to content

release: 4.8.0#166

Merged
sidmohan0 merged 10 commits into
mainfrom
dev
Jul 6, 2026
Merged

release: 4.8.0#166
sidmohan0 merged 10 commits into
mainfrom
dev

Conversation

@sidmohan0

Copy link
Copy Markdown
Contributor

Promote dev → main for the 4.8.0 stable release.

Included since v4.7.0

Notes

  • Behavior changes are consumer-visible (token ordering + mask mapping key format) → minor bump 4.7.0 → 4.8.0.
  • After merge: dispatch Release workflow (stable, version_override=4.8.0), dry-run first.

sidmohan0 and others added 10 commits July 2, 2026 15:40
…atus

Only the nlp-advanced CI profile installs litellm, so codecov's
incremental recomputation reported the guardrail adapter as uncovered
until the final uploads arrived, producing a false-red patch status on
every PR touching those files (observed on #154, #155, #159, #160).
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
@sidmohan0 sidmohan0 merged commit 9a65b42 into main Jul 6, 2026
51 checks 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.

2 participants