[Refactor] Загружать banking page relations ограниченным batch #68
Closed
opened 2026-10-11 21:47:21 +03:00 by codex-bot
·
1 comment
No Branch/Tag Specified
Labels
Clear labels
Kind/Dependencies
Kind/Investigation
Kind/Process
Kind/Refactor
audit/2026-10-11
kind/investigation
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Dependency update or dependency-management work
Research or decision required before implementation
Developer workflow, CI/CD, tooling, or process improvement
Internal code or configuration restructuring without new product behavior
Technical Audit Remediation — 2026-10-11
Нужна проверка evidence до решения; runtime-дефект не утверждается
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
Technical Audit Remediation — 2026-10-11
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: WealthLedger/backend#68
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
History/purchase picker reuse operationView loader: page cost 3+Σ(1+t+s+c+r) Prisma model reads, одни card/category/refund families читаются повторно. Embedded SQLite не имеет remote RTT; практическая latency выгода не измерена.
Expected Behavior
Page projection сохраняет exact DTO/ownership/refund semantics при bounded distinct relation reads; если gain не оправдывает maintenance, допустим evidence-backed KEEP.
Evidence
Audit date
2026-10-11; 07. IDs FLOW-005, TA-F11. Revision0ad84ff4f0b4712abc7e69dc299856f14af6eadd; Confidence High structure/Medium benefit; Verification status static.Affected: bank-operations.service.ts:333–369, :41–91; bank-cards.repository.ts:62–72; test/bank-cards.e2e-spec.ts:424–462,550–580,779–791.
Scope
In scope
Page-only bounded cards/source expenses/categories/refunds reads и controlled cost trace.
Out of scope
Изменение write/single-operation path, снятие transaction/CAS/replay, новый cache/BFF/index без profile.
Proposed Approach
Сохранить read transaction, batch distinct relations и existing projection; пустая page не loads relations. Refund availableRefund исключает текущую row, expense — нет.
Acceptance Criteria
Verification
Existing bank-cards SQLite cases, controlled 10/100-row pages и query trace; final backend gates при коде. Не заявлять include=один SQL без actual trace.
Dependencies
Нет; тестовые prerequisites T13 полезны, но не технический blocker.
Traceability
Campaign WealthLedger/main#23 . Findings FLOW-005, TA-F11. WealthLedger/backend; T17.
Implemented and merged via #86 (
285dd08).Page projection now batches owner-scoped cards, source expenses, categories, and refunds in the existing read transaction. Singleton/create/update paths remain unchanged. Verified by lint, application/test typechecks, build, and
bank-cards.e2e-spec.ts.