diff --git a/meshai/config.py b/meshai/config.py index 9ee8c43..b672a47 100644 --- a/meshai/config.py +++ b/meshai/config.py @@ -503,8 +503,8 @@ class EnvironmentalConfig: class SinkConfig: """Named notification sink — transport defined once, referenced by name. - Phase A of routing revamp: transports defined once in sinks block, - referenced by name in toggles/rules (Phase B). + Routing simplification: transports defined once in sinks block, + referenced by name in toggles/rules. See docs/routing-simplification.md. """ type: str = "mesh_broadcast" # mesh_broadcast|mesh_dm|email|webhook diff --git a/meshai/dashboard/api/notification_routes.py b/meshai/dashboard/api/notification_routes.py index fb61dc9..6d68a93 100644 --- a/meshai/dashboard/api/notification_routes.py +++ b/meshai/dashboard/api/notification_routes.py @@ -311,7 +311,7 @@ async def send_rule_live(request: Request, rule_index: int): # ============================================================================= -# SINKS ENDPOINTS (Phase A of routing revamp) +# SINKS ENDPOINTS (routing simplification) # ============================================================================= @router.get("/sinks") @@ -319,7 +319,7 @@ async def get_sinks(request: Request): """Get configured notification sinks. Returns list of named sinks with their type and config. - Phase A: read-only list; Phase B adds edit endpoints. + Read-only list for now; edit endpoints added later. """ config = getattr(request.app.state, "config", None) if not config or not hasattr(config, "notifications"): diff --git a/meshai/notifications/channels.py b/meshai/notifications/channels.py index 08113de..fffcee9 100644 --- a/meshai/notifications/channels.py +++ b/meshai/notifications/channels.py @@ -841,7 +841,7 @@ def create_channel_from_dict(config: dict, connector=None) -> NotificationChanne def create_channel_from_sink(sink: "SinkConfig", connector=None) -> NotificationChannel: """Create a channel instance from a SinkConfig dataclass. - Phase A of routing revamp: sinks are named transports defined once, + Routing simplification: sinks are named transports defined once, this factory creates the channel instance for delivery. Args: diff --git a/meshai/scripts/migrate_config_routing.py b/meshai/scripts/migrate_config_routing.py index b4e4baf..1798d50 100644 --- a/meshai/scripts/migrate_config_routing.py +++ b/meshai/scripts/migrate_config_routing.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Migration script for MeshAI routing revamp Phase A: synthesize sinks. +"""Migration script for MeshAI routing simplification: synthesize sinks. This script reads existing notification toggles and rules, extracts their inline transport configurations, and synthesizes named sinks. @@ -12,7 +12,7 @@ The migration: 3. For each enabled rule with inline transport config, synthesizes a named sink 4. Deduplicates identical transports into one sink 5. Writes the sinks block to the config -6. Does NOT remove inline fields (Phase B does that) +6. Does NOT remove inline fields (done in a later step) Idempotent: refuses to run if a sinks block already exists. """ @@ -287,7 +287,7 @@ def write_sinks_to_config(config_path: Path, sinks: dict): def main(): parser = argparse.ArgumentParser( - description="Migrate MeshAI config to use named sinks (Phase A)" + description="Migrate MeshAI config to use named sinks" ) parser.add_argument( "--config", diff --git a/tests/test_sinks.py b/tests/test_sinks.py index d5f0cc9..14956f1 100644 --- a/tests/test_sinks.py +++ b/tests/test_sinks.py @@ -1,4 +1,4 @@ -"""Tests for Phase A routing revamp: SinkConfig and sink utilities. +"""Tests for routing simplification: SinkConfig and sink utilities. Tests cover: 1. SinkConfig dataclass conversion from dict