mirror of
https://github.com/dartdavros/chatballs.git
synced 2026-10-05 09:14:58 +03:00
caa51f4e2972ca2e2792442b16f3c7242bf29a9f
SPEC §13.15 / §16.14 acceptance criteria. - test_helpers.make_support_token: HS256-токен для тестов (зеркало token.py). - SupportSessionTests: happy path (snapshot+conversation+audit SUCCESS), invalid signature, expired, schema error, missing subject, disabled contract, wrong channel (CHANNEL_NOT_SUPPORT), product mismatch, missing token, continue session (reuses open conversation), raw token/jti не попадает в audit. - SupportContractApiTests: OWNER регистрирует контракт (version из code), OPERATOR forbidden (403), code должен соответствовать продукту. - Багфиксы по ходу тестов: code=CharField (точки в foxray.support.v1), jsonpath return current, audit-deny вне write-транзакции (откат не стирает audit), DRAFT/DISABLED → CONTRACT_DISABLED, extraction вынесен в extract.py (NO GOD FILES). - 109 passed (95 baseline + 14 support).
Edevs Hub
Canonical implementation workspace for hub.edevs.tech.
Local start
Copy-Item .env.example .env
.\scripts\start.ps1
The local compose stack contains:
- Django ASGI backend and background worker;
- PostgreSQL;
- Redis;
- Internal Hub UI;
- Web Chat UI;
- local Nginx reverse proxy.
No production secrets are stored in the repository.
Default local URLs:
- Internal Hub UI:
http://localhost:5173 - Django admin:
http://localhost:8010/admin/ - Web Chat:
http://localhost:5175 - Backend API:
http://localhost:8010/api/v1
Local accounts (TOTP disabled). These credentials are fixed — do not change them:
- OWNER —
owner@edevs.tech/Owner-Local-2026 - OPERATOR —
a.kotova@edevs.tech/Operator-Local-2026
Bootstrap the organization and both accounts:
docker compose run --rm backend python manage.py bootstrap_owner --email owner@edevs.tech --password Owner-Local-2026 --name "Иван Петров"
Tests
All suites run in Docker, so no manual environment is required — the test runners auto-detect themselves and relax production hardening (secret-key fail-fast, SSL redirect, throttling) for the duration of the run.
Run everything (backend tests, frontend unit tests, typechecks):
.\scripts\check.ps1
Individual suites:
# Backend (pytest + pytest-django)
docker compose run --rm backend pytest
# Frontend unit tests (vitest)
docker compose run --rm internal-ui npm run test
# End-to-end (Playwright, internal-ui) — auto-starts the dev server
npx playwright install chromium # one-time
npx playwright test --project=internal-ui
Backend pytest configuration lives in apps/backend/pytest.ini (it must sit
next to manage.py so it is also visible inside the backend container).
Description
No description provided
aiai-agentcustomer-servicecustomer-supportdjangodocker-composehelpdeskknowledge-baselive-chatmaxopen-sourcepgvectorragself-hostedtelegramtelegrambot
Readme
AGPL-3.0
10 MiB
0 Stars
1 Watchers
0 Forks
Languages
Python
54.4%
TypeScript
35.6%
CSS
8.2%
Shell
0.8%
JavaScript
0.6%
Other
0.3%