refactor(routes): move webhook domain into routes/webhook/ subpackage#5781
refactor(routes): move webhook domain into routes/webhook/ subpackage#5781ydonghao wants to merge 2 commits into
Conversation
Slice 2j of the route-domain reorganization (odysseus-dev#4082/odysseus-dev#4071). Moves search_routes.py into routes/search/, leaving a backward-compat sys.modules shim. Pure file reorganization, no behavior change.
Slice 2l of the route-domain reorganization (odysseus-dev#4082/odysseus-dev#4071). Moves webhook_routes.py into routes/webhook/, leaving a backward-compat sys.modules shim. Pure file reorganization, no behavior change. One source-introspection test repointed (test_api_chat_security.py).
| return {"context": context, "sources": sources} | ||
| except Exception as e: | ||
| logger.error(f"Standalone web search failed: {e}") | ||
| return {"context": "", "sources": [], "error": str(e)} |
| except Exception as e: | ||
| elapsed = round(time.time() - t0, 2) | ||
| logger.error(f"Search provider {provider} failed: {e}") | ||
| return {"results": [], "provider": provider, "time": elapsed, "error": str(e)} |
| "user_message": message[:2000], "response": reply[:2000], | ||
| }) | ||
|
|
||
| return {"response": reply, "session_id": session_id, "model": sess.model} |
|
Friendly ping for review 👋 This is one of three parallel low-risk slices (#5779 search, #5780 vault, #5781 webhook). Only the webhook domain moves — a single-file, 395-line domain with zero internal Both points from your #4903 review are baked in (canonical doesn't depend on shim; shim regression test included). Note on CI: The @RaresKeY @alteixeira20 — would you mind taking a look when you have a moment? |
Summary
Slice 2l of the route-domain reorganization (Refs #4082 / #4071). Moves the webhook domain (395 lines) into
routes/webhook/behind asys.modulesshim. Pure file reorganization, no behavior change.One of three parallel low-risk slices (search, vault, webhook). One source-introspection test site repointed (
test_api_chat_security.py). Canonical module imports only fromcore/,src/, and stdlib.How to test
Target branch
dev, notmain.Linked Issue
Follows the Phase 0 architecture refactor (#4082 / #4071). One domain per PR.
Type of Change
Checklist
dev