Skip to content

fix: make NewValueComboDetector use every configured combination - #358

Merged
viktorbeck98 merged 2 commits into
developmentfrom
fix/nvcombo-all-combos
Oct 13, 2026
Merged

viktorbeck98 merged 2 commits into
developmentfrom
fix/nvcombo-all-combos

Conversation

@viktorbeck98

@viktorbeck98 viktorbeck98 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Task

No issue.

Description

NewValueComboDetector only trained and checked the first instance of each event. Auto-config writes one instance per combo, in the order the variables arrive, and logFormatVariables (a protobuf map) has no fixed order. So one random combo per event was monitored and results changed between runs.

  • All instances of an event are now trained and checked. A log missing one of an instance's variables is skipped for that instance.
  • Variables and combos are sorted before the config is written.
  • VariableDetector gets an _event_variables hook for this. Other detectors are unchanged.

More combos are monitored than before, so expect more alerts. A log can now score above 1, and events_until_save counts once per combo.

How Has This Been Tested?

  • 5 new tests, including a federation round trip. Full suite passes.
  • 24 benchmark cells, 3 runs each, give identical results. Before, 5 of the 24 differed between runs.

Checklist

  • This Pull-Request goes to the development branch.
  • I have successfully run prek locally.
  • I have added tests to cover my changes.
  • I have linked the issue-id to the task-description.
  • I have performed a self-review of my own code.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

viktorbeck98 and others added 2 commits October 12, 2026 12:27
The detector trained and checked only the first instance of an event, and
auto-configuration wrote the instances in the order the variables arrived.
A ParserSchema keeps its logFormatVariables in a protobuf map with no fixed
order, so the monitored combination, and with it the results, changed from
run to run.

- train and check every instance of an event on its own; a log that lacks
  one of an instance's variables is skipped for that instance
- sort variables and combos before set_configuration writes the config
- VariableDetector gets an _event_variables hook; its default is unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three real-data tests pinned the logs flagged by the first combination
only. The detector now checks all 28 configured combinations, so the logs
with an unseen value pair in any of them are expected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@viktorbeck98
viktorbeck98 requested a review from ipmach October 12, 2026 14:23
@viktorbeck98
viktorbeck98 merged commit 6529afe into development Oct 13, 2026
4 checks passed
@viktorbeck98
viktorbeck98 deleted the fix/nvcombo-all-combos branch October 13, 2026 07:18
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.

2 participants