Skip to content

[ENHANCEMENT] Add per-area Turbo coverage tasks and a coverage merge task #117

Description

@edelauna

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

  • 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-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)

  1. Add five test:coverage:{area} tasks to src/turbo.json, each with dependsOn: ["bundle"] and outputs: ["coverage/{area}/**"].
  2. 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
    
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions