Skip to content

fix: store the final Drain3 template, not the first line a cluster saw - #14

Merged
catinspace-au merged 2 commits into
mainfrom
fix/release-sweep
Oct 14, 2026
Merged

catinspace-au merged 2 commits into
mainfrom
fix/release-sweep

Conversation

@catinspace-au

@catinspace-au catinspace-au commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #5 and clears everything the release run's quality job would have warned on.

  • LogPattern.template is now the template Drain3 ends on, not the first line a cluster saw, so a cluster that varies carries its <*> slots and the priority boost counts them. TemporalProcessor had the same per-entry snapshot and is fixed the same way. This changes output, which is the point of LogPattern.template is a first-seen snapshot, not the final Drain3 template #5: templates gain their slots, and because priority now counts them, which patterns survive the max_patterns cut can shift. dfe-engine's sampler imports logreducer lazily and takes the reduced lines, so its smart-mode sample can shift with it. Nothing in dfe-engine reads LogPattern.template.
  • reduce() and process_file() gain overloads, so return_metadata=True types as a dict. No runtime change.
  • Lock upgraded under a 7-day exclude-newer cooldown, which semgrep now demands in [tool.uv]. Floors move to what the lock resolves, including xxhash 4 and datasketch 2, which every consumer already resolved under the old open floors.
  • ty, ruff S, ruff D and vulture all ran warn-tier with findings. They are clean now: the S and D passes select on the command line and drop the repo ignore list, so the deliberate exemptions moved to per-file-ignores, and vulture runs at min_confidence 80 like scalo-py.
  • markdownlint, the Renovate minimumReleaseAge rule, and testcontainers 4.15's moved modules.

Done when CI is green and the release run on main emits no warnings.

extract_patterns captured cluster.get_template() when a cluster first appeared, before later lines widened its slots to <*>, so LogPattern.template was the raw first line for any cluster whose lines vary and the <*> priority boost ran on that stale text. The template is now re-read from the live cluster once the feed ends; a cluster the LRU cap evicted keeps its snapshot. TemporalProcessor had the same shape per entry and now reads each template once its window is fed. Closes #5.

reduce() and process_file() gain overloads, so return_metadata=True types as a dict and the default as list[str]. Runtime behaviour is unchanged.

Dependencies: uv lock --upgrade under a 7-day exclude-newer cooldown, which semgrep now requires in [tool.uv]. Floors move to what the lock resolves: typer 0.27.3, ruff 0.16.10 (the format gate needs 0.15.21 for --extend-exclude), testcontainers 4.15.0. xxhash 4 and datasketch 2 are the versions every consumer already resolved under the open floors, so the floors say so.

The release run's quality job would have warned on all of these, now clean:
- ty: the overloads clear the test diagnostics; the rest are test typing fixes.
- ruff S and D passes: they select rules on the command line, which drops the repo ignore list, so the deliberate S608/S311 exemptions and the D105/D107 house rule move to per-file-ignores. The remaining docstrings are fixed.
- vulture: min_confidence 80, as scalo-py runs it, so public API is not reported as unused.
- markdownlint: bare URLs and an unspaced list.
- semgrep: every Renovate packageRule sets minimumReleaseAge.
- testcontainers 4.15 moved its modules under testcontainers.community and deprecated string wait predicates.
@catinspace-au
catinspace-au merged commit 8aef23d into main Oct 14, 2026
17 checks passed
@catinspace-au
catinspace-au deleted the fix/release-sweep branch October 14, 2026 02:02
@github-actions

Copy link
Copy Markdown

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.

LogPattern.template is a first-seen snapshot, not the final Drain3 template

1 participant