[Test] Ждать client settlement проигравшего в late-response cases #61

Closed
opened 2026-10-11 21:50:28 +03:00 by codex-bot · 0 comments
Owner

Problem

StocksPage после release old response ждёт уже видимый new result; resource races ждут затвор, не body/client/query application. Exact false-green mutant runtime-unverified. Unused Bond failBond option поддерживает несуществующий scenario.

Expected Behavior

Final assertions происходят после завершения old operation и React/query flush, а не после handler release.

Evidence

Audit date 2026-10-11; 08, 09. IDs TQ-002, TI-006, TA-F08. Revision c8821200ce699dab1ce65360d1968d5877a2e78b; Confidence Medium barrier risk/High unused flag; Verification status static/runtime-unverified mutant.
Affected: StocksPage.test.tsx:175–236; resource-query.test.tsx:139–209; client.test.ts:92–123 good awaited rejection; BondPage.test.tsx:88–107.

Scope

In scope

Existing test awaited operation/probe, started before newer intent, failure-path gate cleanup; local unused failBond deletion.

Out of scope

Global request registry, race DSL, production epochs, new test ради отсутствия option, removal access/session fences.

Proposed Approach

Capture actual calling Promise/observable terminal boundary, release в finally и await settlement. MSW handler-return marker сам по себе недостаточен. Observe-only test при T20 pruning заменить live refetch/cancel boundary или удалить retired scenario.

Acceptance Criteria

  • Old handler started до new search/access loss; final data/error/loading проверены после old client operation settled.
  • Final assertion невозможно удовлетворить до loser completion, включая error/finally arms.
  • Pending gates освобождаются при раннем assertion failure; kept source guards прежние.
  • failBond/exclusive branch удалены после consumer check, active coupons/rating/ambiguity cases сохранены.

Verification

Targeted existing StocksPage/resource-query/client/BondPage suites; no arbitrary sleeps и no new harness. Frontend final gate для changed test boundary.

Dependencies

Нет; coordinated T20 pruning может устранить obsolete observe arm, не обязательно ждёт полного polling migration.

Traceability

Campaign WealthLedger/main#23 . Findings TQ-002, TI-006, TA-F08. WealthLedger/frontend; T25.

<!-- wealthledger-audit:2026-10-11:frontend-race-barriers --> ## Problem StocksPage после release old response ждёт уже видимый new result; resource races ждут затвор, не body/client/query application. Exact false-green mutant runtime-unverified. Unused Bond failBond option поддерживает несуществующий scenario. ## Expected Behavior Final assertions происходят после завершения old operation и React/query flush, а не после handler release. ## Evidence Audit date `2026-10-11`; [08](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/08-test-quality-and-effectiveness-report.md), [09](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/09-test-architecture-and-infrastructure-report.md). IDs TQ-002, TI-006, TA-F08. Revision `c8821200ce699dab1ce65360d1968d5877a2e78b`; Confidence Medium barrier risk/High unused flag; Verification status static/runtime-unverified mutant. Affected: [StocksPage.test.tsx:175–236](https://git.personal.ksv741.ru/WealthLedger/frontend/src/commit/c8821200ce699dab1ce65360d1968d5877a2e78b/src/pages/stocks/ui/StocksPage/StocksPage.test.tsx#L175-L236); resource-query.test.tsx:139–209; client.test.ts:92–123 good awaited rejection; BondPage.test.tsx:88–107. ## Scope ### In scope Existing test awaited operation/probe, started before newer intent, failure-path gate cleanup; local unused failBond deletion. ### Out of scope Global request registry, race DSL, production epochs, new test ради отсутствия option, removal access/session fences. ## Proposed Approach Capture actual calling Promise/observable terminal boundary, release в finally и await settlement. MSW handler-return marker сам по себе недостаточен. Observe-only test при T20 pruning заменить live refetch/cancel boundary или удалить retired scenario. ## Acceptance Criteria - [ ] Old handler started до new search/access loss; final data/error/loading проверены после old client operation settled. - [ ] Final assertion невозможно удовлетворить до loser completion, включая error/finally arms. - [ ] Pending gates освобождаются при раннем assertion failure; kept source guards прежние. - [ ] failBond/exclusive branch удалены после consumer check, active coupons/rating/ambiguity cases сохранены. ## Verification Targeted existing StocksPage/resource-query/client/BondPage suites; no arbitrary sleeps и no new harness. Frontend final gate для changed test boundary. ## Dependencies Нет; coordinated T20 pruning может устранить obsolete observe arm, не обязательно ждёт полного polling migration. ## Traceability Campaign https://git.personal.ksv741.ru/WealthLedger/main/issues/23 . Findings TQ-002, TI-006, TA-F08. WealthLedger/frontend; T25.
codex-bot added this to the Technical Audit Remediation — 2026-10-11 milestone 2026-10-11 21:50:28 +03:00
codex-bot added the Kind/Testing
Priority
Medium
3
audit/2026-10-11
labels 2026-10-11 21:50:28 +03:00
codex-bot was assigned by hermes-agent 2026-10-12 00:04:17 +03:00
hermes-agent added this to the WealthLedger — Delivery Board project 2026-10-12 00:04:17 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/frontend#61