chore: refresh frontend knowledge graph

This commit is contained in:
k1nq
2026-09-22 08:37:25 +05:00
parent 30bd1b48a0
commit 2ff18946a9
6 changed files with 4356 additions and 3976 deletions
+73 -111
View File
@@ -1,16 +1,16 @@
# Graph Report - finance (2026-09-21)
# Graph Report - finance (2026-09-22)
## Corpus Check
- 151 files · ~64,809 words
- 153 files · ~65,647 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 1277 nodes · 3734 edges · 79 communities (54 shown, 18 thin omitted)
- 1288 nodes · 3759 edges · 69 communities (47 shown, 15 thin omitted)
- Extraction: 98% EXTRACTED · 2% INFERRED · 0% AMBIGUOUS · INFERRED: 71 edges (avg confidence: 0.93)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `35b9ea83`
- Built from commit: `30bd1b48`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@@ -19,33 +19,33 @@
- budgeting/router.py
- Base
- set_space_context
- imports/router.py
- imports/service.py
- alfa_xlsx.py
- ledger/service.py
- index.ts
- types.ts
- router.tsx
- ledger/router.py
- main.py
- @testing-library/jest-dom
- compilerOptions
- AnalyticsPage.tsx
- exports/router.py
- @testing-library/user-event
- devDependencies
- Session
- dependencies
- ImportDetailPage.tsx
- OperationsPage.tsx
- useOperations.ts
- SettingsPage.tsx
- Toaster.tsx
- adapters/base.py
- test_adapter_contracts.py
- BudgetPage.tsx
- client.ts
- AccountsPage.tsx
- Docker Compose Development Stack
- Financial Space
- scripts
- exports/service.py
- @types/react
- General Pool
- test_adapter_contracts.py
- TestBaseContract
- Per-File Envelope Encryption
- Operation
- Versioned Statement Imports
@@ -59,13 +59,10 @@
- test_api.py
- i18n-parity.test.ts
- Expected Income
- test_private_fixtures.py
- TestAlfaDebitContract
- jsdom
- graphify
- @types/react-dom
- typescript-eslint
- OzonDebitPdfAdapter
- vitest
- Favicon SVG (ledger lines icon)
- init-app-role.sh
@@ -76,16 +73,9 @@
- Gitea CI and real statement imports
- 20260918_0002_hold_lifecycle.py
- eslint-plugin-react-hooks
- openapi-typescript
- @testing-library/dom
- @testing-library/react
- vite
- ColumnChart.tsx
- conftest.py
- imports/service.py
- BlobStore
- AppError
- celery_app.py
- get_settings
- AGENTS.md
## God Nodes (most connected - your core abstractions)
@@ -120,99 +110,91 @@
- **Financial Space Tenancy Boundary** — context_financial_space, context_membership, docs_adr_0001_financial_space_ownership_and_rls_defense_in_depth_authorization, docs_adr_0001_financial_space_ownership_and_rls_transaction_local_rls, docs_adr_0001_financial_space_ownership_and_rls_cross_space_integrity [EXTRACTED 1.00]
- **Safe Statement Import Flow** — context_statement_import, context_parse_run, context_source_record, docs_adr_0003_versioned_statement_imports_immutable_statement_document, docs_adr_0003_versioned_statement_imports_conservative_deduplication, docs_adr_0003_versioned_statement_imports_atomic_confirm_revert [EXTRACTED 1.00]
## Communities (79 total, 18 thin omitted)
## Communities (69 total, 15 thin omitted)
### Community 0 - "identity/service.py"
Cohesion: 0.06
Nodes (83): current_context(), current_session(), alias, Context, CurrentSession, Db, Header, User (+75 more)
Cohesion: 0.07
Nodes (58): current_context(), current_session(), alias, Context, CurrentSession, Db, Header, User (+50 more)
### Community 1 - "budgeting/router.py"
Cohesion: 0.14
Nodes (43): balances(), cash_flow(), category_spend(), plan_fact(), Context, date, Db, get (+35 more)
Cohesion: 0.20
Nodes (34): AssignmentItem, assignments(), AssignmentsBody, categories(), CategoryBody, CategoryFundingBody, close(), close_frontend() (+26 more)
### Community 2 - "Base"
Cohesion: 0.07
Nodes (76): downgrade(), upgrade(), AuditEvent, Append-only domain/security event. Never stores raw financial payloads., ExpectedIncome, ExpectedIncomeMatch, FundingMovement, PeriodClosure (+68 more)
Nodes (67): downgrade(), upgrade(), balances(), cash_flow(), category_spend(), date, UUID, AuditEvent (+59 more)
### Community 3 - "set_space_context"
Cohesion: 0.22
Nodes (14): get_db(), get_session_factory(), Any, sessionmaker, Transaction-local RLS context. No-op on SQLite (tests); fail-closed on…, Transactional scope for workers/endpoints that own the transaction lifecycle., session_scope(), set_space_context() (+6 more)
Cohesion: 0.06
Nodes (52): balances(), cash_flow(), category_spend(), plan_fact(), Context, date, Db, get (+44 more)
### Community 4 - "imports/router.py"
Cohesion: 0.16
Nodes (33): confirm(), ConfirmBody, decide_row(), DecisionBody, delete_source(), detail(), HoldResolveBody, imports() (+25 more)
### Community 4 - "imports/service.py"
Cohesion: 0.06
Nodes (92): datetime, utcnow(), not_found(), normalize_description(), date, record_fingerprint(), magic_kind(), BlobStore (+84 more)
### Community 5 - "alfa_xlsx.py"
Cohesion: 0.17
Nodes (24): AlfaDebitXlsxAdapter, _AlfaHeaderMeta, AlfaXlsxAdapterBase, _cell_str(), _debit_find_header(), _debit_header_metadata(), _debit_header_value(), _debit_norm() (+16 more)
### Community 6 - "ledger/service.py"
Cohesion: 0.11
Nodes (62): Any, record(), get_income_source(), bad_request(), conflict(), not_found(), Any, _apply_hold_matches() (+54 more)
### Community 6 - "index.ts"
Cohesion: 0.26
Nodes (8): Locale, LangSwitcher(), createI18n(), detectLocale(), i18n, LOCALES, setLocale(), storedLocale()
### Community 7 - "types.ts"
Cohesion: 0.05
Nodes (52): api, AcceptInvitePayload, Account, AccountStatus, BalanceItem, BalancesReport, BudgetBlocker, BudgetCategory (+44 more)
Cohesion: 0.06
Nodes (47): api, Account, AccountStatus, BalanceItem, BalancesReport, BudgetBlocker, BudgetCategory, BudgetStatus (+39 more)
### Community 8 - "router.tsx"
Cohesion: 0.11
Nodes (35): AcceptInvitePage, LoginPage, RequireAuth(), ResetPasswordPage, SettingsPage, AppLayout(), NAV_ITEMS, LangSwitcher() (+27 more)
Cohesion: 0.10
Nodes (33): AcceptInvitePayload, LoginPayload, PasswordResetPayload, AcceptInvitePage, BudgetPage, ImportDetailPage, LoginPage, OperationsPage (+25 more)
### Community 9 - "ledger/router.py"
Cohesion: 0.15
Nodes (31): account_json(), AccountBody, accounts(), archive_account(), create_account(), create_operation(), delete_account(), operation_json() (+23 more)
### Community 10 - "main.py"
Cohesion: 0.21
Nodes (14): get_engine(), app_error_handler(), health(), healthz(), get, Request, readiness(), security_headers() (+6 more)
### Community 11 - "compilerOptions"
Cohesion: 0.07
Nodes (28): compilerOptions, baseUrl, esModuleInterop, forceConsistentCasingInFileNames, isolatedModules, jsx, lib, module (+20 more)
### Community 12 - "AnalyticsPage.tsx"
Cohesion: 0.21
Nodes (12): AnalyticsPage, PlanFactBars(), PlanFactBarsProps, PlanFactRow, MonthSwitcher(), MonthSwitcherProps, useAnalyticsBalances(), useAnalyticsCashFlow() (+4 more)
### Community 13 - "exports/router.py"
Cohesion: 0.27
Nodes (10): download(), export_status(), Context, Csrf, Db, get, post, Response (+2 more)
Cohesion: 0.12
Nodes (19): AnalyticsPage, CashFlowColumn, ColumnChart(), ColumnChartProps, BarRow, HorizontalBars(), HorizontalBarsProps, PlanFactBars() (+11 more)
### Community 14 - "devDependencies"
Cohesion: 0.11
Nodes (19): eslint, @eslint/js, eslint-plugin-jsx-a11y, devDependencies, eslint, @eslint/js, eslint-plugin-jsx-a11y, globals (+11 more)
Cohesion: 0.10
Nodes (21): eslint, @eslint/js, eslint-plugin-jsx-a11y, devDependencies, eslint, @eslint/js, eslint-plugin-jsx-a11y, globals (+13 more)
### Community 15 - "Session"
Cohesion: 0.09
Nodes (87): balances(), cash_flow(), category_spend(), plan_fact(), date, UUID, BudgetPeriod, Calendar month budget period in the space timezone (month granularity). (+79 more)
Cohesion: 0.07
Nodes (122): plan_fact(), Any, record(), BudgetPeriod, Calendar month budget period in the space timezone (month granularity)., add_expected_income(), archive_category(), _balance_until() (+114 more)
### Community 16 - "dependencies"
Cohesion: 0.11
Nodes (19): dependencies, @hookform/resolvers, i18next, react, react-dom, react-hook-form, react-i18next, react-router-dom (+11 more)
Cohesion: 0.09
Nodes (23): @fontsource/funnel-sans, @fontsource/geist-mono, dependencies, @fontsource/funnel-sans, @fontsource/geist-mono, @hookform/resolvers, i18next, react (+15 more)
### Community 17 - "ImportDetailPage.tsx"
Cohesion: 0.27
Nodes (15): RowDecision, ImportDetailPage, useToast(), useConfirmImport(), useImport(), useImportErrorToaster(), useReparseImport(), useRevertImport() (+7 more)
Cohesion: 0.20
Nodes (18): Button(), ConfirmDialog(), ConfirmDialogProps, Modal(), ModalProps, useToast(), useConfirmImport(), useImport() (+10 more)
### Community 18 - "OperationsPage.tsx"
Cohesion: 0.11
Nodes (29): Operation, ImportsPage, NotFoundPage, OperationsPage, ReviewQueuePage, Badge(), BadgeTone, EmptyState() (+21 more)
Nodes (30): Operation, OperationKind, OperationStatus, ImportsPage, Badge(), BadgeTone, EmptyState(), EmptyStateProps (+22 more)
### Community 19 - "useOperations.ts"
### Community 19 - "SettingsPage.tsx"
Cohesion: 0.16
Nodes (14): invalidationRoots, queryKeys, SESSION_ROOT, sessionInvalidationRoot, SPACE_ROOT, spaceInvalidationRoot, OperationFilters, useCategorizeOperation() (+6 more)
Nodes (16): invalidationRoots, queryKeys, SESSION_ROOT, sessionInvalidationRoot, SPACE_ROOT, spaceInvalidationRoot, OperationFilters, useCancelDeletion() (+8 more)
### Community 20 - "Toaster.tsx"
Cohesion: 0.12
Nodes (15): Locale, App(), queryClient, AppRoutes(), ToastApi, ToastContext, ToastItem, ToastKind (+7 more)
Cohesion: 0.18
Nodes (10): App(), queryClient, AppRoutes(), ToastApi, ToastContext, ToastItem, ToastKind, ToastProvider() (+2 more)
### Community 21 - "adapters/base.py"
Cohesion: 0.14
Nodes (18): account_fingerprint(), amount_to_kopecks(), _mask_digits(), money_to_kopecks(), Parse statement money strings like '-1 234,56 RUR', '+ 500.00 ₽', '12 345'.…, SourceRow, StatementDraft, _first_page_text() (+10 more)
### Community 21 - "test_adapter_contracts.py"
Cohesion: 0.11
Nodes (26): AlfaCreditXlsxAdapter, account_fingerprint(), amount_to_kopecks(), _mask_digits(), money_to_kopecks(), Parse statement money strings like '-1 234,56 RUR', '+ 500.00 ₽', '12 345'.…, SourceRow, StatementDraft (+18 more)
### Community 22 - "BudgetPage.tsx"
Cohesion: 0.21
Nodes (17): BudgetPage, ConfirmDialog(), ConfirmDialogProps, Modal(), ModalProps, useBudgetCategories(), useBudgetErrorToaster(), useBudgetSummary() (+9 more)
Cohesion: 0.17
Nodes (20): NotFoundPage, OverviewPage, PageHeader(), PageHeaderProps, useBudgetCategories(), useBudgetErrorToaster(), useBudgetSummary(), useCloseMonth() (+12 more)
### Community 23 - "client.ts"
Cohesion: 0.23
@@ -234,17 +216,13 @@ Nodes (12): Credit Reserve, Financial Account, Financial Space, Membership, User
Cohesion: 0.22
Nodes (9): scripts, api:generate, build, dev, lint, preview, test, test:watch (+1 more)
### Community 28 - "exports/service.py"
Cohesion: 0.40
Nodes (9): build_export(), consume_export(), _csv_bytes(), get_export(), _json_rows(), datetime, UUID, request_export() (+1 more)
### Community 29 - "General Pool"
Cohesion: 0.29
Nodes (8): Budget Period, Funding, General Pool, Monthly Category, Plan Assignment, Savings Envelope, Immutable Closure Snapshots, Plan and Funding Separation
### Community 30 - "test_adapter_contracts.py"
Cohesion: 0.13
Nodes (10): AlfaCreditXlsxAdapter, Protocol, StatementAdapter, detect_adapter(), OzonCreditPdfAdapter, make_draft(), make_source_row(), Sanitized synthetic contract tests for the evidenced statement adapters. These… (+2 more)
### Community 30 - "TestBaseContract"
Cohesion: 0.12
Nodes (7): Protocol, StatementAdapter, detect_adapter(), make_draft(), make_source_row(), TestBaseContract, Workbook
### Community 31 - "Per-File Envelope Encryption"
Cohesion: 0.29
@@ -290,28 +268,20 @@ Nodes (5): components, $defs, operations, paths, webhooks
Cohesion: 0.67
Nodes (3): TestClient, test_invite_login_and_authenticated_space(), test_openapi_contains_critical_paths()
### Community 44 - "test_private_fixtures.py"
Cohesion: 0.13
Nodes (20): Any, Reconcile parsed rows against declared bank controls with stable diagnostics.…, _reconciliation_summary(), _check(), _fail(), _load_entries(), parsed(), fixture (+12 more)
### Community 45 - "TestAlfaDebitContract"
Cohesion: 0.19
Nodes (3): alfa_workbook_bytes(), synthetic_alfa_rows(), TestAlfaDebitContract
### Community 44 - "TestAlfaDebitContract"
Cohesion: 0.08
Nodes (23): Any, Reconcile parsed rows against declared bank controls with stable diagnostics.…, _reconciliation_summary(), alfa_workbook_bytes(), synthetic_alfa_rows(), TestAlfaDebitContract, _check(), _fail() (+15 more)
### Community 47 - "graphify"
Cohesion: 0.17
Nodes (11): command, enabled, timeout, type, mcp, graphify, plugin, $schema (+3 more)
### Community 50 - "OzonDebitPdfAdapter"
Cohesion: 0.29
Nodes (5): _ozon_cell(), _ozon_normalize(), OzonDebitPdfAdapter, Ozon debit statement contract, evidenced against the real document. A 'Справка…, Pattern
### Community 62 - "LocalDirectoryBlobStore"
Cohesion: 0.39
Nodes (3): LocalDirectoryBlobStore, Path, S3-neutral local store; production swaps in an S3-compatible client.
### Community 63 - "TestOzonDebitContract"
Cohesion: 0.15
Cohesion: 0.16
Nodes (6): minimal_pdf(), ozon_extracted(), _QuotaSettings, Build a small valid single-font PDF with empty or ASCII-only pages., TestOzonDebitContract, MonkeyPatch
### Community 64 - "Gitea CI and real statement imports"
@@ -322,35 +292,27 @@ Nodes (6): Confirmed decisions, Gitea CI and real statement imports, Goal and co
Cohesion: 0.80
Nodes (4): downgrade(), _has_check_constraint(), _has_column(), upgrade()
### Community 71 - "ColumnChart.tsx"
Cohesion: 0.24
Nodes (7): CashFlowColumn, ColumnChart(), ColumnChartProps, BarRow, HorizontalBars(), HorizontalBarsProps, rows
### Community 73 - "AppError"
Cohesion: 0.21
Nodes (11): AppError, Domain error rendered as a machine-readable JSON error payload., unprocessable(), decrypt_file(), encrypt_file(), EncryptedFile, Per-file random DEK; DEK wrapped with the KEK from the secret manager., Crypto-shred hook: deleting wrapped DEK rows in DB plus blobs removes access. (+3 more)
### Community 72 - "conftest.py"
Cohesion: 0.52
Nodes (6): client(), db(), db_factory(), fixture, sessionmaker, TestClient
### Community 73 - "imports/service.py"
Cohesion: 0.13
Nodes (20): get_settings(), Settings, normalize_description(), date, record_fingerprint(), magic_kind(), get_blob_store(), new_object_key() (+12 more)
### Community 75 - "AppError"
Cohesion: 0.43
Nodes (5): AppError, Domain error rendered as a machine-readable JSON error payload., unprocessable(), _quota_error(), Exception
### Community 76 - "get_settings"
Cohesion: 0.12
Nodes (30): get_settings(), Settings, send_token_email(), accept_invite(), AcceptInviteBody, confirm_password_reset(), create_invite(), InviteBody (+22 more)
## Knowledge Gaps
- **186 isolated node(s):** `$schema`, `file:///home/k1nq/repos/finance/.kilo/plugins/graphify.js`, `type`, `/home/k1nq/.local/bin/graphify-mcp`, `/home/k1nq/repos/finance/graphify-out/graph.json` (+181 more)
These have ≤1 connection - possible missing edges or undocumented components. (Counts symbols only; 339 node(s) total have ≤1 connection when file, concept and rationale nodes are included.)
- **18 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
- **190 isolated node(s):** `$schema`, `file:///home/k1nq/repos/finance/.kilo/plugins/graphify.js`, `type`, `/home/k1nq/.local/bin/graphify-mcp`, `/home/k1nq/repos/finance/graphify-out/graph.json` (+185 more)
These have ≤1 connection - possible missing edges or undocumented components. (Counts symbols only; 343 node(s) total have ≤1 connection when file, concept and rationale nodes are included.)
- **15 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `Session` connect `Session` to `identity/service.py`, `Base`, `set_space_context`, `ledger/service.py`, `conftest.py`, `imports/service.py`, `exports/service.py`?**
_High betweenness centrality (0.085) - this node is a cross-community bridge._
- **Why does `AppError` connect `AppError` to `identity/service.py`, `Base`, `imports/router.py`, `alfa_xlsx.py`, `ledger/service.py`, `TestRocketbankDebitContract`, `imports/service.py`, `main.py`, `exports/router.py`, `Session`, `adapters/base.py`, `test_adapter_contracts.py`, `TestOzonDebitContract`?**
_High betweenness centrality (0.069) - this node is a cross-community bridge._
- **Why does `bad_request()` connect `ledger/service.py` to `identity/service.py`, `budgeting/router.py`, `imports/service.py`, `ledger/router.py`, `AppError`, `Session`?**
- **Why does `Session` connect `Session` to `identity/service.py`, `Base`, `set_space_context`, `imports/service.py`?**
_High betweenness centrality (0.082) - this node is a cross-community bridge._
- **Why does `AppError` connect `AppError` to `identity/service.py`, `set_space_context`, `imports/service.py`, `alfa_xlsx.py`, `TestRocketbankDebitContract`, `get_settings`, `Session`, `test_adapter_contracts.py`, `TestOzonDebitContract`?**
_High betweenness centrality (0.068) - this node is a cross-community bridge._
- **Why does `bad_request()` connect `Session` to `identity/service.py`, `budgeting/router.py`, `imports/service.py`, `AppError`, `ledger/router.py`?**
_High betweenness centrality (0.017) - this node is a cross-community bridge._
- **Are the 2 inferred relationships involving `Session` (e.g. with `UTCDateTime` and `test_postgres_rls_requires_matching_transaction_context()`) actually correct?**
_`Session` has 2 INFERRED edges - model-reasoned connections that need verification._
@@ -359,4 +321,4 @@ _Questions this graph is uniquely positioned to answer:_
- **Are the 3 inferred relationships involving `Base` (e.g. with `downgrade()` and `upgrade()`) actually correct?**
_`Base` has 3 INFERRED edges - model-reasoned connections that need verification._
- **What connects `$schema`, `file:///home/k1nq/repos/finance/.kilo/plugins/graphify.js`, `type` to the rest of the system?**
_186 weakly-connected nodes found - possible documentation gaps or missing edges._
_190 weakly-connected nodes found - possible documentation gaps or missing edges._