Skip to content

engine: Varpulis at 4e3dbb5, windows close on event time - #3

Merged
cpoder merged 1 commit into
masterfrom
engine-window-clock
Sep 23, 2026
Merged

cpoder merged 1 commit into
masterfrom
engine-window-clock

Conversation

@cpoder

@cpoder cpoder commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Why

A time window in a detect unit closed only when a later event reached that same window. A count per address waited for the same address's next failure. A brute force that ended in a successful logon was therefore never raised in a running unit. varpulis simulate hid this, because it closes every window at the end of a file.

What changes

  • Engine bump to varpulis 4e3dbb5. It brings two fixes:
    • varpulis#284. A window closes when the event time of the types feeding it passes its end, on any event of those types. Windows close upstream first, so a count's alert reaches the correlations above it in time. A type that goes quiet holds back only the windows it feeds, whereas .watermark() used to hold back every window.
    • varpulis#285. A sequence step that names a derived stream reads what that stream outputs. Over an aggregate, it used to match the raw events.
  • e2e/detect D6. The scenario is three failures from one address, a success from the same address, then a logon from another address after the window.
    • Against the previous runtime (VEJAS_BIN = the v0.3.1-era build), D6 fails: nothing is ever raised.
    • On this branch, the next logon raises the brute force with n = 3.
    • D4 now lists three units.
  • Docs and changelog. detects.md says when windows close. The CHANGELOG entry sits under Unreleased.

Checks run locally

  • cargo test: 43 passed.
  • e2e/detect/run.sh: all invariants hold, D6 included.
  • e2e/detect-demo/run.sh: every beat holds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N3K1TGnWTvwYzt9rKuJXES

…84, #285)

A time window in a detect unit closed only when a later event reached that
same window: a count per address waited for the same address's next
failure, so a brute force that ended in a successful logon was never
raised in a running unit. The engine now closes a window when the event
time of the types feeding it passes its end, on any event of those types,
upstream first. A sequence step that names a derived stream now reads
what that stream outputs (over an aggregate it matched the raw events).

e2e/detect gains D6: three failures from one address, a success from it,
then a logon from another address after the window. On the previous
runtime nothing is ever raised; on this one the next logon raises the
brute force with its count. D4 now lists three units.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3K1TGnWTvwYzt9rKuJXES
@cpoder
cpoder merged commit 1b375b6 into master Sep 23, 2026
3 checks passed
@cpoder
cpoder deleted the engine-window-clock branch September 23, 2026 20:53
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