Repository navigation
fix(ci): sync coverage docs to 80% and fail closed on bad threshold - #1937
Conversation
.settings.yaml raised quality.coverage_threshold from 75 to 80 in 298e9a0, but the documented floor still said 75% and two code paths hardcoded a 70 fallback. Sync the documented floor in AGENTS.md, .claude/CLAUDE.md, docs/contributor/tests.md, and DEVELOPMENT.md. Make both threshold fallbacks fail closed rather than substituting a looser floor nobody chose. This closes a live fail-open bug in the CI gate: load-versions emits the literal string "null" when the key is missing (yq prints null and exits 0), and bc resolves null to 0, so "$COVERAGE < null" is false and the merge gate would pass with no floor enforced at all. Both guards now reject empty and null, with a numeric check as backstop since any non-numeric token degrades to 0 under bc. In the Makefile the guard becomes a check-coverage-threshold prerequisite ordered before test, so a misconfigured threshold fails in seconds instead of after the full race-enabled suite. Signed-off-by: Brian Lockwood <[email protected]>
📝 WalkthroughWalkthroughThe pull request makes coverage-threshold handling fail closed in the Makefile and Go coverage action, rejecting missing, null, or non-numeric values. It updates Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 239-245: Update the check-coverage-threshold target to validate
that COVERAGE_THRESHOLD is numeric, rejecting values such as 80x before the
coverage check proceeds. Preserve the existing empty and null validation errors,
and exit nonzero for any non-numeric threshold.
- Around line 247-248: Update the Makefile target test-coverage so
check-coverage-threshold remains the prerequisite and the test target is invoked
via $(MAKE) test in a recipe after that prerequisite completes. Remove test from
the prerequisite list to ensure parallel make cannot start it before the
coverage check finishes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 8cb441d9-8132-49a1-8dd2-487b76a8c82e
📒 Files selected for processing (6)
.claude/CLAUDE.md.github/actions/go-coverage/action.ymlAGENTS.mdDEVELOPMENT.mdMakefiledocs/contributor/tests.md
| check-coverage-threshold: | ||
| @if [ -z "$(COVERAGE_THRESHOLD)" ] || [ "$(COVERAGE_THRESHOLD)" = "null" ]; then \ | ||
| echo "ERROR: coverage threshold unavailable from .settings.yaml (quality.coverage_threshold)"; \ | ||
| echo " Check that yq is installed ('make tools-setup') and that"; \ | ||
| echo " .settings.yaml defines quality.coverage_threshold."; \ | ||
| exit 1; \ | ||
| fi |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Reject non-numeric coverage thresholds. COVERAGE_THRESHOLD=80x can bypass the empty/null guard and make the coverage check report success. Validate the value is numeric before using it.
🧰 Tools
🪛 checkmake (0.3.2)
[warning] 239-239: Target body for "check-coverage-threshold" exceeds allowed length of 5 lines (6).
(maxbodylength)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Makefile` around lines 239 - 245, Update the check-coverage-threshold target
to validate that COVERAGE_THRESHOLD is numeric, rejecting values such as 80x
before the coverage check proceeds. Preserve the existing empty and null
validation errors, and exit nonzero for any non-numeric threshold.
| .PHONY: test-coverage | ||
| test-coverage: test ## Runs tests and enforces coverage threshold (from .settings.yaml quality.coverage_threshold) | ||
| test-coverage: check-coverage-threshold test ## Runs tests and enforces coverage threshold (from .settings.yaml quality.coverage_threshold) |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
set -euo pipefail
printf '\n## Makefile slice\n'
nl -ba Makefile | sed -n '235,265p'
printf '\n## NOTPARALLEL search\n'
rg -n --hidden --glob '!**/.git/**' '(^|[[:space:]])\.NOTPARALLEL\b|NOTPARALLEL' .Repository: NVIDIA/aicr
Length of output: 208
🏁 Script executed:
set -euo pipefail
printf '\n## Makefile slice\n'
awk 'NR>=235 && NR<=265 { printf "%d:%s\n", NR, $0 }' Makefile
printf '\n## NOTPARALLEL search\n'
rg -n --hidden --glob '!**/.git/**' '(^|[[:space:]])\.NOTPARALLEL\b|NOTPARALLEL' .Repository: NVIDIA/aicr
Length of output: 1735
Make test run after the coverage check
make -j test-coverage can start test before check-coverage-threshold finishes; there’s no repo-wide .NOTPARALLEL guard. Move $(MAKE) test into the recipe after the threshold check.
🧰 Tools
🪛 checkmake (0.3.2)
[warning] 248-248: Target body for "test-coverage" exceeds allowed length of 5 lines (7).
(maxbodylength)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Makefile` around lines 247 - 248, Update the Makefile target test-coverage so
check-coverage-threshold remains the prerequisite and the test target is invoked
via $(MAKE) test in a recipe after that prerequisite completes. Remove test from
the prerequisite list to ensure parallel make cannot start it before the
coverage check finishes.
Coverage Report ✅
Coverage BadgeNo Go source files changed in this PR. |
…ge.full.out - Remove tools/validators_tests_included_test.sh: it syntax-errored (trailing backslash swallowed 'do'), aborting test-shell before any test ran, and even fixed it only re-asserted its own hardcoded filter rather than exercising the Makefile's actual coverage output. - Resolve the #<ISSUE> placeholder by dropping the sentence. - Add coverage.full.out to make clean. - Sync docs/contributor/tests.md, AGENTS.md, .claude/CLAUDE.md from 75% to the actual 80% threshold in .settings.yaml (tests.md had drifted internally inconsistent after NVIDIA#1937 partially fixed this). Addresses njhensley re-review on NVIDIA#1918. Signed-off-by: Mohit Yadav <[email protected]>
…alth checks Closes NVIDIA#1246. - kueue: resourceflavors/clusterqueues/localqueues.kueue.x-k8s.io (verified via in-tree manifests) - kubeflow-trainer: trainjobs.trainer.kubeflow.org (verified via tests/chainsaw/ai-conformance/kind-training-kubeflow/assert-crds.yaml) - network-operator: nicclusterpolicies.mellanox.com (verified via components/network-operator/manifests/nic-cluster-policy-aks.yaml) - k8s-nim-operator: nimservices/nimcaches/nimpipelines.apps.nvidia.com (verified via docs/conformance/cncf/v1.35/nim-eks/evidence/robust-operator.md) - gatekeeper: constrainttemplates.templates.gatekeeper.sh + configs.config.gatekeeper.sh (needs live-cluster confirmation against chart 3.22.2, flagged inline) - slinky-slurm-operator: negative finding documented - crds.enabled: false, CRDs owned entirely by sibling slinky-slurm-operator-crds chart Signed-off-by: Mohit Yadav <[email protected]> docs: restore slinky-slurm-operator health check, add comment-only negative finding Signed-off-by: Mohit Yadav <[email protected]> fix: address review comments on NVIDIA#1246 CRD backfill fix: sync kubeflow-trainer CRD docs with asserted trainingruntimes (coderabbitai) address review: soften gatekeeper verification wording, fix volatile line refs, rename CRD step for consistency chore: pausing scans chore: skills cleanup chore(deps): Update python Docker tag to v3.14 (NVIDIA#1906) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> revert(validators): pin aiperf-bench base back to python:3.13-slim (NVIDIA#1909) Signed-off-by: Nathan Hensley <[email protected]> fix(rekor-monitor): correlate identity via release-workflow run history (NVIDIA#1903) Signed-off-by: Brian Lockwood <[email protected]> Co-authored-by: Mark Chmarny <[email protected]> fix(validators): multi-stage aiperf-bench build; bump aiperf to 0.11.0 (NVIDIA#1912) Signed-off-by: Nathan Hensley <[email protected]> feat(skills): download UAT debug bundles for failure triage (NVIDIA#1913) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.20 to 46.1.21 (NVIDIA#1923) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> feat(skills): add aicr-triage skill for project board triage (NVIDIA#1911) chore(deps): regenerate stale THIRD_PARTY_NOTICES.md (NVIDIA#1926) Signed-off-by: Nathan Hensley <[email protected]> feat(server): non-interactive bundle attestation for /v1/bundle (NVIDIA#1891) chore(deps): Update dependency awscli to v1.45.52 (NVIDIA#1905) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> ci(stale): drop phantom priority/critical exempt label (NVIDIA#1925) Signed-off-by: Yuan Chen <[email protected]> chore(deps): Update dependency sigstore/cosign to v3.1.2 (NVIDIA#1924) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> feat(skills): add aicr-cross-review skill for multi-agent PR review (NVIDIA#1915) Signed-off-by: Yuan Chen <[email protected]> chore: deps: bump github.com/prometheus/client_golang from 1.24.0 to 1.24.1 (NVIDIA#1922) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix: resolve goconst and errorlint warnings across OCI, coverage, validators (NVIDIA#1916) Signed-off-by: Andrew White <[email protected]> chore(deps): Update testing-tools (NVIDIA#1934) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> fix(skills): harden UAT debug-bundle triage against malformed input (NVIDIA#1914) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump actions/stale from 10.4.0 to 11.0.0 (NVIDIA#1931) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> fix(ci): sync coverage docs to 80% and fail closed on bad threshold (NVIDIA#1937) docs: correct issue/PR lifecycle table, fix reminder dedupe (NVIDIA#1921) Signed-off-by: Yuan Chen <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> chore: deps: bump actions/checkout from 7.0.0 to 7.0.1 (NVIDIA#1930) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nathan Hensley <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix(recipe,client): reject duplicate ComponentRef names, omit disable… (NVIDIA#1917) Co-authored-by: Nathan Hensley <[email protected]> fix(validators): pass aiperf model via --model flag (NVIDIA#1939) Signed-off-by: Nathan Hensley <[email protected]> fix(skills): recover cross-review lanes, harden consensus/fallback (NVIDIA#1932) Signed-off-by: Yuan Chen <[email protected]> feat(rekor-monitor): resumable identity scan to catch up large backlogs (NVIDIA#1929) Signed-off-by: Brian Lockwood <[email protected]> fix(bundler): create argocd-helm static/ only when populated (NVIDIA#1944) Signed-off-by: Yuan Chen <[email protected]> chore: deps: update hashicorp/azurerm requirement from ~> 4.0 to ~> 5.0 in /infra/uat-azure-account (NVIDIA#1945) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix(ci): run validators/ unit tests in make test, exclude from coverage gate (NVIDIA#1918) Signed-off-by: Mohit Yadav <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> feat(corroborate): improve evidence dashboard UX (NVIDIA#1935) Signed-off-by: Nathan Hensley <[email protected]> fix(api): accept versionless legacy bundle recipes (NVIDIA#1943) Signed-off-by: Yuan Chen <[email protected]> test(bundler): cover argocd-helm OCP bundling and pin its error contract (NVIDIA#1950) Signed-off-by: Yuan Chen <[email protected]> chore: remove stray MOFED debug artifacts from repo root (NVIDIA#1955) Signed-off-by: Nathan Hensley <[email protected]> fix(deps): bump network-operator default to v26.4.1 (NVIDIA#1938) Signed-off-by: Atif Mahmood <[email protected]> Co-authored-by: Atif Mahmood <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.21 to 46.2.0 (NVIDIA#1964) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Update ministackorg/ministack Docker tag to v1.4.7 (NVIDIA#1965) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> feat(recipe): implement the ADR-015 profile core (NVIDIA#1933) Signed-off-by: Yuan Chen <[email protected]> fix(bom): extract nested operator images (NVIDIA#1960) Signed-off-by: Yuan Chen <[email protected]> address yuanchen8911 review: bump network-operator to 26.4.1 with nicnodepolicies exclusion, close gatekeeper TODO with verification
…alth checks Closes NVIDIA#1246. - kueue: resourceflavors/clusterqueues/localqueues.kueue.x-k8s.io (verified via in-tree manifests) - kubeflow-trainer: trainjobs.trainer.kubeflow.org (verified via tests/chainsaw/ai-conformance/kind-training-kubeflow/assert-crds.yaml) - network-operator: nicclusterpolicies.mellanox.com (verified via components/network-operator/manifests/nic-cluster-policy-aks.yaml) - k8s-nim-operator: nimservices/nimcaches/nimpipelines.apps.nvidia.com (verified via docs/conformance/cncf/v1.35/nim-eks/evidence/robust-operator.md) - gatekeeper: constrainttemplates.templates.gatekeeper.sh + configs.config.gatekeeper.sh (needs live-cluster confirmation against chart 3.22.2, flagged inline) - slinky-slurm-operator: negative finding documented - crds.enabled: false, CRDs owned entirely by sibling slinky-slurm-operator-crds chart Signed-off-by: Mohit Yadav <[email protected]> docs: restore slinky-slurm-operator health check, add comment-only negative finding Signed-off-by: Mohit Yadav <[email protected]> fix: address review comments on NVIDIA#1246 CRD backfill fix: sync kubeflow-trainer CRD docs with asserted trainingruntimes (coderabbitai) address review: soften gatekeeper verification wording, fix volatile line refs, rename CRD step for consistency chore: pausing scans chore: skills cleanup chore(deps): Update python Docker tag to v3.14 (NVIDIA#1906) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> revert(validators): pin aiperf-bench base back to python:3.13-slim (NVIDIA#1909) Signed-off-by: Nathan Hensley <[email protected]> fix(rekor-monitor): correlate identity via release-workflow run history (NVIDIA#1903) Signed-off-by: Brian Lockwood <[email protected]> Co-authored-by: Mark Chmarny <[email protected]> fix(validators): multi-stage aiperf-bench build; bump aiperf to 0.11.0 (NVIDIA#1912) Signed-off-by: Nathan Hensley <[email protected]> feat(skills): download UAT debug bundles for failure triage (NVIDIA#1913) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.20 to 46.1.21 (NVIDIA#1923) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> feat(skills): add aicr-triage skill for project board triage (NVIDIA#1911) chore(deps): regenerate stale THIRD_PARTY_NOTICES.md (NVIDIA#1926) Signed-off-by: Nathan Hensley <[email protected]> feat(server): non-interactive bundle attestation for /v1/bundle (NVIDIA#1891) chore(deps): Update dependency awscli to v1.45.52 (NVIDIA#1905) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> ci(stale): drop phantom priority/critical exempt label (NVIDIA#1925) Signed-off-by: Yuan Chen <[email protected]> chore(deps): Update dependency sigstore/cosign to v3.1.2 (NVIDIA#1924) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> feat(skills): add aicr-cross-review skill for multi-agent PR review (NVIDIA#1915) Signed-off-by: Yuan Chen <[email protected]> chore: deps: bump github.com/prometheus/client_golang from 1.24.0 to 1.24.1 (NVIDIA#1922) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix: resolve goconst and errorlint warnings across OCI, coverage, validators (NVIDIA#1916) Signed-off-by: Andrew White <[email protected]> chore(deps): Update testing-tools (NVIDIA#1934) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> fix(skills): harden UAT debug-bundle triage against malformed input (NVIDIA#1914) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump actions/stale from 10.4.0 to 11.0.0 (NVIDIA#1931) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> fix(ci): sync coverage docs to 80% and fail closed on bad threshold (NVIDIA#1937) docs: correct issue/PR lifecycle table, fix reminder dedupe (NVIDIA#1921) Signed-off-by: Yuan Chen <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> chore: deps: bump actions/checkout from 7.0.0 to 7.0.1 (NVIDIA#1930) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nathan Hensley <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix(recipe,client): reject duplicate ComponentRef names, omit disable… (NVIDIA#1917) Co-authored-by: Nathan Hensley <[email protected]> fix(validators): pass aiperf model via --model flag (NVIDIA#1939) Signed-off-by: Nathan Hensley <[email protected]> fix(skills): recover cross-review lanes, harden consensus/fallback (NVIDIA#1932) Signed-off-by: Yuan Chen <[email protected]> feat(rekor-monitor): resumable identity scan to catch up large backlogs (NVIDIA#1929) Signed-off-by: Brian Lockwood <[email protected]> fix(bundler): create argocd-helm static/ only when populated (NVIDIA#1944) Signed-off-by: Yuan Chen <[email protected]> chore: deps: update hashicorp/azurerm requirement from ~> 4.0 to ~> 5.0 in /infra/uat-azure-account (NVIDIA#1945) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix(ci): run validators/ unit tests in make test, exclude from coverage gate (NVIDIA#1918) Signed-off-by: Mohit Yadav <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> feat(corroborate): improve evidence dashboard UX (NVIDIA#1935) Signed-off-by: Nathan Hensley <[email protected]> fix(api): accept versionless legacy bundle recipes (NVIDIA#1943) Signed-off-by: Yuan Chen <[email protected]> test(bundler): cover argocd-helm OCP bundling and pin its error contract (NVIDIA#1950) Signed-off-by: Yuan Chen <[email protected]> chore: remove stray MOFED debug artifacts from repo root (NVIDIA#1955) Signed-off-by: Nathan Hensley <[email protected]> fix(deps): bump network-operator default to v26.4.1 (NVIDIA#1938) Signed-off-by: Atif Mahmood <[email protected]> Co-authored-by: Atif Mahmood <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.21 to 46.2.0 (NVIDIA#1964) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Update ministackorg/ministack Docker tag to v1.4.7 (NVIDIA#1965) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> feat(recipe): implement the ADR-015 profile core (NVIDIA#1933) Signed-off-by: Yuan Chen <[email protected]> fix(bom): extract nested operator images (NVIDIA#1960) Signed-off-by: Yuan Chen <[email protected]> address yuanchen8911 review: bump network-operator to 26.4.1 with nicnodepolicies exclusion, close gatekeeper TODO with verification
Summary
Sync the documented Go coverage floor to the 80% already enforced by
.settings.yaml, and make the two hardcoded70fallbacks fail closed instead of silently enforcing a looser floor.Motivation / Context
quality.coverage_thresholdwas raised 75 → 80 in298e9a0a, but the documented floor still said 75% in four places and two code paths defaulted to70. Investigating that drift surfaced a live fail-open bug in the CI gate (see Implementation Notes).Fixes: N/A
Related:
298e9a0aType of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Makefile,.github/actions/go-coverageImplementation Notes
The fail-open bug.
load-versionsemits the literal stringnullfor a missing key, becauseyqprintsnulland exits 0 with no2>/dev/nullor failure check on that line. Anullthreshold is non-empty, so an empty-only guard lets it through. GNUbcthen resolvesnullto0, making$COVERAGE < $THRESHOLDfalse, soPASS=trueand theEnforce Thresholdstep is skipped by itsif:condition. The merge gate goes green with no floor enforced at all — strictly looser than the hardcoded 70 it would have replaced. Verified locally:Both guards now reject empty and
null, plus a numeric regex backstop since any non-numeric token degrades to 0 underbc.Fail closed rather than bump to 80. An unreadable threshold means
yqis missing orload-versionsbroke. Substituting any default enforces a floor nobody chose, which is the "gate that passes on an ambiguous condition" anti-pattern inCLAUDE.md.Guard ordering. In the
Makefilethe check became acheck-coverage-thresholdprerequisite listed beforetest, so a misconfigured threshold fails in ~3s rather than after the full race-enabled suite. Prerequisites are serial (noMAKEFLAGS/-jin this repo).DEVELOPMENT.mdnow points at.settings.yaml quality.coverage_thresholdwithout restating the number, since re-hardcoding it would recreate the exact drift this PR fixes. The literal stays in the canonical prose atdocs/contributor/tests.mdand in the agent instruction files, where the concrete number is the point.Deliberately out of scope: the badge colour ladder in
go-coverage/action.ymlhardcodes 80/70/60/50, so 70–79.9% rendersgreenwhile the gate fails. Pre-existing and unrelated to threshold plumbing. Hardeningload-versionsat source is also left alone — every output there shares thenullbehaviour, so it is a broader refactor; the consumer-side guard closes this hole.Testing
Guard behaviour verified empirically rather than by inspection:
Makefileguardaction.ymlguard""(yq missing)null(key missing)abc/8 080/80.5make test-coveragewith an empty threshold aborts in 3s before the test suite runs, confirming prerequisite ordering.Coverage on the gated scope: 80.3% local, consistent with the 80.7% CI reports.
make qualifycannot complete on the author's macOS box for reasons unrelated to this change, both reproduced on a cleanmaincheckout with zero local modifications:tests/releasepolicyfails withtimeout: command not found(no GNU coreutils)pkg/ociTestHelmV4_2_3ExplicitVersionPullfails with installed helm v4.2.0 vs the v4.2.3 pinThe full suite excluding the
timeout-dependent package is green.Risk Assessment
No product code is touched. The worst case is a CI job failing loudly on a misconfigured threshold, which is the intent. Current coverage (80.7%) clears the floor, so the gate stays green.
Rollout notes: N/A
Checklist
make testwith-race) — excluding the two pre-existing environment failures documented abovemake lint)test-shellregression case is a reasonable follow-upgit commit -S)