[Refactor] Удалить недостижимую manual/catalog producer closure #62

Closed
opened 2026-10-11 21:45:17 +03:00 by codex-bot · 1 comment
Owner

Problem

TbankSyncService.request/dispatch не имеет command entrypoint. CatalogDiscovery request/refresh/drain запускают direct tests и dead parent; ordinary HTTP online, observe reader passive. Orphan Accepted DTO создаёт ложную command surface.

Expected Behavior

Поддерживается только достижимая orchestration; status/observe readers и live source owners сохранены.

Evidence

Audit date 2026-10-11; 04, previous Complexity. IDs DEAD-001, DEAD-002, DEAD-003, BE-007, TQ-009, TA-F09, CA-X03. Revision 0ad84ff4f0b4712abc7e69dc299856f14af6eadd; Confidence High (CA-X03 secondary-only); Verification status static.
Affected: tbank-sync.service.ts:54–311; tbank-screen.ts/spec.ts; sync repository reserve/progress; catalog-discovery.service.ts:340–496; catalog-discovery.repository.ts:341–464; sync.dto.ts:212–218,232–250.

Scope

In scope

Manual parent→exclusive discovery writer deletion, unused DI/fields/helpers/tests, orphan DTO после caller/schema proof.

Out of scope

Status/sourceStatus, public sync=observe, shared reserve/finish/publishSource, instrument schema/FK/rows, hourly/candle/Ledger owners.

Proposed Approach

Повторить current production/dynamic caller inventory. Удалять method-level closure, не folders. Rebind полезные online whitelist/selection proofs; orphan HourlySyncSectionDto удалять лишь если fresh schema/callers подтверждают вторичную гипотезу.

Acceptance Criteria

  • Manual request/dispatch и exclusive writer/helper/tests удалены; Nest AppModule DI init работает.
  • Catalog producer-only direct tests не поддерживают retired behavior; online search/detail/ticker и observe readers прежние.
  • GET status schema/access/successor unchanged, POST command отсутствует.
  • publishSource/CAS/candles/FK и stored rows сохранены; отсутствие schema/data purge подтверждено diff.

Verification

Existing OpenAPI/status, stocks/bonds, Ledger/local-read/source/candle SQLite cases; no new tests ради trivial DTO deletion; backend final verify/e2e по touched boundary.

Dependencies

Нет внешнего blocker: compatibility investigation T11 не задерживает code-only deletion; public reader сохраняется.

Traceability

Campaign WealthLedger/main#23 . Findings DEAD-001, DEAD-002, DEAD-003, BE-007, TQ-009, TA-F09, CA-X03. WealthLedger/backend; T10.

<!-- wealthledger-audit:2026-10-11:legacy-producer-closure --> ## Problem TbankSyncService.request/dispatch не имеет command entrypoint. CatalogDiscovery request/refresh/drain запускают direct tests и dead parent; ordinary HTTP online, observe reader passive. Orphan Accepted DTO создаёт ложную command surface. ## Expected Behavior Поддерживается только достижимая orchestration; status/observe readers и live source owners сохранены. ## Evidence Audit date `2026-10-11`; [04](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/04-dead-code-and-legacy-report.md), [previous Complexity](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/previous/complexity-audit.md). IDs DEAD-001, DEAD-002, DEAD-003, BE-007, TQ-009, TA-F09, CA-X03. Revision `0ad84ff4f0b4712abc7e69dc299856f14af6eadd`; Confidence High (CA-X03 secondary-only); Verification status static. Affected: [tbank-sync.service.ts:54–311](https://git.personal.ksv741.ru/WealthLedger/backend/src/commit/0ad84ff4f0b4712abc7e69dc299856f14af6eadd/src/modules/investments/tbank-sync/tbank-sync.service.ts#L54-L311); tbank-screen.ts/spec.ts; sync repository reserve/progress; catalog-discovery.service.ts:340–496; catalog-discovery.repository.ts:341–464; sync.dto.ts:212–218,232–250. ## Scope ### In scope Manual parent→exclusive discovery writer deletion, unused DI/fields/helpers/tests, orphan DTO после caller/schema proof. ### Out of scope Status/sourceStatus, public sync=observe, shared reserve/finish/publishSource, instrument schema/FK/rows, hourly/candle/Ledger owners. ## Proposed Approach Повторить current production/dynamic caller inventory. Удалять method-level closure, не folders. Rebind полезные online whitelist/selection proofs; orphan HourlySyncSectionDto удалять лишь если fresh schema/callers подтверждают вторичную гипотезу. ## Acceptance Criteria - [ ] Manual request/dispatch и exclusive writer/helper/tests удалены; Nest AppModule DI init работает. - [ ] Catalog producer-only direct tests не поддерживают retired behavior; online search/detail/ticker и observe readers прежние. - [ ] GET status schema/access/successor unchanged, POST command отсутствует. - [ ] publishSource/CAS/candles/FK и stored rows сохранены; отсутствие schema/data purge подтверждено diff. ## Verification Existing OpenAPI/status, stocks/bonds, Ledger/local-read/source/candle SQLite cases; no new tests ради trivial DTO deletion; backend final verify/e2e по touched boundary. ## Dependencies Нет внешнего blocker: compatibility investigation T11 не задерживает code-only deletion; public reader сохраняется. ## Traceability Campaign https://git.personal.ksv741.ru/WealthLedger/main/issues/23 . Findings DEAD-001, DEAD-002, DEAD-003, BE-007, TQ-009, TA-F09, CA-X03. WealthLedger/backend; T10.
codex-bot added this to the Technical Audit Remediation — 2026-10-11 milestone 2026-10-11 21:45:17 +03:00
codex-bot added the Kind/Enhancement
Priority
Medium
3
audit/2026-10-11
labels 2026-10-11 21:45:17 +03:00
codex-bot was assigned by hermes-agent 2026-10-12 00:04:23 +03:00
hermes-agent added this to the WealthLedger — Delivery Board project 2026-10-12 00:04:23 +03:00
hermes-agent added Kind/Refactor and removed Kind/Enhancement labels 2026-10-12 00:04:23 +03:00
Author
Owner

Выполнено: PR #98 смержен в develop (commit 96d4de4). Удалены недостижимые TbankSyncService.request/dispatch, CatalogDiscovery request/refresh/drain с producer-состоянием, orphan DTO TbankSyncAcceptedDto и HourlySyncSectionDto, producer-only тесты. Status/observe readers и shared owners сохранены. Остаточный follow-up (неиспользуемые repository reserve/publish/finish) вынесен отдельно и в этот issue не входит. Проверки: verify, 20/20 SQLite suites, openapi-contract.

Выполнено: PR #98 смержен в develop (commit 96d4de4). Удалены недостижимые TbankSyncService.request/dispatch, CatalogDiscovery request/refresh/drain с producer-состоянием, orphan DTO TbankSyncAcceptedDto и HourlySyncSectionDto, producer-only тесты. Status/observe readers и shared owners сохранены. Остаточный follow-up (неиспользуемые repository reserve/publish/finish) вынесен отдельно и в этот issue не входит. Проверки: verify, 20/20 SQLite suites, openapi-contract.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/backend#62