Skip to content

[#2384] Updated CI config to hide coverage details under collapsible section.#2386

Merged
AlexSkrypnyk merged 1 commit into
mainfrom
feature/2384-split-coverage
Mar 16, 2026
Merged

[#2384] Updated CI config to hide coverage details under collapsible section.#2386
AlexSkrypnyk merged 1 commit into
mainfrom
feature/2384-split-coverage

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Mar 16, 2026

Copy link
Copy Markdown
Member

Closes #2384

Summary by CodeRabbit

  • New Features
    • Configurable code coverage threshold for CI validation (default: 90%).
    • PR coverage comments now show the threshold in the header, a concise summary, and a collapsible per-class coverage details section for clearer visibility.
  • Tests
    • Unit tests updated to reflect the richer, multi-line coverage report format used in comments.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Walkthrough

Splits CI coverage output into a concise summary and per-class details, adds a configurable coverage threshold (VORTEX_CI_CODE_COVERAGE_THRESHOLD, default 90), and updates CI scripts to post a PR comment that includes the threshold and a collapsible details section.

Changes

Cohort / File(s) Summary
Coverage extraction & PR posting
.circleci/post-coverage-comment.sh, .github/workflows/build-test-deploy.yml
Add VORTEX_CI_CODE_COVERAGE_THRESHOLD (default 90). Change coverage parsing to emit COVERAGE_SUMMARY and COVERAGE_DETAILS instead of COVERAGE_CONTENT. Update PR comment heading to include threshold and add a collapsible "Per-class coverage" section showing details.
Unit test fixtures
.vortex/tests/bats/unit/post-coverage-comment.bats
Replace simple single-line coverage fixture with a multi-line, timestamped coverage report including a Summary block and per-class breakdowns to match new parsing logic.

Sequence Diagram

sequenceDiagram
    participant CI as CI Job
    participant Parser as Coverage Parser
    participant Formatter as Comment Builder
    participant GitHub as GitHub API

    CI->>Parser: Produce coverage report (multi-line)
    Parser->>Parser: Extract Summary -> set COVERAGE_SUMMARY
    Parser->>Parser: Extract per-class details -> set COVERAGE_DETAILS
    Formatter->>Formatter: Read VORTEX_CI_CODE_COVERAGE_THRESHOLD
    Formatter->>Formatter: Build comment (heading with threshold + COVERAGE_SUMMARY + collapsible COVERAGE_DETAILS)
    Formatter->>GitHub: Post PR comment
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

AUTOMERGE

Poem

🐰 I nibbled lines and counted each class,
Split the summary tidy, folded details en masse.
Ninety's the bar that I hop to defend,
A collapsible carrot for reviewers to bend. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating CI config to hide coverage details under a collapsible section, which aligns with the primary objective of splitting coverage into summary and details.
Linked Issues check ✅ Passed All coding requirements from issue #2384 are met: coverage is split into summary and details blocks, details are hidden in a collapsible section, and the implementation matches the referenced example approach.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #2384 objectives. Modified files (CI config files and tests) focus solely on coverage output restructuring with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/2384-split-coverage
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/post-coverage-comment.sh:
- Around line 36-37: The current awk splits use a strict empty-line match /^$/
which fails if the separator line contains spaces; update both COVERAGE_SUMMARY
and COVERAGE_DETAILS patterns to treat separator lines as whitespace-only by
replacing the /^$/ tests with a whitespace-aware regex such as /^[[:space:]]*$/
(or an equivalent POSIX-safe pattern) so the summary/details extraction logic
still stops/starts correctly even when the separator contains spaces.

In @.github/workflows/build-test-deploy.yml:
- Around line 437-438: The awk commands that set COVERAGE_SUMMARY and
COVERAGE_DETAILS use the blank-line pattern ^$ which fails on lines containing
spaces; update both awk scripts (the first using '/^ *Summary:/{f=1;next} f &&
/^$/{exit} f' and the second using 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 &&
/^$/{s=2;next} s==2') to use a whitespace-tolerant blank-line matcher like
/^[[:space:]]*$/ so separator lines with spaces are recognized and extraction is
robust.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a6d3d228-c886-4731-8bd3-65bfe0c1c090

📥 Commits

Reviewing files that changed from the base of the PR and between d7235cc and 226dfdf.

⛔ Files ignored due to path filters (26)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_gha/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/provision_profile/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/timezone_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_none/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (3)
  • .circleci/post-coverage-comment.sh
  • .github/workflows/build-test-deploy.yml
  • .vortex/tests/bats/unit/post-coverage-comment.bats

Comment on lines +36 to +37
COVERAGE_SUMMARY=$(awk '/^ *Summary:/{f=1;next} f && /^$/{exit} f' "${COVERAGE_FILE}")
COVERAGE_DETAILS=$(awk 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 && /^$/{s=2;next} s==2' "${COVERAGE_FILE}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Whitespace-only separator lines can break summary/details splitting.

On Line 36 and Line 37, ^$ only matches completely empty lines. If the separator line contains spaces, COVERAGE_SUMMARY may absorb details and COVERAGE_DETAILS may be wrong.

💡 Suggested hardening
-COVERAGE_SUMMARY=$(awk '/^ *Summary:/{f=1;next} f && /^$/{exit} f' "${COVERAGE_FILE}")
-COVERAGE_DETAILS=$(awk 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 && /^$/{s=2;next} s==2' "${COVERAGE_FILE}")
+COVERAGE_SUMMARY=$(awk '/^ *Summary:/{f=1;next} f && /^[[:space:]]*$/{exit} f' "${COVERAGE_FILE}")
+COVERAGE_DETAILS=$(awk 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 && /^[[:space:]]*$/{s=2;next} s==2' "${COVERAGE_FILE}")
📝 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.

Suggested change
COVERAGE_SUMMARY=$(awk '/^ *Summary:/{f=1;next} f && /^$/{exit} f' "${COVERAGE_FILE}")
COVERAGE_DETAILS=$(awk 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 && /^$/{s=2;next} s==2' "${COVERAGE_FILE}")
COVERAGE_SUMMARY=$(awk '/^ *Summary:/{f=1;next} f && /^[[:space:]]*$/{exit} f' "${COVERAGE_FILE}")
COVERAGE_DETAILS=$(awk 'BEGIN{s=0} /^ *Summary:/{s=1} s==1 && /^[[:space:]]*$/{s=2;next} s==2' "${COVERAGE_FILE}")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.circleci/post-coverage-comment.sh around lines 36 - 37, The current awk
splits use a strict empty-line match /^$/ which fails if the separator line
contains spaces; update both COVERAGE_SUMMARY and COVERAGE_DETAILS patterns to
treat separator lines as whitespace-only by replacing the /^$/ tests with a
whitespace-aware regex such as /^[[:space:]]*$/ (or an equivalent POSIX-safe
pattern) so the summary/details extraction logic still stops/starts correctly
even when the separator contains spaces.

Comment thread .github/workflows/build-test-deploy.yml Outdated
@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@codecov

codecov Bot commented Mar 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.83%. Comparing base (d7235cc) to head (b96c75f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.circleci/post-coverage-comment.sh 27.27% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2386      +/-   ##
==========================================
- Coverage   79.38%   78.83%   -0.56%     
==========================================
  Files         126      119       -7     
  Lines        6708     6557     -151     
  Branches       44        0      -44     
==========================================
- Hits         5325     5169     -156     
- Misses       1383     1388       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2384-split-coverage branch from 226dfdf to b96c75f Compare March 16, 2026 02:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.vortex/tests/bats/unit/post-coverage-comment.bats (1)

75-80: ⚠️ Potential issue | 🟠 Major

Add explicit assertions for summary/details markdown in the posted comment

Line 75 and Line 103 only assert that curl was called, not that the payload includes the new summary + collapsed details format (<details>...). This leaves the main PR objective effectively untested.

✅ Suggested test-hardening pattern
   declare -a STEPS=(
     # GET existing comments - return empty array.
     '@curl * # []'
-    # POST new comment.
-    '@curl * # {"id": 1}'
+    # POST new comment must include summary and collapsed details.
+    '@curl *Classes: 100.00% (1/1)* # {"id": 1}'
+    '@curl *Methods: 100.00% (2/2)* # {"id": 1}'
+    '@curl *Lines:   100.00% (4/4)* # {"id": 1}'
+    '@curl *<details>* # {"id": 1}'
+    '@curl *<summary>Per-class coverage</summary>* # {"id": 1}'
+    '@curl *</details>* # {"id": 1}'
   )
Based on learnings: In `.vortex/tests/bats/unit` tests using `../_helper.bash (run_steps)`, unprefixed `STEPS` entries assert presence, and `- ` entries assert absence.

Also applies to: 103-110

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.vortex/tests/bats/unit/post-coverage-comment.bats around lines 75 - 80, The
test currently only asserts that curl was called (STEPS entries like '@curl * #
[]') but doesn't assert the POST payload contains the new summary plus collapsed
details HTML; update the STEPS array entries for the POST step(s) (the '@curl *
# {"id": 1}' entries) to assert the payload includes the summary text and the
'<details>' block (e.g., include patterns matching the markdown/HTML summary and
'<details>...<\/details>') using the same STEPS format relied on by
run_steps/_helper.bash so the test verifies the exact comment body is posted;
apply the same change to the other POST assertion group around lines 103-110 to
harden both cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.vortex/tests/bats/unit/post-coverage-comment.bats:
- Line 101: Update the coverage fixture so the reported percentage matches the
fraction: replace the string "Lines: 95.00%% (6/8)" in the printf fixture with
"Lines: 75.00%% (6/8)" (the printf line that writes the coverage report used by
the post-coverage-comment test).

---

Outside diff comments:
In @.vortex/tests/bats/unit/post-coverage-comment.bats:
- Around line 75-80: The test currently only asserts that curl was called (STEPS
entries like '@curl * # []') but doesn't assert the POST payload contains the
new summary plus collapsed details HTML; update the STEPS array entries for the
POST step(s) (the '@curl * # {"id": 1}' entries) to assert the payload includes
the summary text and the '<details>' block (e.g., include patterns matching the
markdown/HTML summary and '<details>...<\/details>') using the same STEPS format
relied on by run_steps/_helper.bash so the test verifies the exact comment body
is posted; apply the same change to the other POST assertion group around lines
103-110 to harden both cases.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 63e2c9d6-4182-4783-a936-e736c4b00b5f

📥 Commits

Reviewing files that changed from the base of the PR and between 226dfdf and b96c75f.

⛔ Files ignored due to path filters (26)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_gha/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/provision_profile/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/timezone_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/.circleci/post-coverage-comment.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_none/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (3)
  • .circleci/post-coverage-comment.sh
  • .github/workflows/build-test-deploy.yml
  • .vortex/tests/bats/unit/post-coverage-comment.bats


mkdir -p .logs/coverage/phpunit
printf "Code Coverage Report:\n Lines: 95.00%%\n" >.logs/coverage/phpunit/coverage.txt
printf "Code Coverage Report:\n 2024-01-01 12:00:00\n\n Summary:\n Classes: 50.00%% (1/2)\n Methods: 66.67%% (2/3)\n Lines: 95.00%% (6/8)\n\nApp\\\\ClassA\n Methods: 100.00%% ( 2/ 2) Lines: 100.00%% ( 4/ 4)\nApp\\\\ClassB\n Methods: 0.00%% ( 0/ 1) Lines: 50.00%% ( 2/ 4)\n" >.logs/coverage/phpunit/coverage.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix inconsistent line coverage fixture value

Line 101 declares Lines: 95.00%% (6/8), but 6/8 equals 75.00%. This inconsistency can hide parser/formatting regressions and makes the test intent ambiguous.

🔧 Suggested correction
-  printf "Code Coverage Report:\n  2024-01-01 12:00:00\n\n Summary:\n  Classes: 50.00%% (1/2)\n  Methods: 66.67%% (2/3)\n  Lines:   95.00%% (6/8)\n\nApp\\\\ClassA\n  Methods: 100.00%% ( 2/ 2)   Lines: 100.00%% (  4/  4)\nApp\\\\ClassB\n  Methods:   0.00%% ( 0/ 1)   Lines:   50.00%% (  2/  4)\n" >.logs/coverage/phpunit/coverage.txt
+  printf "Code Coverage Report:\n  2024-01-01 12:00:00\n\n Summary:\n  Classes: 50.00%% (1/2)\n  Methods: 66.67%% (2/3)\n  Lines:   75.00%% (6/8)\n\nApp\\\\ClassA\n  Methods: 100.00%% ( 2/ 2)   Lines: 100.00%% (  4/  4)\nApp\\\\ClassB\n  Methods:   0.00%% ( 0/ 1)   Lines:   50.00%% (  2/  4)\n" >.logs/coverage/phpunit/coverage.txt
📝 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.

Suggested change
printf "Code Coverage Report:\n 2024-01-01 12:00:00\n\n Summary:\n Classes: 50.00%% (1/2)\n Methods: 66.67%% (2/3)\n Lines: 95.00%% (6/8)\n\nApp\\\\ClassA\n Methods: 100.00%% ( 2/ 2) Lines: 100.00%% ( 4/ 4)\nApp\\\\ClassB\n Methods: 0.00%% ( 0/ 1) Lines: 50.00%% ( 2/ 4)\n" >.logs/coverage/phpunit/coverage.txt
printf "Code Coverage Report:\n 2024-01-01 12:00:00\n\n Summary:\n Classes: 50.00%% (1/2)\n Methods: 66.67%% (2/3)\n Lines: 75.00%% (6/8)\n\nApp\\\\ClassA\n Methods: 100.00%% ( 2/ 2) Lines: 100.00%% ( 4/ 4)\nApp\\\\ClassB\n Methods: 0.00%% ( 0/ 1) Lines: 50.00%% ( 2/ 4)\n" >.logs/coverage/phpunit/coverage.txt
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.vortex/tests/bats/unit/post-coverage-comment.bats at line 101, Update the
coverage fixture so the reported percentage matches the fraction: replace the
string "Lines: 95.00%% (6/8)" in the printf fixture with "Lines: 75.00%% (6/8)"
(the printf line that writes the coverage report used by the
post-coverage-comment test).

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk merged commit 7e4da24 into main Mar 16, 2026
30 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2384-split-coverage branch March 16, 2026 03:27
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Mar 16, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.38.0 milestone Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 1.37.0

Development

Successfully merging this pull request may close these issues.

Split code coverage to summary and details and post them collapsed

1 participant