feat: Complete event-bus ingestion integration#107
Conversation
Wire up event-bus ingestion end-to-end: MCP tools, background loop, raw JSON storage, CLI formatter, and comprehensive tests. - Add get_bus_events and ingest_bus_events MCP tools in server.py - Add bus event ingestion to server startup and 5-minute background loop - Store raw event JSON in raw_bus_events table (migration v15) for future re-parsing, mirroring the raw_entries pattern - Add CLI formatter for bus events and benchmark entry - Fix pre-existing bug in query_bus_events type breakdown query (where_parts slicing incorrectly dropped last filter) - Align default limit to 50 across MCP, CLI, and queries layers - Update guide.md and SCHEMA.md documentation - Add 22 tests covering ingestion, incremental sync, raw storage, deduplication, querying with filters, and schema validation Closes #106 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewSummaryWires up event-bus ingestion end-to-end: adds Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - One potential runtime crash in the CLI formatter when payload is null, and a minor docstring inconsistency. Automated review by Claude Code |
- Fix potential TypeError when payload is None in CLI formatter (use `or ""` pattern instead of default arg) - Update docstring to reflect limit default changed from 100 to 50 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Feedback AddressedImplemented
|
Code ReviewSummaryCompletes event-bus ingestion integration: adds Issues FoundCriticalNone ImportantNone Suggestions
Previously Addressed (Filtered)
VerdictREQUEST_CHANGES - One suggestion to add a test case that directly validates the type-breakdown bug fix with filtered queries. Automated review by Claude Code |
Directly validates the query_bus_events type breakdown bug fix by testing with repo filter, ensuring breakdown only includes filtered events' types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Feedback Addressed (Round 2)Implemented
|
Code ReviewSummaryCompletes event-bus ingestion integration: adds Issues FoundCriticalNone ImportantNone SuggestionsNone Previously Addressed (Filtered)
VerdictAPPROVE - All prior feedback has been addressed. The implementation is clean, follows project conventions (migration pattern, MCP+CLI parity, benchmark entry, guide.md docs), and has thorough test coverage. The Automated review by Claude Code |
Summary
get_bus_eventsandingest_bus_eventsMCP tools, integrates bus ingestion into the server startup and 5-minute background loop, stores raw event JSON inraw_bus_eventstable (migration v15) for future re-parsingquery_bus_eventstype breakdown query wherewhere_partsslicing incorrectly dropped the last filter when using event_type/repo/session_id filtersCloses #106
Test plan
make checkpasses (ruff format + lint + tests)get_bus_events()returns data from event-busingest_bus_events()force-refresh works🤖 Generated with Claude Code