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#build is inherited.
- The merge script must produce output at exactly
coverage/lcov.info to match the existing CI upload path.
- Verify
lcov is available in the CI environment before merging; consider lcov-result-merger (npm) as a fallback.
Request checklist
Acceptance criteria (optional)
pnpm turbo run test:coverage:merge --filter=zoo-code produces coverage/lcov.info whose total line coverage matches the current full-run output within a reasonable margin.
- A commit touching only
src/api/ shows Turbo cache hits for test:coverage:core, test:coverage:services, test:coverage:misc, and test:coverage:dist.
Proposed approach (optional)
- Add five
test:coverage:{area} tasks to src/turbo.json, each with dependsOn: ["bundle"] and outputs: ["coverage/{area}/**"].
- Add a
test:coverage:merge task (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:merge depends on all five slice tasks and outputs: ["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.
Parent issue: #47
Depends on: #115, #116
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.infothat CI expects from partial runs.Context (who is affected and when)
CI uploads
src/coverage/lcov.infoto Codecov (.github/workflows/code-qa.yml:74). This path must remain stable after slicing. Thelcov -aflag 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 insrc/turbo.json, each with isolated outputs. Atest:coverage:mergetask depends on all five and produces the mergedcoverage/lcov.info.Constraints / preferences (optional)
dependsOn: ["bundle"]at the package level; root-level@roo-code/types#buildis inherited.coverage/lcov.infoto match the existing CI upload path.lcovis available in the CI environment before merging; considerlcov-result-merger(npm) as a fallback.Request checklist
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.src/api/shows Turbo cache hits fortest:coverage:core,test:coverage:services,test:coverage:misc, andtest:coverage:dist.Proposed approach (optional)
test:coverage:{area}tasks tosrc/turbo.json, each withdependsOn: ["bundle"]andoutputs: ["coverage/{area}/**"].test:coverage:mergetask (or script) running:test:coverage:mergedepends on all five slice tasks andoutputs: ["coverage/lcov.info"].Trade-offs / risks (optional)
If
lcovis not installed in the CI environment, the merge step will fail. Verify availability or use an npm alternative.Parent issue: #47
Depends on: #115, #116