fix(semaino): ingest a trigger signal before detecting its convergence - #365
Merged
Conversation
The pipeline fanned each GeoSignal down two independent, unsynchronized channels (aggregator scoring vs. grid ingestion) and consumed them with a biased select! that always favored the aggregator branch. Convergence could therefore be evaluated against a grid that did not yet contain the very signal that produced the anomaly, undercounting domain_count and downgrading severity (Critical->High, Medium->Low). Under a sustained burst the bias also unconditionally starved the grid-ingest branch, blinding detection during exactly the flood the pipeline exists to catch. handle_aggregated now ingests its trigger signal into the grid before running detection -- idempotent given the bounded per-domain DomainSlots storage, so it is safe regardless of whether the ordinary signal_rx delivery already landed. The select! is no longer biased, removing the starvation half of the defect. Refs #224
…gger test Held the suppression sink's MutexGuard across the whole assertion block (clippy::significant_drop_tightening) and indexed the alert Vec directly (clippy::indexing_slicing, denied workspace-wide). Extracts the two values the assertions need inside a scoped block so the guard drops immediately, and reads the first alert via .first() instead of [0]. Refs #224
forkwright
pushed a commit
that referenced
this pull request
Aug 9, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.23](v0.1.22...v0.1.23) (2026-08-09) ### Bug Fixes * **akroasis-server:** bound request timeout, concurrency, and body size ([#362](#362)) ([d77876d](d77876d)), closes [#194](#194) * **kerykeion:** escalate background task failures to a clean shutdown ([#363](#363)) ([0a468f1](0a468f1)), closes [#205](#205) * **semaino:** bound per-cell convergence storage to one hit per domain ([#364](#364)) ([cba9170](cba9170)), closes [#223](#223) * **semaino:** ingest a trigger signal before detecting its convergence ([#365](#365)) ([de0b8ae](de0b8ae)), closes [#224](#224) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The pipeline fanned each
GeoSignaldown two independent, unsynchronized channels (aggregator scoring vs. grid ingestion) and consumed them with abiased select!that always favored the aggregator branch. Convergence could therefore be evaluated against a grid that did not yet contain the very signal that produced the anomaly, undercountingdomain_countand downgrading severity (Critical->High, Medium->Low). Under a sustained burst the bias also unconditionally starved the grid-ingest branch, blinding detection during exactly the flood the pipeline exists to catch.What changed
handle_aggregatednow ingests its trigger signal into the grid before running detection — idempotent (callingdetect()'s domain-count computation dedups by domain discriminant regardless of duplicate hits), so it is safe whether or not the ordinarysignal_rxdelivery already landed. Theselect!is no longer biased, removing the starvation half of the defect.A follow-up commit scopes the suppression sink's
MutexGuard, which had been held across the whole assertion block (clippy::significant_drop_tightening), and reads the first alert via.first()instead of[0](clippy::indexing_slicing, denied workspace-wide) in the trigger test.Refs #224