fix(events): prevent silent count:0 from action/entity filter mismatch#16
Merged
Merged
Conversation
CYCLOID_EVENT_LIST / CYCLOID_PROJECT_EVENTS apply the action/entity filters client-side with exact string matching, so a value that doesn't match the event's real tag (e.g. `build` where the API emits `ci_build`) silently returned count:0 — and the Ask-Cycloid companion reported "no events" even when the org was full of activity. The tool descriptions and a test fixture also advertised `build`, steering callers straight into the dead value. - Self-correcting empty results: when a filter removes every event but events exist, both tools now return filter_matched_nothing, applied_filters, available_actions, available_entities and a hint, so the caller retries with a valid value instead of concluding "no events". - Corrected the misleading examples in descriptions/docstrings (drop the non-existent `build` entity; clarify begin/end are in seconds). - Fixed the SAMPLE_EVENT fixture (entity build -> ci_build) and extracted _unique_component_canonicals to keep list_project_events under the complexity limit. - Added regression tests for the filter-miss diagnostic (org + project) plus matching-filter and empty-window no-diagnostic cases. 110 tests pass; pyright strict and flake8 clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
CYCLOID_EVENT_LIST / CYCLOID_PROJECT_EVENTS apply the action/entity filters client-side with exact string matching, so a value that doesn't match the event's real tag (e.g.
buildwhere the API emitsci_build) silently returned count:0 — and the Ask-Cycloid companion reported "no events" even when the org was full of activity. The tool descriptions and a test fixture also advertisedbuild, steering callers straight into the dead value.buildentity; clarify begin/end are in seconds).110 tests pass; pyright strict and flake8 clean.