Repository navigation
feat: emit octolens mentions under the keyword's subproject integration - #4988
Conversation
The mention poll now resolves each keyword's active mapping across every Octolens subproject integration and emits under that integration and its segment, instead of under the poll's own integration. A keyword mapped under more than one integration is treated as unmapped. Refs linuxfoundation/lfx-cdp-insights-ops#748 Signed-off-by: Uroš Marolt <uros@marolt.me>
…ns-poll-per-subproject
PR SummaryMedium Risk Overview Ambiguous keywords (active under more than one integration) are treated as unmapped so mentions are not misrouted. Reviewed by Cursor Bugbot for commit c8ff435. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes match the existing routing contracts, with no blocking issues identified in static review; tests were not executed.
0 open findings
What changed in this PR
Routes Octolens mentions to each keyword’s subproject integration, building on the data-access support added in #4977.
Changes:
- Resolves and caches keyword targets across active integrations.
- Groups emitted mentions by integration and segment; ambiguous mappings remain unmapped.
- Updates routing and backfill tests for the new target structure.
| File | Description |
|---|---|
| services/libs/connectors/src/connectors/octolens/syncs/mentionPoll.ts | Emits mentions under their resolved integration and segment. |
| services/libs/connectors/src/connectors/octolens/syncs/mentionPoll.test.ts | Updates routing assertions and backfill fixtures. |
| services/libs/connectors/src/connectors/octolens/syncs/mappingDiscovery.test.ts | Updates the dependency mock. |
| services/libs/connectors/src/connectors/octolens/deps.ts | Resolves cached keyword targets and rejects ambiguous mappings. |
| services/libs/connectors/src/connectors/octolens/deps.test.ts | Covers target resolution, ambiguity, and caching. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
The Octolens mention poll now emits each mention under the Octolens integration of the subproject its keyword maps to, instead of under the poll's own integration. This is the poll side of running Octolens as one integration per mapped subproject (data access merged in #4977). The discovery schedule that creates those integrations follows in the next PR; until it ships no Octolens integration or sync unit exists, so this changes nothing at runtime yet.
Changes
createOctolensDepsresolves a keyword to{ segmentId, integrationId }withlistActiveOctolensKeywordMappings, which covers the active mappings of every live subproject Octolens integration, once per sync run.runMentionPollgroups mentions by integration and segment and passes both toemit. Unmapped keywords and the per-keyword backfill behave as before.Type of change
Related issue
Refs linuxfoundation/lfx-cdp-insights-ops#748