Skip to content

Add generating-coverage-reports docs page and .svx → .md export pipeline#5

Merged
tbjers merged 1 commit into
mainfrom
feat/consumer-generated-reports
Jul 2, 2026
Merged

Add generating-coverage-reports docs page and .svx → .md export pipeline#5
tbjers merged 1 commit into
mainfrom
feat/consumer-generated-reports

Conversation

@tbjers

@tbjers tbjers commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Implements Plan B of the consumer-generated-reports migration plan (docs/plans/consumer-generated-reports-migration-plan-v3.md).

New docs page

src/lib/docs-content/12-generating-coverage-reports.svx — "Generating coverage reports" in the usage group (existing taxonomy; no new guides group needed):

  • 17-language coverage table with commands and default paths
  • Format auto-detection incl. Go's native coverage profile (four formats)
  • Automatic report discovery: the default paths are real probe targets, with the fixed 11-entry probe order documented
  • Fail-vs-skip rule: a configured max-complexity/max-duplication threshold makes the report mandatory
  • kcov/covertool need explicit coverage-path (dynamic output paths)
  • Cobertura quirks table

Later .svx files renumbered (12–15 → 13–16) to slot the page after "Ingest from CI".

Docs export pipeline (Phase 2a)

This repo is now the origin of truth for shared docs:

  • scripts/export-docs.ts renders configured .svx files into GitHub markdown: docs/generating-coverage-reports.md and docs/INSTALLATION.md (composed from the quick-start/installation/usage sections) in the coverage-tracker repo
  • Titled callouts are rewritten to GitHub-renderable alerts; <!-- site-only --> blocks are stripped; single-source targets get headings promoted one level
  • .github/workflows/export-docs.yml opens/updates a PR on the fixed docs-sync branch on pushes to main touching .svx sources; skips cleanly on no diff
  • README documents the pipeline and the COVERAGE_TRACKER_SYNC_TOKEN fine-grained PAT setup

⚠️ Manual step after merge: generate the PAT and save it as the COVERAGE_TRACKER_SYNC_TOKEN Actions secret (steps in README), or the workflow fails at checkout.

Installation content enrichment

Downstream-only detail was verified against the coverage-tracker code and ported into the .svx sources so the generated INSTALLATION.md loses nothing actionable: webhook-secret generation command, CF_Authorization session-cookie explanation, webhook-500 troubleshooting (dedup clear + redeliver), resync curl example. Also fixes wrangler.jsoncwrangler.json (the repo ships .json).

Cross-linking (Phase 3)

Absolute URLs in both directions so links work on the site and on GitHub: verify/ingest sections → coveragetracker.dev/docs#generating-coverage-reports; the new page → the GitHub INSTALLATION.md.

Supporting changes

  • remark-tables.js tags GFM pipe tables with the existing .deftable styling
  • Exporter unit tests (scripts/export-docs.test.ts) + remark-tables tests; vitest include widened to scripts/
  • CLAUDE.md updated (test/export commands, dual-render authoring rules)

Verification

  • 35 vitest tests pass; svelte-check clean; production build prerenders the new section with styled tables and sidebar entry
  • Exporter run locally: output idempotent (unchanged on re-run); generated INSTALLATION.md reviewed against the current downstream guide

🤖 Generated with Claude Code

Implements Plan B of the consumer-generated-reports migration:

- New docs section "Generating coverage reports" (usage group): per-language
  report commands, format auto-detection incl. Go's native profile, probe
  order for default paths, fail-vs-skip threshold rule, Cobertura quirks
- scripts/export-docs.ts renders configured .svx files into GitHub markdown
  for the coverage-tracker repo: docs/generating-coverage-reports.md and
  docs/INSTALLATION.md (composed from the quick-start/installation/usage
  sections) — this repo is now the origin of truth for both
- .github/workflows/export-docs.yml opens/updates a docs-sync PR against
  CoverageTracker/coverage-tracker on pushes to main touching .svx sources
- Installation .svx sections enriched with downstream-only detail (webhook
  secret generation, CF_Authorization explanation, webhook-500
  troubleshooting, resync example) and corrected wrangler.jsonc → .json
- remark-tables plugin styles GFM pipe tables with the existing .deftable
  look; cross-links added between the installation guide and the new page
- README documents the pipeline and COVERAGE_TRACKER_SYNC_TOKEN PAT setup

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying coveragetracker-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: edf3290
Status: ✅  Deploy successful!
Preview URL: https://6b3f2919.coveragetracker-dev.pages.dev
Branch Preview URL: https://feat-consumer-generated-repo.coveragetracker-dev.pages.dev

View logs

@tbjers tbjers merged commit aa89f50 into main Jul 2, 2026
2 checks passed
@tbjers tbjers deleted the feat/consumer-generated-reports branch July 2, 2026 17:47
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.

1 participant