This guide connects the AgentFlow repository to Codecov so the coverage
badge in README.md resolves and coverage reports flow in on every CI
run.
ci.ymlcalls pinnedcodecov/codecov-actionv7.0.0 withuse_oidc: trueduring thetest-unitjob.- OIDC uploads do not require a long-lived
CODECOV_TOKEN; the action exchanges the GitHub OIDC token for a short-lived Codecov credential. fail_ci_if_error: falsekeeps CI green even if Codecov is temporarily unreachable or the repository has not yet been enabled there.- Coverage still fails closed inside CI: the full suite enforces a 60%
line/branch floor,
diff-coverenforces 80% on changed code, and security-critical modules have separate 90% gates.
On 2026-07-30, CI run
30575838038
completed every test and local coverage gate successfully. Codecov OIDC token
exchange and upload queueing also succeeded, but Codecov returned
Repository not found while processing the report. This is an external
repository-activation gap, not a test or coverage failure. Complete the
one-time setup below before treating the Codecov dashboard or badge as current.
- Sign in to https://codecov.io with the GitHub account that owns the repository.
- Open the organization page and enable the repository.
- In the repository settings on Codecov, confirm tokenless uploads are allowed (Settings -> General -> "Allow tokenless uploads from GitHub Actions" or the equivalent OIDC toggle).
- Nothing to add in GitHub secrets — the OIDC upload path does not need
a
CODECOV_TOKEN.
Optional: if tokenless uploads are disabled by policy, create a project
upload token and store it as the CODECOV_TOKEN repository secret, then
drop use_oidc: true and add token: ${{ secrets.CODECOV_TOKEN }} to
the workflow step.
curl --data-binary @codecov.yml https://codecov.io/validateExpected response: Valid!.
- Push a commit to
mainor open a pull request. - After the repository is enabled in Codecov, confirm the
Upload coveragestep reports a successful external upload. - Open the Codecov dashboard and confirm a new report appears for the commit SHA.
- Reload
README.mdon GitHub — thecodecovbadge should resolve to the current coverage number (usually within a minute of the upload).
codecov.yml in the repository root enforces:
- Project coverage must not drop by more than 2 percentage points
(
project.default.threshold: 2%). - New code in a pull request must be at least 80% covered
(
patch.default.target: 80%). - Coverage for
tests/,scripts/,examples/,sdk-ts/, andnotebooks/is ignored because those directories are not part of the production surface.
These Codecov policies are additional reporting/status checks once the
external repository is enabled. The blocking repository-owned coverage floors
remain the pytest-cov, diff-cover, and module-specific commands in
.github/workflows/ci.yml.