feat(logs): раздел «Логи» — хвост и свой grep (#16)
CI / ruff · mypy · pytest (pull_request) Successful in 9m40s

- app/logs/grep.py: подмножество grep (шаблон, -i -v -E -c -C N), разбор
  shlex без исполнения, BRE → regex, таймаут на строку и бюджет на поиск,
  лимиты 200 символов / 500 строк вывода
- app/logs/journal.py: каждый поиск в log_queries (L-6)
- бот: выбор контейнера, хвост 50/200 строк или 5 мин/1 ч/24 ч, свой grep
  по 24 ч, длинный результат — файлом .log (L-5)
- логи Docker: не больше 50 000 строк и 5 МБ, сохраняются новейшие
- fix: кнопки меню и /menu, /help больше не проглатываются шагами ввода
  (имя файла, содержимое, сообщение коммита, grep) — фильтр free_input

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 14:49:02 +03:00
co-authored by Claude Opus 5.5
parent 86ca3a67e0
commit f89338e015
18 changed files with 884 additions and 29 deletions
-1
View File
@@ -16,7 +16,6 @@ def build_router(texts: Texts, access: AccessService) -> Router:
router = Router(name="common")
sections = section_by_button(texts)
section_text = {
Section.LOGS: texts.section.logs,
Section.ALERTS: texts.section.alerts,
}