feat(matrix-bridge-dagi): M4–M11 + soak infrastructure (debug inject endpoint)
Includes all milestones M4 through M11: - M4: agent discovery (!agents / !status) - M5: node-aware routing + per-node observability - M6: dynamic policy store (node/agent overrides, import/export) - M7: Prometheus alerts + Grafana dashboard + metrics contract - M8: node health tracker + soft failover + sticky cache + HA persistence - M9: two-step confirm + diff preview for dangerous commands - M10: auto-backup, restore, retention, policy history + change detail - M11: soak scenarios (CI tests) + live soak script Soak infrastructure (this commit): - POST /v1/debug/inject_event (guarded by DEBUG_INJECT_ENABLED=false) - _preflight_inject() and _check_wal() in soak script - --db-path arg for WAL delta reporting - Runbook sections 2a/2b/2c: Step 0 and Step 1 exact commands Made-with: Cursor
This commit is contained in:
@@ -309,3 +309,25 @@ def reply_prefix(agent_id: str, is_mixed: bool) -> str:
|
||||
return ""
|
||||
# Capitalise first letter of agent name: "sofiia" → "Sofiia"
|
||||
return f"{agent_id.capitalize()}: "
|
||||
|
||||
|
||||
def build_override_config(
|
||||
base_config: MixedRoomConfig,
|
||||
room_id: str,
|
||||
agents: List[str],
|
||||
default_agent: str,
|
||||
) -> MixedRoomConfig:
|
||||
"""
|
||||
M6.1: Build a temporary MixedRoomConfig that uses a dynamic store override
|
||||
for room_id while keeping all other rooms from base_config unchanged.
|
||||
|
||||
Used in _enqueue_from_mixed_room to inject PolicyStore agent overrides
|
||||
without mutating the shared base configuration.
|
||||
"""
|
||||
rooms = dict(base_config.rooms)
|
||||
rooms[room_id] = MixedRoom(
|
||||
room_id=room_id,
|
||||
agents=agents,
|
||||
default_agent=default_agent,
|
||||
)
|
||||
return MixedRoomConfig(rooms=rooms)
|
||||
|
||||
Reference in New Issue
Block a user