diff --git a/MEMORY.md b/MEMORY.md index c937e2d..c8ca4d8 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -26,6 +26,7 @@ - 2026-08-21: CI final images use immutable registry base images. Any runtime dependency change requires rebuilding/pushing the matching base (`Dockerfile.base` for `requirements.txt`, `Dockerfile.gateway-base` for `nginx.conf`) and changing the tag used by the final Dockerfile. - 2026-08-21: use Context7 for fresh official integration documentation and `prevent-eol` before dependency changes; lifecycle status is not a vulnerability verdict. - 2026-08-21: project-local frontend instructions include `frontend-craft`, `frontend-design`, and `ui-ux-pro-max`; use them together for UI work. +- 2026-08-21: the public calculator and screenshot upload endpoint do not require `BELKI_WEB_PASSWORD`; password-gated access is limited to applications and admin flows. # 2026-08-16 — несколько котят в прокачке `CoachingSession.extra_kittens` теперь влияет на баллы сопровождающего через количество подопечных: 1-й ×1, 2-й ×1,5, каждый последующий ×1,15 (коэффициенты перемножаются), вместо сложения полной прибыли. Базовый коэффициент самостоятельности основного котёнка сохраняется. Веб-форма отправляет список `extra_kittens`; VK принимает `доп. котята: ...` в pipe-команде. diff --git a/app/main.py b/app/main.py index 074657b..3a2743b 100644 --- a/app/main.py +++ b/app/main.py @@ -194,7 +194,7 @@ class Handler(BaseHTTPRequestHandler): token = next((part.strip().split("=", 1)[1] for part in cookies.split(";") if part.strip().startswith("belki_session=")), "") _WEB_SESSIONS.discard(token) self._json_with_cookie(200, {"authenticated": False}, "belki_session=; Path=/; Max-Age=0; HttpOnly; SameSite=Lax") - elif not self._web_authorized(): + elif self.path == "/api/applications" and not self._web_authorized(): return elif self.path == "/api/web/upload": raw = str(payload.get("data", "")) diff --git a/structure_and_data.md b/structure_and_data.md index 976ebb3..b71c9b2 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -23,6 +23,7 @@ - GitLab Runner retries source checkout up to three times (`GET_SOURCES_ATTEMPTS=3`) to absorb transient connectivity failures before the job script starts. A persistent inability to reach `git.nyan404.ru:443` still requires repair on the selected runner host. - The local image is currently `belki-calculator:test`; the CI target is now `$DOCKER_REGISTRY/belki:latest`. - GitLab CI runs `python -m compileall -q app tests` and `python -m unittest discover -s tests -q` in a dedicated `test` stage before build/deploy. The job explicitly clears `BELKI_DATABASE_URL` and uses `/tmp/belki-test-identities.sqlite3`, preventing unit tests from reaching the Kubernetes PostgreSQL service. Local validation was performed with the same tests, JavaScript syntax check, a local browser/API smoke test, and container health/API smoke. +- `/belki` is public: it creates reports and uploads their screenshots without a web-password session. `/applications` and `/admin` remain password-protected. - The VK dialog layer is covered by tests for step-by-step entry, bulk detection, clarification, confirmation, and cancellation. - Bulk input accepts a natural one-line format without pipes, e.g. `15.08 11:00 11:20 Дикая Вишня 1604614 Серолап 1617140`; the web form calls `/api/inspect-bulk` and fills recognized fields. - Training and inspection have the same stepwise/bulk flow. Character identity can be resolved through `/api/resolve-identity` and the persistent SQLite directory; missing pairs produce an explicit prompt instead of guessed data. diff --git a/web/calculator.html b/web/calculator.html index 9a032ff..a8ac1b8 100644 --- a/web/calculator.html +++ b/web/calculator.html @@ -45,13 +45,6 @@
-
-

Вход в калькулятор

-

Введите пароль, чтобы создавать отчёты и загружать скриншоты.

-
-

-
-

@@ -145,11 +137,6 @@