## Summary Wave 2 of package code organization (follows merged #2139): peel pure/satellite clusters out of `packages/engine/src/merger.ts` while keeping `merger.js` import paths stable for tests and production. - **`merger-glob.ts`** — `ConflictType`, `LOCKFILE_PATTERNS`, `GENERATED_PATTERNS`, `matchGlob` - **`merger-workspace-test-commands.ts`** — pnpm workspace package mapping + `inferDefaultTestCommand` / scoped + file-scoped test command derivation - **`merger-file-scope.ts`** — `parseDiffStat`, `extractFileScope` / `matchesScope`, squash file-scope invariant (`FileScopeViolationError`, assert/enforce with main’s `status` audit semantics and merge-trait modes) - Re-exports from `merger.ts`; baseline ratchet for `merger.ts` (~12.5k → ~11.8k) ## Test plan - [x] `pnpm --filter @fusion/engine exec tsc --noEmit` - [x] eslint on merger + satellites - [x] `merger-file-scope-invariant.test.ts` (18 tests) - [x] focused conflict-resolution pattern tests - [ ] CI merge gate ## Plan Continues `docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md` (U6 merger satellites). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added file-scope validation for merge operations, with strict and warning-only enforcement options. * Added automatic classification of lockfile and generated-file conflicts. * Added workspace-aware test selection based on changed packages and files. * Added support for inferring test commands across pnpm, Yarn, Bun, and npm projects. * **Refactor** * Organized merge, conflict-resolution, file-scope, and test-inference functionality into dedicated modules without changing existing public access paths. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
6.2 KiB
6.2 KiB