[Test] Изолировать HTTP cases от suite state и автоматического scheduler #65

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

Problem

Bank rename/restart/constraint cases зависят от category changes других it. В десяти unrelated AppModule suites и read benchmark minute scheduler активен; длительность >60s допускает скрытые work/RPC/counter mutations вне Act.

Expected Behavior

Каждый финансовый case имеет свои prerequisites; фоновая work начинается только контролируемым stimulus.

Evidence

Audit date 2026-10-11; 09. IDs TI-001, TI-002, CA-H19. Revision 0ad84ff4f0b4712abc7e69dc299856f14af6eadd; Confidence High mechanism; Verification status static, flaky frequency unmeasured.
Affected: bank-cards.e2e-spec.ts:371–390, :710–753; local/income/ledger/all-accounts/connection HTTP bootstrap; tbank-read-baseline:199–247. Precedent upcoming-events:140–152 overrideProvider.

Scope

In scope

Case-owned users/records либо FK-aware cleanup; current scheduler override в не-scheduler suites/benchmark.

Out of scope

DB/migrations на каждый it, общий fixture framework, production env flag, mock-only transactions, отключение scheduler-specific proof.

Proposed Approach

App можно оставить suite-scoped. Rename/restart сами создают card/categories и rename; existing no-lifecycle provider override убирает uncontrollable timer.

Acceptance Criteria

  • Rename/restart/constraint cases проходят отдельно на fresh disposable DB и в полной suite без order prerequisites.
  • Controlled время за minute boundary не создаёт hourly rows/RPC в unrelated local-read suite/benchmark.
  • Real guards/pipes/SQLite/refund/replay/restart outcomes сохранены; scheduler tests явно упражняют real owner отдельно.

Verification

Existing bank/local-read suites через runner-owned env; filtered case execution сохраняет DB guard. Read benchmark только при changed setup proof, не full performance campaign. Backend final gates.

Dependencies

Нет; T01 отдельно отвечает за executable real scheduler guarantee.

Traceability

Campaign WealthLedger/main#23 . Findings TI-001, TI-002, CA-H19. WealthLedger/backend; T13.

<!-- wealthledger-audit:2026-10-11:http-test-isolation --> ## Problem Bank rename/restart/constraint cases зависят от category changes других it. В десяти unrelated AppModule suites и read benchmark minute scheduler активен; длительность >60s допускает скрытые work/RPC/counter mutations вне Act. ## Expected Behavior Каждый финансовый case имеет свои prerequisites; фоновая work начинается только контролируемым stimulus. ## Evidence Audit date `2026-10-11`; [09](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/09-test-architecture-and-infrastructure-report.md). IDs TI-001, TI-002, CA-H19. Revision `0ad84ff4f0b4712abc7e69dc299856f14af6eadd`; Confidence High mechanism; Verification status static, flaky frequency unmeasured. Affected: [bank-cards.e2e-spec.ts:371–390](https://git.personal.ksv741.ru/WealthLedger/backend/src/commit/0ad84ff4f0b4712abc7e69dc299856f14af6eadd/test/bank-cards.e2e-spec.ts#L371-L390), :710–753; local/income/ledger/all-accounts/connection HTTP bootstrap; tbank-read-baseline:199–247. Precedent upcoming-events:140–152 overrideProvider. ## Scope ### In scope Case-owned users/records либо FK-aware cleanup; current scheduler override в не-scheduler suites/benchmark. ### Out of scope DB/migrations на каждый it, общий fixture framework, production env flag, mock-only transactions, отключение scheduler-specific proof. ## Proposed Approach App можно оставить suite-scoped. Rename/restart сами создают card/categories и rename; existing no-lifecycle provider override убирает uncontrollable timer. ## Acceptance Criteria - [ ] Rename/restart/constraint cases проходят отдельно на fresh disposable DB и в полной suite без order prerequisites. - [ ] Controlled время за minute boundary не создаёт hourly rows/RPC в unrelated local-read suite/benchmark. - [ ] Real guards/pipes/SQLite/refund/replay/restart outcomes сохранены; scheduler tests явно упражняют real owner отдельно. ## Verification Existing bank/local-read suites через runner-owned env; filtered case execution сохраняет DB guard. Read benchmark только при changed setup proof, не full performance campaign. Backend final gates. ## Dependencies Нет; T01 отдельно отвечает за executable real scheduler guarantee. ## Traceability Campaign https://git.personal.ksv741.ru/WealthLedger/main/issues/23 . Findings TI-001, TI-002, CA-H19. WealthLedger/backend; T13.
codex-bot added this to the Technical Audit Remediation — 2026-10-11 milestone 2026-10-11 21:45:18 +03:00
codex-bot added the Kind/Testing
Priority
Medium
3
audit/2026-10-11
labels 2026-10-11 21:45:18 +03:00
codex-bot was assigned by hermes-agent 2026-10-12 00:04:22 +03:00
hermes-agent added this to the WealthLedger — Delivery Board project 2026-10-12 00:04:22 +03:00
Author
Owner

Выполнено: PR #100 смержен в develop (commit 9e4f9d9). 10 HTTP suites переопределяют TbankHourlyScheduler заглушкой, minute-таймер в них больше не запускает hourly walk. bank-cards: три кейса, зависевшие от порядка (renames default category, enforces actual FK, preserves history), теперь сами создают свои prerequisites. Проверено: каждый из 23 кейсов изолированно на свежей disposable SQLite, полный bank-cards 23/23, verify и 20/20 SQLite suites. Частоту флейков не измеряли.

Выполнено: PR #100 смержен в develop (commit 9e4f9d9). 10 HTTP suites переопределяют TbankHourlyScheduler заглушкой, minute-таймер в них больше не запускает hourly walk. bank-cards: три кейса, зависевшие от порядка (renames default category, enforces actual FK, preserves history), теперь сами создают свои prerequisites. Проверено: каждый из 23 кейсов изолированно на свежей disposable SQLite, полный bank-cards 23/23, verify и 20/20 SQLite suites. Частоту флейков не измеряли.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/backend#65