feat(patterns): opt-in typed Drain3 masking for template slots - #4
Merged
Merged
Conversation
typed_masking=False stays byte-identical to today. On, a curated ordered masking set (IP, UUID, MAC, IPv6 best-effort, HEX, NUM) runs before clustering so templates carry typed slots (<IP>, <NUM>, ...) instead of the bare <*> - the DFE synthetic-data generator inverts those templates and typed slots make slot classification reliable. Opt-in because masking normalises lines BEFORE Drain3 clusters them, so cluster boundaries can differ from the unmasked default. Examples still carry the original unmasked lines.
docs/JIRA_OAUTH_SETUP.md shows a curl example with the literal ACCESS_TOKEN placeholder in an Authorization header (committed 2025-08-26); gitleaks' curl-auth-header rule flags it on every scan of history. Documentation, not a credential - path-allowlisted.
pip-audit blocks the Quality gate on the lock's 49.0.0 - the PKCS#7 Bleichenbacher oracle already bumped across the fleet. Security fix, cooldown bypassed per the pinning rules; unit suite green on 50.0.0.
|
Released in v3.5.0 — https://github.com/hyperi-io/logreducer/releases/tag/v3.5.0 |
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.
The DFE synthetic-data generator inverts logreducer templates, and typed slots make that inversion reliable - tells the generator exactly what to synthesise where a bare <*> forces guessing.
typed_masking=False (the default) is byte-identical to today: no masking instructions are configured and every existing test passes unchanged. On, a curated ordered set masks IPv4, UUID, MAC, best-effort IPv6, hex tokens and numbers before clustering. Order is load-bearing (instructions run sequentially over already-masked text) so the specific shapes precede the greedy ones, IPv6 requires the full form or a :: so timestamps stay unmasked, and HEX requires 0x or an a-f letter so long decimals stay NUM. Pattern examples still carry the original unmasked lines.
Done when: 46 touched-file tests green, full suite green apart from one pre-existing throughput flake (passes in isolation) and lint/type baselines A/B-verified identical to main. Drain3 masking API verified from the installed 0.9.11 source.