Skip to content

Release 1.2.0: learned confidence classifier, graph/vault benchmarks, transform tests#5

Merged
umudhasanli merged 2 commits into
mainfrom
release/1.2.0
Jul 24, 2026
Merged

Release 1.2.0: learned confidence classifier, graph/vault benchmarks, transform tests#5
umudhasanli merged 2 commits into
mainfrom
release/1.2.0

Conversation

@GravityHaxx

Copy link
Copy Markdown
Collaborator

Ships the learned secret-confidence classifier (#4, thanks @Doofz!) as the headline of 1.2.0, plus the quality layer around it.

What's in 1.2.0

  • Learned confidence classifier (already on main from add learned confidence classifier to cut generic-detector false positives #4): opt-in refineConfidence scoring for generic detectors, new flare-redact/ml subpath, --refine-confidence CLI flag. Verified in review: deterministic seeded training reproduces the shipped weights byte-for-byte; behavior probed on real vs benign strings (random token 0.99, git SHA 0.04, UUID 0.007).
  • New benchmarknpm run benchmark:graph covers what adapter users actually hit: redact() on flat strings and deep object graphs, and vault mint+restore round trips. Previously only scan() was measured.
  • New tests — direct coverage for the thinnest areas of the suite: shape-preserving transforms (keyed pseudonymization, Luhn-valid card surrogates, email/person stand-ins) and mapGraph traversal (URL/URLSearchParams rewriting, Error prototypes with custom props, shared references, sparse arrays, symbol keys, Map/Set).

Verification

  • 170/170 tests pass on Node 20/22/24 (was 162).
  • npm pack --dry-run clean (103.4 kB, 114 files).
  • Bench sanity on this machine: 100 kB log string p50 ≈ 1.7 ms; 1,000-object graph p50 ≈ 11 ms; vault round trip (100 objects) p50 ≈ 1.9 ms.

Version bumped to 1.2.0 — merging publishes to npm via CI.

… transform tests

- Ship the secret-confidence classifier (PR #4) as 1.2.0's headline:
  opt-in refineConfidence scoring for generic detectors, exported via
  the new flare-redact/ml subpath and --refine-confidence in the CLI.
- Add bench/graph-vault.mjs (npm run benchmark:graph): redact() on flat
  strings and deep object graphs, and vault mint+restore round trips.
- Add direct unit tests for pseudonymize/surrogate (Luhn-valid card
  surrogates, keyed determinism) and mapGraph traversal (URL,
  URLSearchParams, Error prototypes, shared refs, sparse arrays,
  symbol keys, Map/Set). 162 -> 170 tests.
@GravityHaxx
GravityHaxx requested a review from umudhasanli as a code owner July 24, 2026 06:59
…e coverage

- phone (opt-in) now matches formatted national numbers ((555) 123-4567,
  +90 532 123 45 67, trunk-0 forms) with digit-count validation and a
  date guard; bare digit runs still never match.
- New default-on detectors: gcp_service_account (private_key_id in
  service-account JSON) and gcp_refresh_token (1// OAuth tokens).
- CI now smoke-tests the dependency-free core on Bun and Deno via
  scripts/runtime-smoke.mjs; publish depends on both passing.
- README: React/browser usage section. 170 -> 174 tests.
@umudhasanli
umudhasanli merged commit 2ca67aa into main Jul 24, 2026
5 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