Repository navigation
Description
Problem (one or two sentences)
No Turbo tasks exist for the individual coverage slices, so they cannot be independently cached or scheduled, and there is no way to produce the single coverage/lcov.info that CI expects from partial runs.
Context (who is affected and when)
CI uploads src/coverage/lcov.info to Codecov (.github/workflows/code-qa.yml:74). This path must remain stable after slicing. The lcov -a flag merges multiple tracefile inputs into a single output — the standard approach for combining V8+lcov slice outputs. This is part of the coverage-slicing work tracked in #47 and depends on #115 and #116.
Desired behavior (conceptual, not technical)
Five Turbo tasks (test:coverage:api, test:coverage:core, test:coverage:services, test:coverage:misc, test:coverage:dist) exist in src/turbo.json, each with isolated outputs. A test:coverage:merge task depends on all five and produces the merged coverage/lcov.info.
Constraints / preferences (optional)
- Each slice task should only declare
dependsOn: ["bundle"]at the package level; root-level@roo-code/types#buildis inherited. - The merge script must produce output at exactly
coverage/lcov.infoto match the existing CI upload path. - Verify
lcovis available in the CI environment before merging; considerlcov-result-merger(npm) as a fallback.
Request checklist
- I've searched existing Issues and Discussions for duplicates
- This describes a specific problem with clear context and impact
Acceptance criteria (optional)
pnpm turbo run test:coverage:merge --filter=zoo-codeproducescoverage/lcov.infowhose total line coverage matches the current full-run output within a reasonable margin.- A commit touching only
src/api/shows Turbo cache hits fortest:coverage:core,test:coverage:services,test:coverage:misc, andtest:coverage:dist.
Proposed approach (optional)
- Add five
test:coverage:{area}tasks tosrc/turbo.json, each withdependsOn: ["bundle"]andoutputs: ["coverage/{area}/**"]. - Add a
test:coverage:mergetask (or script) running:lcov -a coverage/api/lcov.info -a coverage/core/lcov.info -a coverage/services/lcov.info -a coverage/misc/lcov.info -a coverage/dist/lcov.info -o coverage/lcov.info test:coverage:mergedepends on all five slice tasks andoutputs: ["coverage/lcov.info"].
Trade-offs / risks (optional)
If lcov is not installed in the CI environment, the merge step will fail. Verify availability or use an npm alternative.
Activity