refactor(routes): move vault domain into routes/vault/ subpackage#5686
Open
ydonghao wants to merge 1 commit into
Open
refactor(routes): move vault domain into routes/vault/ subpackage#5686ydonghao wants to merge 1 commit into
ydonghao wants to merge 1 commit into
Conversation
Slice 2k of the route-domain reorganization (odysseus-dev#4082/odysseus-dev#4071). Moves vault_routes.py into routes/vault/, 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 vr` + `monkeypatch.setattr(vr, "VAULT_FILE", ...)` / `"_find_bw"` pattern in test_vault_password_not_in_argv.py reaches the canonical module. The `__file__`-based source introspection (line 93) automatically resolves to the canonical file path. Zero source-introspection landmines requiring path edits. Canonical module imports only from core/, src/, and stdlib (zero internal routes/ coupling).
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 vault domain moves — a single-file, 242-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? |
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 vault domain into
routes/vault/, 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/vault_routes.pyroutes/vault/vault_routes.pyNew
routes/vault/__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/vault_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