[Investigation] Согласовать видимость CURRENCY position отдельно от cash balance #59
Closed
opened 2026-10-11 21:50:28 +03:00 by codex-bot
·
2 comments
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/frontend#59
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
CURRENCY исключается из stocks/bonds/other sections, но входит в totals denominator. Tests намеренно скрывают её, spec различает traded currency instrument и cash и требует другие позиции. Реальный product defect не установлен.
Expected Behavior
Есть единое product/domain решение, какие contract positions видимы; totals и cash не считаются дважды.
Evidence
Audit date
2026-10-11; 05, FE-006. Revisionc8821200ce699dab1ce65360d1968d5877a2e78b; Confidence Medium intent / High exclusion; Verification status runtime-unverified product consequence.Affected: positions.ts:70–94, :136–160; positions.test.ts:15–69; AccountPage.test.tsx:287–394; specs portfolio-view:22–33,164–169 at
fcdc805f6c1b3be6a20a7e858e3e80cbd83a9121.Scope
In scope
One approved visibility answer и synthetic currency-only/currency+cash/all fixture.
Out of scope
FX conversion, client totals recomputation, guessed live holdings, автоматическое принятие spec против deliberate tests.
Proposed Approach
До ответа сохранить current predicate. При самостоятельной position показать её narrow other branch; если hidden policy intentional — явно согласовать current requirement/test intent.
Acceptance Criteria
Verification
Existing positions/AccountPage route tests после решения; no real broker API. Final frontend gates только при code change; native spec check владельцем при requirement delta.
Dependencies
Product/domain visibility input; других blocking Issues нет.
Traceability
Campaign WealthLedger/main#23 . Finding FE-006. WealthLedger/frontend; T26.
Решение владельца 2026-11-05:
CURRENCY— зеркало Cash Balance; сохранить position/quantity в API, скрыть отдельную карточку в UI и исключить еёcurrentValueиз знаменателя долей позиций. Cash Balance показывать один раз в «Деньги»; не пересчитывать server totals. Backend#140/#141 уже исключили CURRENCY из totals/structure и сбросили старые points. В текущей frontend ветке predicate скрытия сохранён, знаменатель исправлен, добавлен all-account synthetic test; в specs правятся portfolio-view и portfolio-value-history (specs#60).npm run verify: 580/580 tests, build/checks PASS.Поставлено: specs PR WealthLedger/specs#82 и frontend PR WealthLedger/frontend#156 слиты в
develop. Владелец выбрал скрытьCURRENCYкак зеркальный Cash Balance; позиция и quantity остаются в API, а экран считает долю только отображаемых позиций, денежный баланс показывается один раз. Existing route fixtures currency-only/cash+currency и новый all-account synthetic case проверяют отсутствие дубля. Backend totals/structure уже исправлены в backend#140/#141. Full CI green (run 1956). Acceptance выполнены.