Skip to content

chore: update drain3 default log pattern weights#28214

Closed
github-actions[bot] wants to merge 1 commit intomainfrom
ci/train-drain3-weights-20260424
Closed

chore: update drain3 default log pattern weights#28214
github-actions[bot] wants to merge 1 commit intomainfrom
ci/train-drain3-weights-20260424

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This pull request updates the default Drain3 log pattern weights (pkg/agentdrain/data/default_weights.json) by training on the most recent workflow run logs.

What changed

  • Re-trained log template clusters from the latest run logs using gh aw logs --train
  • Copied resulting drain3_weights.json to the embedded defaults path

How to verify

  1. Build the binary with make build
  2. Run gh aw audit or gh aw logs --train and confirm the anomaly analysis reflects the updated patterns

This PR was created automatically by the train-drain3-weights workflow.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor Author

Hey @github-actions[bot] 👋 — thanks for the automated update to the Drain3 default log pattern weights! Keeping these trained on the latest workflow run logs is a great way to ensure anomaly analysis stays accurate and current.

One thing worth considering:

  • No test coverage — the diff touches pkg/agentdrain/data/default_weights.json but doesn't include any test changes. Even for a data-only weights update, a lightweight regression test (e.g. verifying the JSON is well-formed, that required top-level keys like error, warning, etc. are present, and that cluster entries meet a minimum schema) would add confidence that automated retraining doesn't silently produce malformed data.

If you'd like a hand adding that coverage, you can assign this prompt to your coding agent:

Add a regression test for pkg/agentdrain/data/default_weights.json.
The test should:
1. Parse the JSON file and confirm it is well-formed.
2. Assert that the top-level keys expected by the agentdrain package (e.g. "error", "warning", "info") are present.
3. Assert that each key's value contains a "clusters" array with at least one entry that has "id", "size", "stage", and "template" fields.
Place the test in the existing test suite for the agentdrain package.

Generated by Contribution Check · ● 1.6M ·

@pelikhan pelikhan closed this Apr 24, 2026
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.

1 participant