CI asks Claude Code to generate tests for a transit fare module that already has a suite. What context should be supplied?
Select an answer to reveal the explanation.
Short Explanation
If you don't show Claude the tests you already wrote, you'll get twin covers of the same song. Hand over the existing suite so new cases fill gaps instead of cloning coverage.
Full Explanation
When CI asks Claude Code to generate tests for a transit fare module that already has a suite, the highest-value context is the existing test files themselves. Providing those files lets the model see covered scenarios, fixture style, assertion patterns, and naming, then target gaps instead of cloning happy-path cases the city already owns. Shared suite context reduces redundant municipal test debt and keeps CI-generated additions complementary.
Hiding all existing tests so Claude invents every scenario from scratch fails because the model will rediscover the same edge cases already asserted, bloating runtime and review load. Providing only production logs and never current test files fails conceptually: logs show incidents, not intentional coverage design, and invite brittle tests tied to transient log shapes rather than fare rules. Deleting the suite first so CI always recreates identical cases fails operationally—it destroys known-good coverage, wastes CI time, and risks regressions while the suite is rewritten from scratch.
Exam caveat: supplying existing tests prevents naive duplication; it does not prove the old suite is complete or that new cases are policy-correct—reviewers still validate fare-rule fidelity. Operational check: mount the current test directory into the Claude CI context, ask for gap-filling cases only, and diff the proposal against existing test names to confirm low overlap before merging.