kin: KIN-083 Healthcheck claude CLI auth: перед запуском pipeline проверять что claude залогинен (быстрый claude -p 'ok' --output-format json, проверить is_error и 'Not logged in'). Если не залогинен — не запускать pipeline, а показать ошибку 'Claude CLI requires login' в GUI с инструкцией.
This commit is contained in:
parent
a80679ae72
commit
bfc8f1c0bb
18 changed files with 1390 additions and 57 deletions
|
|
@ -114,6 +114,26 @@ def test_detect_modules_empty(tmp_path):
|
|||
assert detect_modules(tmp_path) == []
|
||||
|
||||
|
||||
def test_detect_modules_deduplication_by_name(tmp_path):
|
||||
"""KIN-081: detect_modules дедуплицирует по имени (не по имени+путь).
|
||||
|
||||
Если два разных scan_dir дают одноимённые модули (например, frontend/src/components
|
||||
и backend/src/components), результат содержит только первый.
|
||||
Это соответствует UNIQUE constraint (project_id, name) в таблице modules.
|
||||
"""
|
||||
fe_comp = tmp_path / "frontend" / "src" / "components"
|
||||
fe_comp.mkdir(parents=True)
|
||||
(fe_comp / "App.vue").write_text("<template></template>")
|
||||
|
||||
be_comp = tmp_path / "backend" / "src" / "components"
|
||||
be_comp.mkdir(parents=True)
|
||||
(be_comp / "Service.ts").write_text("export class Service {}")
|
||||
|
||||
modules = detect_modules(tmp_path)
|
||||
names = [m["name"] for m in modules]
|
||||
assert names.count("components") == 1
|
||||
|
||||
|
||||
def test_detect_modules_backend_pg(tmp_path):
|
||||
"""Test detection in backend-pg/src/ pattern (like vdolipoperek)."""
|
||||
src = tmp_path / "backend-pg" / "src" / "services"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue