Skip to content

fix(ontology): assign CLIENT role to message producer types#255

Merged
HumanBean17 merged 2 commits into
masterfrom
bugfix/253-client-role-producer
May 31, 2026
Merged

fix(ontology): assign CLIENT role to message producer types#255
HumanBean17 merged 2 commits into
masterfrom
bugfix/253-client-role-producer

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

Closes #253

  • Types injecting messaging templates (KafkaTemplate, RabbitTemplate, JmsTemplate, StreamBridge, ApplicationEventPublisher) now get CLIENT role instead of falling through to OTHER
  • This fixes the asymmetry where CONTROLLER covers both HTTP and messaging inbound, but CLIENT only covered HTTP outbound
  • Ontology bumped 15 → 16 (re-index required)

Changes

  • ast_java.py: Added _type_injects_messaging() helper and extended infer_role_for_type() to return CLIENT when no annotation-based role was found but the type injects a messaging template. Annotation-based roles still win (e.g. @Service class with KafkaTemplate stays SERVICE).
  • 3 doc files: Updated CLIENT role description from "Outbound HTTP call wrapper (Feign, RestTemplate, WebClient)" to "Outbound call wrapper (HTTP and messaging)" — symmetric with CONTROLLER's "HTTP / messaging entry point"
  • Ontology version: Bumped in all 3 doc locations + ast_java.py
  • Test update: test_resttemplate_class_gets_client_role_from_messaging reflects the new correct behavior

Test plan

  • All existing role/capability tests pass (test_client_role_rename.py: 9/9)
  • 17 role/capability-related tests pass across the suite
  • Re-index a real codebase and verify message producer classes get CLIENT role

🤖 Generated with Claude Code

HumanBean17 and others added 2 commits May 31, 2026 18:38
Types injecting KafkaTemplate, RabbitTemplate, JmsTemplate,
StreamBridge, or ApplicationEventPublisher now get CLIENT role
(symmetry with CONTROLLER covering both HTTP and messaging inbound).
Previously these fell through to OTHER despite having MESSAGE_PRODUCER
capability. Ontology bumped 15 → 16; re-index required.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove navigate-codebase from EXPECTED_SKILL_DIRS (deleted in #254)
- Rename test_has_worked_example → test_has_canonical_workflow to match
  actual section name after skill content was consolidated

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit e9d39ab into master May 31, 2026
1 check passed
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.

CLIENT role should include message producer classes, not just HTTP clients

1 participant