-
-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathcodecov.yml
More file actions
92 lines (88 loc) · 4.97 KB
/
Copy pathcodecov.yml
File metadata and controls
92 lines (88 loc) · 4.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Codecov configuration.
#
# The real coverage gate is `patch`: changed lines and branches in a PR must be
# >=99% covered. Patch coverage depends only on the PR's own diff, so merging
# one PR can never push another below the bar -- this is what kills the cross-PR
# churn the old global vitest threshold caused.
#
# `project` (whole-repo total) is informational only: it is reported as a trend
# but never blocks a merge. vitest keeps a loose 90% local backstop separately.
codecov:
# Don't post a verdict until the CI run that produced the report has finished.
require_ci_to_pass: true
notify:
# The count that ALWAYS lands whenever validate-tests runs: since the 2026-07-24 unsharding, the
# backend suite produces ONE whole-suite lcov upload (flags: backend) instead of the former 3 shard
# uploads this threshold was sized for. It must stay 1, not 2, even though review-enrichment /
# control-plane add their own flag uploads on PRs that touch them -- those uploads only exist on such
# PRs, and a floor above the guaranteed minimum would leave codecov/patch permanently un-posted on
# every other PR. The narrow premature-window this reintroduces (a rees/control-plane upload landing
# and posting before the ~25-minute backend run finishes) self-corrects on the backend upload, and
# require_ci_to_pass above still holds the final verdict to the run's own conclusion.
after_n_builds: 1
coverage:
status:
patch:
default:
target: 99%
threshold: 0%
# Keep the patch status in error if the upstream CI run failed.
if_ci_failed: error
# Suppress codecov/patch on main pushes; uploads still maintain history.
only_pulls: true
project:
default:
informational: true
# review-enrichment ships its coverage under its own flag (produced + uploaded by validate-code, ci.yml).
# Scoping the flag to review-enrichment/ keeps its project trend honest, and carryforward keeps that trend
# stable on PRs that don't re-run REES (its coverage is unchanged then, so nothing re-uploads under this flag).
# Patch gating (codecov/patch above) is unaffected by carryforward -- patch is computed on the PR's own diff,
# so a review-enrichment/** change is gated against this flag's fresh upload for that PR.
flags:
rees:
paths:
- review-enrichment/
carryforward: true
control-plane:
paths:
- control-plane/
carryforward: true
comment:
layout: "condensed_header, diff, flags, files"
require_changes: false
# Coverage is collected by vitest (v8) over src/**, packages/loopover-engine/src/**,
# packages/loopover-miner/{lib,bin}/**, packages/loopover-mcp/{lib,bin}/**, and
# packages/discovery-index/src/** (plus review-enrichment/src/** via the standalone `rees` flag, c8 over
# its built dist remapped through source maps); mirror vitest's exclusions here so the Codecov total
# matches the local report.
ignore:
- "src/env.d.ts"
- "apps/**"
- "test/**"
- "scripts/**"
# Self-host process entry + build-time stubs: exercised by the Docker build+boot smoke test
# (.github/workflows/selfhost.yml), not unit-coverable without booting a server/subprocess.
- "src/server.ts"
- "src/selfhost/cf-workers-shim.ts"
- "src/selfhost/stubs/**"
# Postgres runtime adapters: validated by the real-Postgres integration test (test/integration/selfhost-pg.ts,
# gated on PG_TEST_URL) + the real-PG boot. The dialect translation itself IS unit-tested (pg-dialect.ts).
- "src/selfhost/pg-adapter.ts"
- "src/selfhost/pg-queue.ts"
# discovery-index's process entrypoint (#7164) -- same "Docker build+boot, not unit-coverable" reasoning
# as src/server.ts above; app.ts (everything it wires together) is what tests actually import.
- "packages/discovery-index/src/server.ts"
# discovery-index's Cloudflare Container/Durable Object entry point (#7167) -- pure infra glue exercised
# only by real Cloudflare Containers infrastructure, same reasoning as server.ts above.
- "packages/discovery-index/src/worker.ts"
- "packages/discovery-index/src/env.d.ts"
- "packages/discovery-index/worker-configuration.d.ts"
# NOTE: packages/loopover-miner/bin/loopover-miner.ts and (once #7291 migrates it)
# packages/loopover-mcp/bin/loopover-mcp.ts are plain CLI dispatchers (no exports, terminate via
# process.exit()) exercised only via real subprocess spawn (test/unit/support/{miner,mcp}-cli-harness.ts),
# which v8 coverage can't instrument -- the same shape as src/server.ts above. They are deliberately NOT
# listed here: test/unit/codecov-policy.test.ts (#4864) requires packages/loopover-miner to never get a
# blanket ignore-list exemption, precisely so a change to the dispatcher forces either real coverage or a
# testable-export refactor (the path bin/loopover-miner-mcp.ts's createMinerMcpServer already took)
# instead of a silent pass. Both files are still in vitest.config.ts's coverage.include (so a PR that
# touches one now genuinely needs to satisfy codecov/patch on it, not skip grading entirely).