Repository navigation
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
|
Warning Your comment is too long (maximum is 65536 characters), so the coverage report was not added. See the job log for how to reduce it. |
all-hands-bot
approved these changes
Nov 17, 2026
all-hands-bot
left a comment
Contributor
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Reviewed the diff on head b27b878 against main, the surrounding ingest/telemetry/trigger-matcher code, and the test suite.
Assessment
- The
if matched:gate aroundcapture_automation_event("automation_event_matched", ...)only suppresses the PostHog capture when zero automations matched. Theintegration_eventsrow (record.matched_count) and the internal observability span event (automation.event.matchedwithautomation.event.matched_count) are both emitted before the gate, so operational evidence for no-match deliveries is retained as described. - No lost product telemetry beyond the intended event:
automation_run_created/automation_conversation_continuedonly fire inside the matched loop, and grep confirms no other emitter or consumer ofautomation_event_matched. - The new test deterministically drives the no-match path (
on: "message"vs event keyapp_mentionpermatches_triggersemantics) and asserts real behavior end-to-end throughaccept_eventwith the telemetry HTTP client captured, including the persistedmatched_count == 0row.
Verification
unit-tests,backend,windows-tests, and all image/description checks pass on this head. Local lint and type checks (ruff format/check, pycodestyle, pyright) pass on both changed files. DB-backed tests require a PostgreSQL testcontainer that cannot run in this review sandbox, so suite correctness is verified via the greenunit-testsCI run on the exact head plus local static verification.- Non-blocking note: the
pr-title / Lint PR title (conventional)check fails because the title lacks a Conventional Commits prefix (e.g.feat:/chore:). This affects release-notes label grouping only; consider a retitle before merge.
No material correctness, security, or design findings.
✅ APPROVED
This branch has not been deployed
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.
Summary
Stop sending
automation_event_matchedproduct telemetry to PostHog when an accepted webhook event matches zero automations.The service still records the event in
integration_eventsand still emits the internal observability span event withmatched_count=0, so operational evidence remains available without paying PostHog volume for no-op webhook traffic.Why
The Agent Canvas PostHog spike starting Nov 12 was dominated by no-match GitHub workflow-run deliveries. Most of these events had
matched_count == 0, so capturing every no-op match check created high product analytics volume without representing user-visible automation work.Tests
uv run pytest tests/test_ingest.py -k 'telemetry or product_telemetry'uv run pre-commit run --files openhands/automation/ingest.py tests/test_ingest.pyThis PR was created by an AI agent (OpenHands) on behalf of the user.
@malhotra5 can click here to continue refining the PR