Problem
PR #5234 moves the EC2 implementation into the shared runner-provider package. Two EC2 test files still contain a mixture of generic control-plane orchestration tests and EC2-specific provider tests:
lambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-up.test.ts
lambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-down.test.ts
To preserve the existing coverage without making that refactor harder to review, these files temporarily import control-plane modules through ../../../../../../functions/control-plane.
The tests cannot be moved as complete files: individual orchestration cases need to move to the control-plane package while EC2 implementation cases remain beside the provider.
Scope
- Identify tests that exercise generic control-plane scale-up and scale-down orchestration.
- Move those cases to
lambdas/functions/control-plane and test them through provider interfaces or the existing provider contracts.
- Keep EC2-specific behavior, including EC2 resource operations and dynamic configuration, under
lambdas/libs/runner-providers/aws/ec2.
- Remove direct imports and mocks from the EC2 provider tests into
functions/control-plane.
- Preserve the existing behavioral coverage while separating ownership clearly.
Acceptance criteria
- No test under
lambdas/libs/runner-providers imports from lambdas/functions/control-plane.
- Generic orchestration tests are owned by the control-plane package.
- EC2 implementation tests remain owned by the EC2 provider package.
- Runner-provider and control-plane test suites pass.
- Coverage scopes and thresholds remain valid after the tests are separated.
- Production behavior is unchanged.
Related work
Problem
PR #5234 moves the EC2 implementation into the shared runner-provider package. Two EC2 test files still contain a mixture of generic control-plane orchestration tests and EC2-specific provider tests:
lambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-up.test.tslambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-down.test.tsTo preserve the existing coverage without making that refactor harder to review, these files temporarily import control-plane modules through
../../../../../../functions/control-plane.The tests cannot be moved as complete files: individual orchestration cases need to move to the control-plane package while EC2 implementation cases remain beside the provider.
Scope
lambdas/functions/control-planeand test them through provider interfaces or the existing provider contracts.lambdas/libs/runner-providers/aws/ec2.functions/control-plane.Acceptance criteria
lambdas/libs/runner-providersimports fromlambdas/functions/control-plane.Related work