-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor strand tests off the private-member mega-harness #668
Copy link
Copy link
Open
Labels
area:testingPrimary work area: testing.Primary work area: testing.priority:laterDeferred or speculative work.Deferred or speculative work.status:availableOpen and available for prioritization; not blocked or actively in progress.Open and available for prioritization; not blocked or actively in progress.type:debtDebt, rot, or structural risk.Debt, rot, or structural risk.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
area:testingPrimary work area: testing.Primary work area: testing.priority:laterDeferred or speculative work.Deferred or speculative work.status:availableOpen and available for prioritization; not blocked or actively in progress.Open and available for prioritization; not blocked or actively in progress.type:debtDebt, rot, or structural risk.Debt, rot, or structural risk.
Problem
The strand service test cluster has become a private-member mega-harness. It keeps coverage high, but it is testing too much through implementation details and casts instead of stable runtime contracts.
Evidence
Local scan on
docs/cleanup:Representative findings:
test/unit/domain/services/strand/StrandService.test.tsis 2,870 lines.test/unit/domain/services/strand/ConflictAnalyzerService.test.tsis 2,019 lines.service._descriptorStore,service._patchService,service._intentService, andservice._materializerin many assertions.Reflect.apply(...)to bypass public call shapes in several negative tests.as any/as unknown ascasts to inject impossible shapes and spy on private implementation details.This is test code, so it is not a runtime correctness defect by itself. The debt is that the tests now make refactors harder and reward implementation coupling.
Acceptance criteria
as anycorridors.StrandService.test.tsinto behavior-focused files under the 800 LOC test-file ceiling where practical.Non-goals