This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
- V2 提到的「死依賴」不可整批刪:`beautifulsoup4` 用於多個 crawler、`google-api-python-client` 用於 Google Drive、`google-generativeai` 用於 Gemini paths、`python-pptx` 用於 PPT generator、`matplotlib` 用於 Telegram/圖表/PPT。
|
||||
- `tests/test_requirements_pinning.py` 已鎖住上述被 V2 誤列的 runtime dependencies:套件需留在 `requirements.txt`,且至少一個 runtime import 證據仍存在。
|
||||
- `paramiko` 已確認沒有 runtime import;ADR-013 現行實作改以 `utils/ssh_helper.py` 組 CLI `ssh`,因此已從 `requirements.txt` 移除並補測試防止依賴殘影回來。
|
||||
- `pgvector` Python package 與 `matplotlib-inline` 已確認不是 runtime 依賴:pgvector 走 PostgreSQL extension + 本地 SQLAlchemy `Vector` type,Jupyter inline backend 不屬 production path;兩者已從 `requirements.txt` 移除並補測試。
|
||||
- Telegram `momo:eig:<event_id>` callback 已在 `routes/openclaw_bot_routes.py` 與 `services/telegram_bot_service.py` 實作並有 webhook 測試覆蓋,不是未實作缺口。
|
||||
- Telegram `date_*` / `goal_*` 不是死 callback handler:按鈕先送 `await:*` 進入輸入等待狀態,使用者下一則文字才由 pending action 消費;`tests/test_openclaw_bot_menu_keyboards.py` 與 `tests/test_openclaw_bot_routes_webhook.py` 已覆蓋。
|
||||
- `services/ai_automation_smoke_service.py` 不是死 service:`run_scheduler.py` 每日 09:10 掛 `run_ai_smoke_daily_summary_task()`,該 task 會呼叫 `send_smoke_daily_summary()`;`tests/test_ai_automation_smoke_service.py` 與 `tests/test_ai_automation_metrics.py` 已覆蓋。
|
||||
|
||||
@@ -23,8 +23,6 @@ beautifulsoup4>=4.14.3
|
||||
lxml>=6.1.0
|
||||
prometheus-client>=0.25.0
|
||||
python-telegram-bot[job-queue]>=20.0
|
||||
pgvector>=0.2
|
||||
python-pptx>=1.0.2 # ADR-014: PPT 簡報系統
|
||||
matplotlib>=3.9.4 # 圖表生成(日報/週報/月報)
|
||||
matplotlib-inline>=0.2.2 # Jupyter 相容層(可選)
|
||||
psutil>=5.9 # ADR-019 Phase 2: ElephantAlpha system load 真實量測(production 必裝;缺失時 fallback 為 queue-based 估算)
|
||||
|
||||
@@ -86,3 +86,14 @@ def test_cli_ssh_helper_replaces_legacy_paramiko_dependency():
|
||||
assert "subprocess.run" in helper_source
|
||||
assert '"ssh"' in helper_source
|
||||
assert "paramiko" not in helper_source
|
||||
|
||||
|
||||
def test_pgvector_extension_uses_local_sqlalchemy_type_not_python_package():
|
||||
requirements = _requirement_names()
|
||||
ai_models_source = (ROOT / "database" / "ai_models.py").read_text(encoding="utf-8")
|
||||
migration_source = (ROOT / "migrations" / "009_pgvector_embedding.sql").read_text(encoding="utf-8")
|
||||
|
||||
assert "pgvector" not in requirements
|
||||
assert "matplotlib-inline" not in requirements
|
||||
assert "class Vector(UserDefinedType)" in ai_models_source
|
||||
assert "CREATE EXTENSION IF NOT EXISTS vector" in migration_source
|
||||
|
||||
Reference in New Issue
Block a user