refactor(routes): move webhook domain into routes/webhook/ subpackage#5687
Closed
ydonghao wants to merge 1932 commits into
Closed
refactor(routes): move webhook domain into routes/webhook/ subpackage#5687ydonghao wants to merge 1932 commits into
ydonghao wants to merge 1932 commits into
Conversation
Keep an unhealthy MemoryVectorStore instance available for health reporting instead of discarding it as disabled. This lets health checks report a degraded/down vector-store state while preserving focused regression coverage for initializer behavior.
Add Arch-specific package installation and NVIDIA runtime configuration to the Docker setup guide. Cover passthrough verification, the NVIDIA Compose overlay, and the distinction between GPU passthrough and CUDA-backed model serving Refs #831
chore: sync upstream changes from odysseus-dev/odysseus
fix(docker): bump Docker CLI to a patched release
fix(docker): bump Docker CLI to a patched release
* feat(models): define capability schema and readers * fix(models): harden Google catalog probing Restrict native catalog probing to the Gemini host, keep provider keys out of request URLs, filter non-chat model resources, and preserve the manual refresh default in the built-in Google add flow.
…(#5474) * security(url-safety): reject RFC 6598 shared address space in strict mode Strict mode (block_private=True) is a full SSRF lockdown, but it only rejected is_private and is_loopback targets. CPython does not classify RFC 6598 shared/CGNAT space (100.64.0.0/10) as is_private (it is "shared", not "private"), so a public redirect into 100.64.0.1 passed the per-hop guard and still issued the request to a potentially internal CGNAT service. not is_global would also exclude it, but only on CPython 3.11.10+/3.12.4+/ 3.13+; the CI matrix runs 3.11/3.12, so reject the range explicitly to stay correct across patch levels and the 3.14 runtime image. Default local-first mode is unchanged. Adds strict-mode coverage for shared, non-global, and public targets. * docs(url-safety): correct CGNAT is_global rationale in strict-mode comment The prior comment claimed `not is_global` catches 100.64.0.0/10 only on CPython 3.11.10+/3.12.4+/3.13+. That is inaccurate for CGNAT: is_global is False for 100.64.0.1 on every supported version (verified 3.10-3.14). The version-fragility applies to other ranges gh-113171 touched, not CGNAT. The explicit range reject is still the right choice; restate the reason as is_private not covering shared space, and not coupling strict mode to is_global's broader, cross-version definition. No behavior change.
…… (#5491) * fix(llm): enhance fallback logic to handle empty completions and improve metadata handling * fix(llm): stream tool call deltas immediately
Slice 2f of the route-domain reorganization (#4082/#4071, per specs/architecture-runtime-inventory.md §6.3). Moves note_routes.py into routes/note/, leaving a backward-compat sys.modules shim at the old path. Pure file reorganization, no behavior change. The shim uses sys.modules replacement (same pattern as the merged gallery #4903, research #4975, memory #5007, history #5090, and contacts #5227 slices) so that `import routes.note_routes`, `from routes.note_routes import X`, `importlib.import_module(...)`, and the `import ... as note_routes` + `monkeypatch.setattr(note_routes, "SessionLocal", ...)` pattern used by test_note_reminder_fire_scope.py / test_notes_fail_closed_auth.py all operate on the same module object the application uses. The canonical module does NOT depend on the shim — routes/note/note_routes.py imports only from core/, src/, and stdlib. The outbound email cross-domain imports (routes.email_routes._get_email_config, routes.email_helpers. _send_smtp_message) are function-local lazy imports that keep resolving through the email module's own path (email is not yet migrated). One source-introspection test site repointed to the new canonical path: - test_model_helper_owner_scope.py (shared with history; history entry already repointed in #5090, note entry repointed here) Adds tests/test_note_routes_shim.py to pin the sys.modules shim contract (legacy and canonical paths resolve to the same module object; monkeypatch via legacy alias reaches the canonical module). Verified: compileall clean; full suite 4487 passed, 3 skipped.
… (#5658)
Slice 2g of the route-domain reorganization (#4082/#4071). Moves
cleanup_routes.py into routes/cleanup/, leaving a backward-compat
sys.modules shim at the old path. Pure file reorganization, no behavior
change.
The shim uses sys.modules replacement so string-targeted
monkeypatch.setattr("routes.cleanup_routes.*", ...) in
test_cleanup_owner_scope.py reaches the canonical module.
Canonical module imports only from src/ and stdlib (zero internal
routes/ coupling). Zero source-introspection landmines.
Adds tests/test_cleanup_routes_shim.py to pin the sys.modules shim
contract. Verified: compileall clean; targeted tests pass.
…ackage (#5659) Slice 2h of the route-domain reorganization (#4082/#4071). Moves admin_wipe_routes.py into routes/admin_wipe/, leaving a backward-compat sys.modules shim at the old path. Pure file reorganization, no behavior change. The shim uses sys.modules replacement so the `import ... as admin_wipe_routes` + `monkeypatch.setattr(admin_wipe_routes, "SessionLocal", ...)` / `"require_admin"` pattern in test_admin_wipe_gallery.py reaches the canonical module. Canonical module imports only from core/, src/, and stdlib (zero internal routes/ coupling). Zero source-introspection landmines. Adds tests/test_admin_wipe_routes_shim.py to pin the sys.modules shim contract. Verified: compileall clean; targeted tests pass.
… (#5660) Slice 2i of the route-domain reorganization (#4082/#4071). Moves compare_routes.py into routes/compare/, leaving a backward-compat sys.modules shim at the old path. Pure file reorganization, no behavior change. The shim uses sys.modules replacement so the `import ... as cr` + `monkeypatch.setattr(cr, "SessionLocal", ...)` / `"_owned_endpoint_by_url"` / `"_owned_endpoint_by_id"` pattern in test_endpoint_owner_scope_followup.py reaches the canonical module. Canonical module imports only from core/, src/, and routes.session_routes (zero dependency on the legacy shim). One source-introspection test site repointed: test_endpoint_owner_scope_followup.py (shared with other domains; only the compare entry repointed here). Adds tests/test_compare_routes_shim.py to pin the sys.modules shim contract. Verified: compileall clean; targeted tests pass.
fix(docker): detect snap+WSL2 GPU passthrough incompatibility
* ci: add CodeQL advanced setup to scan pull requests before merge * ci(codeql): preserve scheduled scans Add a weekly advanced-setup scan and update the security CI guide so default setup remains disabled. --------- Co-authored-by: RaresKeY <158580472+RaresKeY@users.noreply.github.com>
Slice 2l of the route-domain reorganization (#4082/#4071). Moves
webhook_routes.py into routes/webhook/, leaving a backward-compat
sys.modules shim at the old path. Pure file reorganization, no behavior
change.
The shim uses sys.modules replacement so the `__import__("routes.
webhook_routes", fromlist=[...])` + `setattr(wh_mod, "ModelEndpoint",
...)` pattern in test_null_owner_gates.py reaches the canonical module.
One source-introspection test site repointed: test_api_chat_security.py
(spec_from_file_location path updated to routes/webhook/webhook_routes.py).
Canonical module imports only from core/, src/, and stdlib (zero internal
routes/ coupling).
| "user_message": message[:2000], "response": reply[:2000], | ||
| }) | ||
|
|
||
| return {"response": reply, "session_id": session_id, "model": sess.model} |
This was referenced Jul 22, 2026
Contributor
Author
|
Friendly ping for review 👋 This is one of three parallel low-risk slices (#5685 search, #5686 vault, #5687 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). CI fully green. @RaresKeY @alteixeira20 — would you mind taking a look when you have a moment? |
pewdiepie-archdaemon
force-pushed
the
dev
branch
from
July 23, 2026 16:22
6c3b6d3 to
d8a2059
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slice of the route-domain reorganization (Refs #4082 / #4071; inventory baseline in #4148). Moves the webhook domain into
routes/webhook/, keeping a backward-compatsys.modulesshim at the old path. Pure file reorganization, no behavior change.One of three parallel low-risk slices (#5685 search, #5686 vault, #5687 webhook). Follows the same pattern as all previous merged slices (gallery #4903 through compare #5660).
What moves
routes/webhook_routes.pyroutes/webhook/webhook_routes.pyNew
routes/webhook/__init__.pymarks the subpackage. The canonical module does NOT depend on the shim — imports only fromcore/,src/,services/, and stdlib (zero internalroutes/coupling).Backward compatibility
A backward-compat shim remains at
routes/webhook_routes.py, usingsys.modulesreplacement so all legacy import paths (import,from...import,importlib,monkeypatch.setattr) resolve to the same module object the application uses.How to test
Target branch
dev, notmain.Linked Issue
Follows the Phase 0 architecture refactor (#4082 / #4071) and the merged runtime inventory (#4148). One domain per PR per maintainer guidance.
Type of Change
Checklist
dev