-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Priority: P2 — Prerequisite for Task-06
File: src/tool_classifier/workflows/service_workflow.py
Type: New method
Add a static method _parse_service_prefix(payload: str) -> Optional[tuple[str, str]] that:
Strips the #service, or #common_service, prefix.
Splits the remainder on the first / to extract the HTTP method (e.g. POST, GET).
Constructs the full Ruuter URL: {RUUTER_SERVICE_BASE_URL}{path}.
Returns (http_method, full_url) or None if the format is unrecognised.
Example:
Input: "#service, /POST/services/active/application_mcq_step_passport"
Output: ("POST", "http://ruuter:8086/services/active/application_mcq_step_passport")
Also add a module-level constant:
SERVICE_STEP_PREFIXES = ("#service,", "#common_service,")
Work:
- Add SERVICE_STEP_PREFIXES constant to src/tool_classifier/constants.py.
- Implement _parse_service_prefix() as a @staticmethod on ServiceWorkflowExecutor.
- Add unit test covering: valid POST, valid GET, #common_service prefix, malformed input → None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo