Skip to content

Event detector debugging panel - #169

Merged
hellais merged 9 commits into
mainfrom
debug-panel
Aug 3, 2026
Merged

Event detector debugging panel#169
hellais merged 9 commits into
mainfrom
debug-panel

Conversation

@LDiazN

@LDiazN LDiazN commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This PR adds a streamlit web panel to debug and diagnose events from the event detector.

With this panel you can re-run the detector algorithm for any given input and check the results immediately. It will plot the cusums using an interactive Altair chart.

You can also filter the cusums by probe_asn and block_type.

It adds a new command to the oonipipeline CLI, the oonipipeline events-panel command to start the web server

Note that Streamlit is not a standard dependency, it's bundled with the analysis dependencies

The clickhouse URL parameter can be specified in the left side panel, it defaults to localhost

Some screenshots:

image image

@LDiazN
LDiazN requested a review from hellais July 31, 2026 14:56
@LDiazN LDiazN self-assigned this Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.77%. Comparing base (3a180c2) to head (eb28e80).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
- Coverage   83.51%   82.77%   -0.75%     
==========================================
  Files          85       85              
  Lines        5314     5334      +20     
==========================================
- Hits         4438     4415      -23     
- Misses        876      919      +43     
Flag Coverage Δ
oonidata 77.86% <ø> (ø)
oonipipeline 85.57% <ø> (-1.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

LDiazN and others added 2 commits July 31, 2026 17:02
This allows running the events-panel in dev mode with hatch with:
    hatch run analysis:oonipipeline events-panel
@hellais

hellais commented Aug 3, 2026

Copy link
Copy Markdown
Member

This looks really good. Thanks for putting it together!

I am taking note here of some feedback for this

UI improvements

  1. It's a bit tricky to pick the point in which the value of the lines contains something that can be displayed on hover. Can we do something to display a dot for the point in which the line is being interpolated?
  2. The datetimes are shown rounded to the day, they should display the hour as well, since the detection happens on this window
  3. Only the s_pos values appear to be plotted, we should plot also the negative values
  4. It would be nice to show from the dropdown menus for which series an event (or more than one) have been detected, so it's easier to pick them
  5. We should also display on the chart the state transition in some way
  6. We might want to display all the series together in the same chart so it's easier to compare

Possible bugs

  • It's unclear if it's due to a bug in the implementation of the CUSUM, the step emitter or the plots, but in some cases the CUSUMs don't seem to reset to zero after a detection event. An example of this can be seen by configuring probe_cc=SA, domain=tinder.com and then picking tls_blocked + 35819. This deserves some follow up investigation.

@hellais hellais left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's land this now and work on the improvements as follow up PRs

@hellais
hellais merged commit ab3a023 into main Aug 3, 2026
7 checks passed
@hellais
hellais deleted the debug-panel branch August 3, 2026 13:40
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