Found while adding typed masking (#4). extract_patterns captures cluster.get_template() only when a cluster FIRST appears - before later lines widen slots to <*>. So the stored template for a cluster whose lines differ is the raw first line, never the wildcarded template Drain3 ends up with.
Two consequences:
- consumers reading LogPattern.template (incl the DFE synthetic-data inversion) see a template with NO slots for clusters that genuinely vary
- the <*>-count priority boost in _calculate_priority runs on the stale snapshot, so complex patterns are under-boosted
Fix is a one-liner shape (re-read cluster.get_template() after the feed loop) but it changes output for every existing consumer, so it wants its own change with eyes on the priority impact. Done when the stored template equals the live cluster template at extraction end and priorities are computed from it.
Found while adding typed masking (#4). extract_patterns captures cluster.get_template() only when a cluster FIRST appears - before later lines widen slots to <*>. So the stored template for a cluster whose lines differ is the raw first line, never the wildcarded template Drain3 ends up with.
Two consequences:
Fix is a one-liner shape (re-read cluster.get_template() after the feed loop) but it changes output for every existing consumer, so it wants its own change with eyes on the priority impact. Done when the stored template equals the live cluster template at extraction end and priorities are computed from it.