Split first-party screenshot requirement scan out of the migration collector
Merged
HA
3mo ago+307+307+012345678901234567890123456789-275-275-012345678901234567890123456789
Refs: R3-10 in the Unity CLI Loop Phase 3 refactor ToDo
Summary
ThirdPartyToolMigrationFastAssemblyRequirementCollector.cs(622 lines) mixed two independent, field-free scanning concerns: general assembly-reference requirement collection and first-party screenshot API requirement collection. Neither section referenced the other (zero shared state, zero cross-calls), so this was genuine responsibility mixing rather than a single cohesive algorithm — confirmed by grep before implementing.- Moved
CollectFastFirstPartyScreenshotRequirementsAsyncand its private helpers (CollectFastFirstPartyScreenshotRequirementsForSource,ScanFastFirstPartyScreenshotRequirement, three legacy-detection predicates, and theFirstPartyScreenshotRequirementScanDTO struct) into a newThirdPartyToolMigrationFastFirstPartyScreenshotRequirementCollector. - The sole external caller,
ThirdPartyToolMigrationTargetScanner, usedusing staticfor both entry points, so it now imports the new class alongside the original (documented adaptation in the normalized diff). - No visibility changes beyond what already existed: the externally-called entry point stays
internal, everything else staysprivate.
Background: is the migration path still needed?
Confirmed active — recent commits during this same refactor series (8cd2402e, 071fd76c, 2f77d180) continue investing in the migration subsystem, and it has ~10k lines of dedicated tests (ThirdPartyToolMigrationFileServiceTests.cs + ThirdPartyToolMigrationRulesTests.cs). Not a winding-down feature, so this pure-move investment is warranted (per the ToDo's own decision tree).
Verification
- Normalized two-way diff (
sort -u+comm -23/comm -13) across the collector + new file + caller shows an empty "removed" set and only 3 added lines (new class doc-comment, new class declaration, newusing staticimport in the caller) — a clean pure move. uloop compile— 0 errors / 0 warnings.ThirdPartyToolMigration*test suite — 364/364 pass (4 pre-existing skips), 0 failures.StaticFacadeStateGuardTests— 20/20 pass (new file registered in the async ct-parameter guard list; the moved async method already used the standardctparameter name, no rename needed).
Test plan
-
uloop compileclean -
ThirdPartyToolMigration*tests 364/364 pass -
StaticFacadeStateGuardTests20/20 pass - Normalized diff confirms pure move with no logic changes