Skip to content

feat(intent_query): Add intent_query_effect node for event-driven intent reads [OMN-1504] - #25

Merged
jonahgabriel merged 3 commits into
mainfrom
jonah/omn-1504-intent_query_effect-node-for-event-driven-intent-reads
Jan 25, 2026
Merged

jonahgabriel merged 3 commits into
mainfrom
jonah/omn-1504-intent_query_effect-node-for-event-driven-intent-reads

Conversation

@jonahgabriel

Copy link
Copy Markdown
Contributor

Summary

Implements ONEX effect node that handles intent query requests via Kafka, enabling OmniDash to query intent data without direct database access.

  • Add get_recent_intents() to AdapterIntentGraph for time-based queries across all sessions
  • Add session_ref field to ModelIntentRecord for IntentRecordPayload mapping
  • Create intent_query_effect node with contract.yaml, handler, registry
  • Support 3 query types: distribution, session, recent
  • Add integration and unit tests
  • Update omnibase dependencies (core 0.9.4, spi 0.6.0, infra 0.2.3)

Architecture

OmniDash
    → Kafka: dev.omnimemory.intent.query.requested.v1
        → HandlerIntentQuery
            → AdapterIntentGraph (Memgraph)
    ← Kafka: dev.omnimemory.intent.query.response.v1

Files Changed

New Node (src/omnimemory/nodes/intent_query_effect/):

  • contract.yaml - ONEX contract definition
  • handlers/handler_intent_query.py - Main handler with query routing
  • models/model_handler_intent_query_config.py - Configuration model
  • utils/util_intent_mapping.py - ModelIntentRecord → IntentRecordPayload mapping
  • registry/registry_intent_query_effect.py - DI registry

Modified:

  • adapter_intent_graph.py - Added get_recent_intents() method
  • model_intent_domain.py - Added session_ref field to ModelIntentRecord
  • pyproject.toml - Updated omnibase dependencies

Test plan

  • Unit tests pass (6 tests, no Memgraph required)
  • Integration tests with Memgraph (requires running instance)
  • Verify Kafka event flow end-to-end with OmniDash

Linear

Closes OMN-1504

@linear

linear Bot commented Jan 25, 2026

Copy link
Copy Markdown

OMN-1504

@coderabbitai

coderabbitai Bot commented Jan 25, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jonahgabriel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 23 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.


Comment @coderabbitai help to get the list of available commands and usage tips.

…ent reads [OMN-1504]

Implements ONEX effect node that handles intent query requests via Kafka,
enabling OmniDash to query intent data without direct database access.

Changes:
- Add get_recent_intents() to AdapterIntentGraph for time-based queries
- Add session_ref field to ModelIntentRecord for IntentRecordPayload mapping
- Create intent_query_effect node with contract.yaml and handler
- Support 3 query types: distribution, session, recent
- Add registry class for dependency injection
- Add integration and unit tests
- Update omnibase dependencies to latest versions (core 0.9.4, spi 0.6.0, infra 0.2.3)

Kafka Topics:
- Input: dev.omnimemory.intent.query.requested.v1
- Output: dev.omnimemory.intent.query.response.v1
@jonahgabriel
jonahgabriel force-pushed the jonah/omn-1504-intent_query_effect-node-for-event-driven-intent-reads branch from 0671da3 to f5b1463 Compare January 25, 2026 21:41
OmniNode AI added 2 commits January 25, 2026 17:46
…N-1504]

Update contract and registry to follow canonical topic naming:
- Rename input_topic/output_topic to subscribe_topic_suffix/publish_topic_suffix
- Add invocation_mode field to contract (subscription vs orchestrator)
- Rename get_kafka_topics() to get_topic_suffixes() with subscribe/publish keys
- Add get_invocation_mode() registry method
- Document that runtime composes full topics: f"{env_prefix}.{suffix}"
…ts [OMN-1504]

- Fix mutation of adapter results by using model_copy() instead
- Add null safety for min_confidence checks in session/recent handlers
- Add try/except for ValueError from map_intent_records
- Apply handler timeout config as asyncio.timeout wrapper
- Add SLA warning when response exceeds 100ms contract limit
- Add 7 integration tests with real data round-trip scenarios
@jonahgabriel
jonahgabriel merged commit 4682dcf into main Jan 25, 2026
7 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-1504-intent_query_effect-node-for-event-driven-intent-reads branch January 25, 2026 23:26
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