Skip to content

fix(events): prevent silent count:0 from action/entity filter mismatch#16

Merged
Seraf merged 1 commit into
masterfrom
feat/event-filters-and-display-cleanup
Jun 9, 2026
Merged

fix(events): prevent silent count:0 from action/entity filter mismatch#16
Seraf merged 1 commit into
masterfrom
feat/event-filters-and-display-cleanup

Conversation

@Seraf

@Seraf Seraf commented Jun 9, 2026

Copy link
Copy Markdown
Member

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.

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>
@Seraf
Seraf merged commit c9cd9e8 into master Jun 9, 2026
1 check passed
@Seraf
Seraf deleted the feat/event-filters-and-display-cleanup branch June 9, 2026 08:05
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