Skip to content

Add code coverage reporting (c8 + Cobertura) and wire into CI - #216

Closed
BunsDev with code-coverage-agent[bot] wants to merge 4 commits into
release-reviewed-batchfrom
code-coverage-agent/fix-331025984-1386876170-22ba008f-b336-479e-b38c-2f2cf9b5870e
Closed

BunsDev with code-coverage-agent[bot] wants to merge 4 commits into
release-reviewed-batchfrom
code-coverage-agent/fix-331025984-1386876170-22ba008f-b336-479e-b38c-2f2cf9b5870e

Conversation

@code-coverage-agent

@code-coverage-agent code-coverage-agent AI commented Oct 15, 2026 •

Copy link
Copy Markdown

Integration target: release-reviewed-batch. This reviewed update will land through the combined batch and its protected squash to main; Images/Plugins #236 is excluded.

The repository had no code coverage setup for local development or CI, making it hard to see what the test suite actually exercises.

Coverage setup (project-level)

  • Added c8 (wraps Node's native V8 coverage) as a root devDependency — works with the existing node --test runner used across all four packages (packages/core, apps/desktop, apps/site, apps/store-desktop) without any toolchain changes.
  • Added .c8rc.json at the root: generates a native Cobertura XML report (coverage/cobertura-coverage.xml), with excludes for test files, tooling scripts, and config files.
  • Added a test:coverage script (c8 pnpm test) so developers get the same report locally/in their IDE that CI produces.
  • coverage/ and .nyc_output/ are now gitignored.

Coverage correctly remaps from compiled dist/*.js back to original .ts sources via the sourcemaps already emitted by tsc (sourceMap: true), and merges across all four packages into a single report since c8 runs as the outer process wrapping the whole pnpm test chain.

CI integration (.github/workflows/ci.yml)

  • The unit + e2e (macOS) job (the required, PR-gating check) now runs pnpm run test:coverage instead of pnpm test.
  • Adds an "Upload coverage artifact" step (skipped for fork PRs, which lack write-token access).
  • Adds a new upload-coverage-typescript job that downloads the artifact and uploads it via actions/upload-code-coverage@v1 (language: TypeScript), with code-quality: write and pull-requests: read scoped to just that job.
  • No new trigger was needed: the workflow's existing push/pull_request triggers (no branch filter) already produce a default-branch baseline for comparison.

Existing build/test commands, action versions, and job structure are otherwise unchanged.

Review follow-up #232 is integrated. The report now explicitly includes all 198 eligible production source files, including unexecuted files at zero, with no duplicate or generated-output entries. The validated local run reports 17,222 covered lines of 28,307 (60.84%). Full build and coverage tests and independent review passed; the follow-up also passed hosted macOS and iPhone acceptance. Fresh CI is running for the combined head af0c17502618821198527481b9e0e339d69b1e87.

Coven-Harness: Codex / GPT-6

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 15, 2026 11:44am UTC

Request Review

@code-coverage-agent code-coverage-agent AI changed the title [WIP] Copilot Request Add code coverage reporting (c8 + Cobertura) and wire into CI Oct 15, 2026
@code-coverage-agent
code-coverage-agent AI marked this pull request as ready for review October 15, 2026 06:21
Code Coverage Agent finished work on behalf of BunsDev October 15, 2026 07:31
@github-code-quality

github-code-quality Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main code-coverage-agent/... af0c175 +/-
— 61% —

Line coverage data for the main branch is not yet available.

View coverage of the 10 most covered files.
File main code-coverage-agent/... af0c175 +/-
apps/desktop/sr.../attachments.ts — 100% —
apps/desktop/sr...shared/types.ts — 100% —
apps/desktop/sr...ate-recovery.ts — 100% —
apps/desktop/sr...engine/store.ts — 100% —
apps/desktop/sr...uting/router.ts — 100% —
apps/desktop/sr...ngine/runner.ts — 99% —
apps/desktop/sr...nt-documents.ts — 99% —
apps/desktop/sr...ne/companion.ts — 97% —
apps/desktop/sr...kends/claude.ts — 96% —
apps/desktop/sr...ckends/codex.ts — 95% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 15, 2026 13:10 UTC

Inventory all eligible production sources before remapping coverage so unexecuted files appear at zero. Full build and coverage tests, independent review, both hosted macOS runs and hosted iPhone acceptance passed.

Coven-Harness: Codex / GPT-6
@BunsDev

BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Landed on main in #243 (squash 4408c9c), which merged the reviewed release batch (#242, notes-final-review 9322bb2) into main for v0.1.0. Closing as landed.

@BunsDev BunsDev closed this Oct 15, 2026
@BunsDev
BunsDev deleted the code-coverage-agent/fix-331025984-1386876170-22ba008f-b336-479e-b38c-2f2cf9b5870e branch October 18, 2026 03:43

This branch was successfully deployed

1 active deployment
Preview — af0c1750 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants