Fixed coverage threshold check not storing results on low values in CI.#2372
Conversation
WalkthroughThe PR refactors CI coverage checks by splitting the inline threshold validation into two steps: one step extracts and exports the numeric coverage percent (COVERAGE_PERCENT), and a later step enforces the VORTEX_CI_CODE_COVERAGE_THRESHOLD using that exported value. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 the current code and only fix it if needed.
Inline comments:
In @.circleci/config.yml:
- Around line 434-441: The coverage check currently assumes COVERAGE_PERCENT is
set and does a numeric comparison, which breaks if COVERAGE_PERCENT is empty;
modify the check in the CI step that references COVERAGE_PERCENT and
VORTEX_CI_CODE_COVERAGE_THRESHOLD so it first verifies COVERAGE_PERCENT is
non-empty and numeric (or defaults it to 0) before performing the integer
comparison, and if empty/malformed emit a clear failure message and exit
non‑zero; update the existing conditional around the comparison (the block using
COVERAGE_PERCENT//. and VORTEX_CI_CODE_COVERAGE_THRESHOLD) to include this guard
so the script fails gracefully when cobertura.xml is missing or malformed.
In @.github/workflows/build-test-deploy.yml:
- Around line 455-463: The Check code coverage threshold step fails when
COVERAGE_PERCENT is empty; update the shell logic in that step to handle an
unset/empty COVERAGE_PERCENT before doing the integer comparison with
VORTEX_CI_CODE_COVERAGE_THRESHOLD: detect if COVERAGE_PERCENT is empty or
non-numeric (e.g., [ -z "$COVERAGE_PERCENT" ]), set a safe default value (such
as 0) or emit a clear message and fail gracefully, then perform the existing
numeric comparison using the sanitized value (the expression that currently
strips dots from COVERAGE_PERCENT should operate on the validated/sanitized
variable); reference the step name "Check code coverage threshold" and the
variables COVERAGE_PERCENT and VORTEX_CI_CODE_COVERAGE_THRESHOLD when making the
change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 89520d5a-e3a1-40bf-8792-1e7c97d9b16b
⛔ Files ignored due to path filters (24)
.vortex/installer/tests/Fixtures/handler_process/_baseline/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_gha/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/provision_profile/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_none/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (2)
.circleci/config.yml.github/workflows/build-test-deploy.yml
| - run: | ||
| name: Check code coverage threshold | ||
| command: | | ||
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | ||
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | ||
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Handle unset COVERAGE_PERCENT gracefully.
If the cobertura.xml file is missing or malformed, COVERAGE_PERCENT will be empty, causing the integer comparison on line 438 to fail with a shell error. Consider adding a guard:
🛡️ Proposed fix
- run:
name: Check code coverage threshold
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
+ if [ -z "${COVERAGE_PERCENT:-}" ]; then
+ echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)"
+ exit 1
+ fi
if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then
echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%"
exit 1
fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - run: | |
| name: Check code coverage threshold | |
| command: | | |
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | |
| exit 1 | |
| fi | |
| - run: | |
| name: Check code coverage threshold | |
| command: | | |
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | |
| if [ -z "${COVERAGE_PERCENT:-}" ]; then | |
| echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)" | |
| exit 1 | |
| fi | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.circleci/config.yml around lines 434 - 441, The coverage check currently
assumes COVERAGE_PERCENT is set and does a numeric comparison, which breaks if
COVERAGE_PERCENT is empty; modify the check in the CI step that references
COVERAGE_PERCENT and VORTEX_CI_CODE_COVERAGE_THRESHOLD so it first verifies
COVERAGE_PERCENT is non-empty and numeric (or defaults it to 0) before
performing the integer comparison, and if empty/malformed emit a clear failure
message and exit non‑zero; update the existing conditional around the comparison
(the block using COVERAGE_PERCENT//. and VORTEX_CI_CODE_COVERAGE_THRESHOLD) to
include this guard so the script fails gracefully when cobertura.xml is missing
or malformed.
| - name: Check code coverage threshold | ||
| if: ${{ matrix.instance == 0 || strategy.job-total == 1 }} | ||
| run: | | ||
| if [ "${COVERAGE_PERCENT//.}" -lt "$((VORTEX_CI_CODE_COVERAGE_THRESHOLD*100))" ]; then | ||
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD}%" | ||
| exit 1 | ||
| fi | ||
| env: | ||
| VORTEX_CI_CODE_COVERAGE_THRESHOLD: ${{ vars.VORTEX_CI_CODE_COVERAGE_THRESHOLD || '90' }} |
There was a problem hiding this comment.
Handle unset COVERAGE_PERCENT gracefully.
Same as the CircleCI config: if COVERAGE_PERCENT is empty (e.g., cobertura.xml missing), the integer comparison on line 458 will fail with a shell error.
🛡️ Proposed fix
- name: Check code coverage threshold
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: |
+ if [ -z "${COVERAGE_PERCENT:-}" ]; then
+ echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)"
+ exit 1
+ fi
if [ "${COVERAGE_PERCENT//.}" -lt "$((VORTEX_CI_CODE_COVERAGE_THRESHOLD*100))" ]; then
echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD}%"
exit 1
fi
env:
VORTEX_CI_CODE_COVERAGE_THRESHOLD: ${{ vars.VORTEX_CI_CODE_COVERAGE_THRESHOLD || '90' }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Check code coverage threshold | |
| if: ${{ matrix.instance == 0 || strategy.job-total == 1 }} | |
| run: | | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((VORTEX_CI_CODE_COVERAGE_THRESHOLD*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD}%" | |
| exit 1 | |
| fi | |
| env: | |
| VORTEX_CI_CODE_COVERAGE_THRESHOLD: ${{ vars.VORTEX_CI_CODE_COVERAGE_THRESHOLD || '90' }} | |
| - name: Check code coverage threshold | |
| if: ${{ matrix.instance == 0 || strategy.job-total == 1 }} | |
| run: | | |
| if [ -z "${COVERAGE_PERCENT:-}" ]; then | |
| echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)" | |
| exit 1 | |
| fi | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((VORTEX_CI_CODE_COVERAGE_THRESHOLD*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD}%" | |
| exit 1 | |
| fi | |
| env: | |
| VORTEX_CI_CODE_COVERAGE_THRESHOLD: ${{ vars.VORTEX_CI_CODE_COVERAGE_THRESHOLD || '90' }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build-test-deploy.yml around lines 455 - 463, The Check
code coverage threshold step fails when COVERAGE_PERCENT is empty; update the
shell logic in that step to handle an unset/empty COVERAGE_PERCENT before doing
the integer comparison with VORTEX_CI_CODE_COVERAGE_THRESHOLD: detect if
COVERAGE_PERCENT is empty or non-numeric (e.g., [ -z "$COVERAGE_PERCENT" ]), set
a safe default value (such as 0) or emit a clear message and fail gracefully,
then perform the existing numeric comparison using the sanitized value (the
expression that currently strips dots from COVERAGE_PERCENT should operate on
the validated/sanitized variable); reference the step name "Check code coverage
threshold" and the variables COVERAGE_PERCENT and
VORTEX_CI_CODE_COVERAGE_THRESHOLD when making the change.
|
This comment has been minimized.
This comment has been minimized.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2372 +/- ##
==========================================
- Coverage 79.41% 78.91% -0.50%
==========================================
Files 125 118 -7
Lines 6654 6502 -152
Branches 44 0 -44
==========================================
- Hits 5284 5131 -153
- Misses 1370 1371 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a37cf37 to
2cce293
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.circleci/vortex-test-common.yml:
- Around line 300-307: The script's coverage check uses COVERAGE_PERCENT in an
integer comparison but doesn't guard against it being empty; update the "Check
code coverage threshold" run step to first validate COVERAGE_PERCENT (e.g., test
-z or non-numeric) and, if missing or malformed, print a clear failure like
"FAIL: could not determine coverage (cobertura missing or malformed)" and exit
1; otherwise proceed with the existing comparison against
VORTEX_CI_CODE_COVERAGE_THRESHOLD using the normalized value
(${COVERAGE_PERCENT//.}) so the integer arithmetic won't error when coverage is
absent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0ecd61a0-9bd4-4d7a-8463-7cba58b02706
⛔ Files ignored due to path filters (24)
.vortex/installer/tests/Fixtures/handler_process/_baseline/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_gha/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/provision_profile/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/.circleci/config.ymlis excluded by!.vortex/installer/tests/Fixtures/**.vortex/installer/tests/Fixtures/handler_process/tools_none/.github/workflows/build-test-deploy.ymlis excluded by!.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (3)
.circleci/config.yml.circleci/vortex-test-common.yml.github/workflows/build-test-deploy.yml
| - run: | ||
| name: Check code coverage threshold | ||
| command: | | ||
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | ||
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | ||
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Handle unset COVERAGE_PERCENT gracefully.
If the cobertura.xml file is missing or malformed, COVERAGE_PERCENT will be empty, causing the integer comparison on line 304 to fail with a shell error. Add a guard to fail gracefully with a clear message.
🛡️ Proposed fix
- run:
name: Check code coverage threshold
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
+ if [ -z "${COVERAGE_PERCENT:-}" ]; then
+ echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)"
+ exit 1
+ fi
if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then
echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%"
exit 1
fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - run: | |
| name: Check code coverage threshold | |
| command: | | |
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | |
| exit 1 | |
| fi | |
| - run: | |
| name: Check code coverage threshold | |
| command: | | |
| [ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0 | |
| if [ -z "${COVERAGE_PERCENT:-}" ]; then | |
| echo "FAIL: COVERAGE_PERCENT is not set (coverage report may be missing)" | |
| exit 1 | |
| fi | |
| if [ "${COVERAGE_PERCENT//.}" -lt "$((${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}*100))" ]; then | |
| echo "FAIL: coverage ${COVERAGE_PERCENT}% is below threshold ${VORTEX_CI_CODE_COVERAGE_THRESHOLD:-90}%" | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.circleci/vortex-test-common.yml around lines 300 - 307, The script's
coverage check uses COVERAGE_PERCENT in an integer comparison but doesn't guard
against it being empty; update the "Check code coverage threshold" run step to
first validate COVERAGE_PERCENT (e.g., test -z or non-numeric) and, if missing
or malformed, print a clear failure like "FAIL: could not determine coverage
(cobertura missing or malformed)" and exit 1; otherwise proceed with the
existing comparison against VORTEX_CI_CODE_COVERAGE_THRESHOLD using the
normalized value (${COVERAGE_PERCENT//.}) so the integer arithmetic won't error
when coverage is absent.
|
|
|
|
Summary by CodeRabbit