Skip to content

fix(ci): AUT-2282 exact coverage gate precision - #3373

Merged
kajalj22 merged 3 commits into
NVIDIA-NeMo:mainfrom
kajalj22:fix/coverage-gate-precision-only
Sep 14, 2026
Merged

kajalj22 merged 3 commits into
NVIDIA-NeMo:mainfrom
kajalj22:fix/coverage-gate-precision-only

Conversation

@kajalj22

@kajalj22 kajalj22 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Background

The full test suite failed on main with exact coverage 94.46%. Root cause (per triage on PR #3330's merge): the coverage gate compares at zero-decimal precision, so an actual 94.97% rounded to 95% and incorrectly passed the 95% gate before merge.

This PR addresses only that rounding gap. It intentionally excludes the stale-PR-head / merge-current-main fix tracked separately in #3338, and does not add tests to close the pre-existing coverage gap (a separate concern).

What changed

  • pyproject.toml: set [tool.coverage.report] precision = 2 so fail_under compares the exact percentage — 94.97 < 95 now exits nonzero.
  • tests/unit_tests/test_ci_environment.py: assert precision == 2 and fail_under == 95.0 in the coverage config.

Note

With this change alone, the repo's aggregate coverage is still below 95%, so the coverage-gated CI job on this PR is expected to fail until coverage is separately brought up. This PR only fixes the gate's precision, not the underlying coverage shortfall.

Test plan

  • pytest tests/unit_tests/test_ci_environment.py passes locally
  • pre-commit run --files pyproject.toml tests/unit_tests/test_ci_environment.py passes
  • DCO sign-off on the commit

…ct percentages

PR NVIDIA-NeMo#3330 merged despite failing the 95% coverage gate because the
report's default zero-decimal precision rounded 94.97% up to 95%,
letting a failing run report as passing. Setting
[tool.coverage.report] precision = 2 makes fail_under compare the
exact percentage instead.

Also adds unit coverage for previously-uncovered code paths
(decorators.experimental, judge.py error passthrough/failsafe guard,
_verifier_runner path/type validation, sandbox/utils cpu_cap_env and
rewrite_image) so this change clears the tightened gate on its own.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22
kajalj22 requested a review from a team as a code owner September 14, 2026 18:13
@copy-pr-bot

copy-pr-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Keep this PR scoped to the precision=2 config fix and its verifying
test. Filling the pre-existing coverage gap is a separate concern.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test ba14156

@yaoyu-33 yaoyu-33 added area:ci CI workflows, test routing, and repository automation ci CI, automation, test queue, or workflow infrastructure work ready-to-merge PR is approved, current, and waiting for final CI or merge labels Sep 14, 2026
@kajalj22
kajalj22 merged commit 9afeef3 into NVIDIA-NeMo:main Sep 14, 2026
4 checks passed
pull Bot pushed a commit to Stars1233/Gym that referenced this pull request Sep 15, 2026
…re coverage (NVIDIA-NeMo#3398)

## Background

The scheduled Full test suite on main began failing its coverage gate:
`Total coverage: 94.83%` < `fail_under = 95.0` (run 34890370042 on
84fbd3d, every run since 2026-09-14). The gate's precision fix (NVIDIA-NeMo#3373)
exposed that coverage had silently dropped below 95%.

## What changed

The full-test-suite job installs deps with `uv sync --extra dev --extra
sandbox --extra openshell`, omitting the `telemetry` extra. The tests
under `tests/unit_tests/telemetry/` are gated on nemo-lens
(`requires_lens`), which only the telemetry extra installs, so they all
skipped and the telemetry modules (`setup.py`, `endpoints.py`,
`metrics.py`, `contrib.py`, `_fallbacks.py`) counted as uncovered,
dragging the total below the gate. This adds `--extra telemetry` to that
install so the tests run and coverage includes telemetry, mirroring
`scripts/ci/core_unit_tests.sh` (which syncs the same extra). PR CI was
unaffected because `unit-tests.yml` runs `core_unit_tests.sh`.

## Details

```mermaid
flowchart LR
  A[full-test-suite.yml] -->|uv sync dev/sandbox/openshell| B[nemo-lens MISSING]
  B --> C[telemetry tests SKIP]
  C --> D[telemetry modules uncovered]
  D --> E[coverage 94.83% < 95%]
  F[core_unit_tests.sh] -->|uv sync dev/telemetry| G[nemo-lens present]
```

Left = the broken scheduled path fixed here; right = the PR path that
already worked. A regression test
`test_full_test_suite_installs_telemetry_extra_for_coverage_gate` fails
if the extra is dropped again.

## Tested

- 2 files, +22/-1: the workflow install line (+comment) and the new
guard test.
- Root cause confirmed from the failing run log (telemetry tests
`SKIPPED`, coverage 94.83%) and by diffing `full-test-suite.yml` against
`core_unit_tests.sh`/`unit-tests.yml`.
- The managed `nemo-gym` unit suite runs against this head once its CI
image build completes; PR CI validates the full gate.

---------

Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI workflows, test routing, and repository automation ci CI, automation, test queue, or workflow infrastructure work ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants