Skip to content

chore: update drain3 default log pattern weights#27148

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

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

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
Copy link
Copy Markdown
Contributor Author

Hey @github-actions 👋 — thanks for the automated Drain3 weight update! Keeping the default log pattern weights in sync with the latest workflow run logs is exactly the kind of housekeeping that keeps anomaly detection sharp.

One checklist item flags here:

  • No test changes detected — The diff only touches pkg/agentdrain/data/default_weights.json. If there are existing integration or snapshot tests that exercise the default weights file (e.g., verifying the JSON schema, cluster count, or that gh aw audit produces a non-empty result), it would be worth confirming they're passing in CI. If no such tests exist yet, adding a lightweight schema validation test for default_weights.json would make future automated updates safer.

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

Add a unit or integration test for pkg/agentdrain/data/default_weights.json that:
1. Validates the top-level JSON schema (required keys: "error", etc.).
2. Asserts that each stage key contains a non-empty "clusters" array.
3. Verifies each cluster entry has at minimum: "id", "size", "stage", and "template" fields.
Place the test alongside the existing agentdrain tests and make sure it runs as part of `make test`.

Generated by Contribution Check · ● 1.3M ·

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