fix(terminal): avoid lazy-loading tool manifest in async websocket handler
The container-user resolver introduced in 9f72093 accessed
'tool_type.manifest', which triggers a SQLAlchemy lazy load inside the
async WebSocket coroutine and raises MissingGreenlet. Fetch the manifest
explicitly with db_session.get() instead, matching the pattern used in
instance_service.py.
- Replace relationship access with explicit async loads in
_resolve_container_user().
- Add unit tests covering manifest, base-definition, legacy, and missing
manifest cases.
- Update project map artifacts.
Quality gates: pytest tests/api tests/services/test_terminal_manager_multi.py tests/unit (247 passed), ruff check (clean).
This commit is contained in:
@@ -2,17 +2,23 @@
|
||||
dir: apps/api/src
|
||||
|
||||
## role
|
||||
Core FastAPI web application package that bootstraps and configures the Headquarter API service with database, authentication, logging, and modular routing infrastructure.
|
||||
Core FastAPI application package that initializes and configures the Headquarter API with database, authentication, logging, and middleware infrastructure.
|
||||
## parent
|
||||
index: apps/api/.pi-map.index.md
|
||||
map: apps/api/.pi-map.md
|
||||
## children
|
||||
- apps/api/src/.ruff_cache
|
||||
index: apps/api/src/.ruff_cache/.pi-map.index.md
|
||||
map: apps/api/src/.ruff_cache/.pi-map.md
|
||||
- apps/api/src/api
|
||||
index: apps/api/src/api/.pi-map.index.md
|
||||
map: apps/api/src/api/.pi-map.md
|
||||
- apps/api/src/auth
|
||||
index: apps/api/src/auth/.pi-map.index.md
|
||||
map: apps/api/src/auth/.pi-map.md
|
||||
- apps/api/src/headquarter_api.egg-info
|
||||
index: apps/api/src/headquarter_api.egg-info/.pi-map.index.md
|
||||
map: apps/api/src/headquarter_api.egg-info/.pi-map.md
|
||||
- apps/api/src/models
|
||||
index: apps/api/src/models/.pi-map.index.md
|
||||
map: apps/api/src/models/.pi-map.md
|
||||
@@ -46,6 +52,6 @@ map: apps/api/src/.pi-map.md
|
||||
- change src config
|
||||
read: config.py, logging_config.py
|
||||
- explore src subdirectories
|
||||
index: apps/api/src/api/.pi-map.index.md, apps/api/src/auth/.pi-map.index.md, apps/api/src/models/.pi-map.index.md
|
||||
index: apps/api/src/.ruff_cache/.pi-map.index.md, apps/api/src/api/.pi-map.index.md, apps/api/src/auth/.pi-map.index.md
|
||||
## dirty
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user