What breaks if I change verify_token?
Описание и применение
В статье описывается инструмент Cognee GitGraph, который анализирует влияние небольшого изменения в общей функции аутентификации монорепозитория, выявляя сервисы, затронутые до 4‑х уровней вызовов, и связанные ошибки CI.
Задача
Determining the impact of a small change to a shared authentication function in a monorepo without triggering unintended failures.
Результат
The demo revealed that billing (1 hop), orders (2 hops), and notifications (4 hops) were at risk, while search was safe. CI failures in at‑risk services were highlighted, enabling targeted review.
Рабочий процесс
- 1. Run cognee-gitgraph demo to load repo data into Cognee.
- 2. Cognee builds a graph of commits, files, symbols, references, and CI failures.
- 3. The CLI walks the graph to find callers of the changed symbol up to 4 hops.
- 4. It outputs at‑risk services, call chains, co‑changed files, and related CI failures.
- 5. Optionally generate a 3D HTML graph with cognee-gitgraph blast --html blast.html.
Доказательства
I built a small Cognee community connector, Cognee GitGraph, to answer that question before the merge.
It reads a git repository, parses the Python code into symbols and call references, reads CI test results from JUnit XML, and loads all of it into Cognee's graph memory.
Blast radius of main...feature/rotate-tokens (up to 4 hops) Changed files (1): shared/auth.py Changed symbols (1): shared/auth.py::verify_token At-risk services: billing 1 hop shared/auth.py::verify_token -> billing/invoice.py::charge notifications 4 hops shared/auth.py::verify_token -> shared/session.py::load_session -> orders/cart.py::get_cart -> orders/checkout.py::checkout -> notifications/receipts.py::send_receipt orders 2 hops shared/auth.py::verify_token -> shared/session.py::load_session -> orders/cart.py::get_cart
Only verify_token counts as changed: the CLI maps the changed line ranges from git diff base...head onto each symbol's first and last line.
- Дата записи: 2026-11-01T20:14:21.574Z