Skip to content

[issues/568] Post CI summary comments on PR when jobs complete#570

Merged
couimet merged 3 commits into
mainfrom
issues/568
May 14, 2026
Merged

[issues/568] Post CI summary comments on PR when jobs complete#570
couimet merged 3 commits into
mainfrom
issues/568

Conversation

@couimet
Copy link
Copy Markdown
Owner

@couimet couimet commented May 14, 2026

Summary

Adds PR comment posts after each CI job finishes, reporting elapsed duration, unit test counts, integration test passing counts, and the QA TC IDs exercised. Also hardens all test pipelines against exit-code swallowing and uploads test report artifacts for post-hoc debugging. Disambiguates two duplicate Report: lines in the test release runner.

Changes

  • New composite action post-ci-comment builds a markdown table and posts it via gh api — always creates a new comment so each run appears chronologically
  • All test runner actions (run-tests, run-integration-tests, run-integration-tests-with-extensions) now: output test counts, use set -o pipefail + tee to prevent exit-code swallowing, and extract stats from captured output
  • Integration test actions now upload their captured output as 30-day artifacts
  • CI workflow uses date +%s for cross-step timing (not $SECONDS, which resets per shell), grants pull-requests: write, and wires the post-comment step with continue-on-error: true so API glitches don't fail the job
  • Renamed duplicate Report: lines in test-release-run.sh and validate-qa-coverage.sh to Report output: / Report complete:

Documentation: CHANGELOG not needed (CI infrastructure, not user-facing); README not needed (no new commands/settings/features)

Test Plan

  • All existing tests pass (1889/1889)
  • Formatting passes (prettier)
  • Manual testing: push branch and verify both CI jobs post PR comments with correct duration, test counts, and TC IDs

Related

Summary by CodeRabbit

  • New Features

    • Posts automated CI summary comments on pull requests with unit and integration test metrics and run links.
    • Test jobs now expose test-count outputs for use in summaries.
  • Bug Fixes / Improvements

    • Captures test output logs and uploads them as artifacts for easier debugging and visibility.
  • Chores

    • Clarified test report completion messages.

Review Change Stack

## Summary

Adds PR comment posts after each CI job finishes, reporting elapsed duration, unit test counts, integration test passing counts, and the QA TC IDs exercised. Also hardens all test pipelines against exit-code swallowing and uploads test report artifacts for post-hoc debugging. Disambiguates two duplicate `Report:` lines in the test release runner.

## Changes

- New composite action `post-ci-comment` builds a markdown table and posts it via `gh api` — always creates a new comment so each run appears chronologically
- All test runner actions (`run-tests`, `run-integration-tests`, `run-integration-tests-with-extensions`) now: output test counts, use `set -o pipefail` + `tee` to prevent exit-code swallowing, and extract stats from captured output
- Integration test actions now upload their captured output as 30-day artifacts
- CI workflow uses `date +%s` for cross-step timing (not `$SECONDS`, which resets per shell), grants `pull-requests: write`, and wires the post-comment step with `continue-on-error: true` so API glitches don't fail the job
- Renamed duplicate `Report:` lines in test-release-run.sh and validate-qa-coverage.sh to `Report output:` / `Report complete:`

Documentation: CHANGELOG not needed (CI infrastructure, not user-facing); README not needed (no new commands/settings/features)

## Test Plan

- [ ] All existing tests pass (1889/1889)
- [ ] Formatting passes (prettier)
- [ ] Manual testing: push branch and verify both CI jobs post PR comments with correct duration, test counts, and TC IDs

## Related

- Closes #568
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Walkthrough

The PR implements automated PR comments that post CI job completion summaries by extending three test-running composite actions to capture and export test metrics (unit-passed, unit-total, int-passing), creating a new post-pr-ci-summary action that consumes those metrics alongside job duration and QA test case IDs, integrating them into the CI workflow with proper permissions and orchestration, and updating shell script output labels for clarity.

Changes

CI Summary Comments

Layer / File(s) Summary
Test Metric Extraction from Running Actions
.github/actions/run-tests/action.yml, .github/actions/run-integration-tests/action.yml, .github/actions/run-integration-tests-with-extensions/action.yml
Unit test, integration test (automated), and integration test (with extensions) actions are updated to capture test output to temporary files via tee, parse test metrics (unit-passed, unit-total, int-passing), export metrics as action outputs, and upload test reports as GitHub artifacts with 30-day retention.
Post PR CI Summary Action
.github/actions/post-pr-ci-summary/action.yml
New composite action that accepts test metrics and job-start timestamp as inputs, computes elapsed duration, discovers the latest QA test-cases YAML file, extracts and optionally filters automated QA test case IDs, constructs a markdown summary table, and posts it as a PR comment via GitHub CLI (gh api).
CI Workflow Integration and Orchestration
.github/workflows/ci.yml
Workflow is updated with explicit job-level permissions, start-time recording steps, explicit step IDs on test runs to capture outputs, and conditional post-run summary comment steps for both unit-test and with-extensions jobs that invoke post-pr-ci-summary with the captured metrics and timestamps.
Report Output Label Updates
packages/rangelink-vscode-extension/scripts/test-release-run.sh, packages/rangelink-vscode-extension/scripts/validate-qa-coverage.sh
Shell scripts' completion messages are updated to use Report complete: (and initial output location in test-release-run.sh to use Report output:) to distinguish and clarify report output at different stages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • couimet/rangeLink#564: Both PRs modify .github/actions/run-integration-tests-with-extensions/action.yml and the test-with-extensions job integration in .github/workflows/ci.yml; this PR adds metrics extraction, while #564 introduces the action itself.
  • couimet/rangeLink#546: The post-pr-ci-summary action in this PR parses QA test-case labels and applies label-filter logic, which depends on the label format and conventions introduced in PR #546.
  • couimet/rangeLink#388: Related earlier work that added/modified integration-test composite actions and CI wiring that this PR builds upon.

"🐰 CI runs so quiet, jobs finish in the night,
Now comments bloom on PRs—metrics shining bright!
Test counts hum with timestamps, QA cases align,
A rabbit hops through workflows, everything's fine. ✨"

🚥 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 clearly and specifically describes the main change: adding automatic PR comment posting when CI jobs complete, matching the core objective.
Linked Issues check ✅ Passed All primary requirements from issue #568 are implemented: PR comments post on job completion [568], duration/test counts/QA TC IDs are included [568], test output is captured via tee with pipefail [568], reports upload as 30-day artifacts [568], and duplicate 'Report:' lines are disambiguated [568].
Out of Scope Changes check ✅ Passed All changes directly support the #568 requirements: new post-pr-ci-summary action, modified test runners to emit outputs and capture logs, workflow updates to post comments, and script message updates for parser clarity—nothing is out of scope.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issues/568

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

CI / Integration Tests (with extensions) — run summary

Duration 6m 38s
Integration tests passing 177
QA TC IDs exercised custom-ai-assistant-003, claude-code-006, claude-code-007
Report View run & artifacts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/actions/run-tests/action.yml (1)

37-51: 💤 Low value

Consider anchoring the "total" pattern to the "Tests:" prefix for robustness.

The pattern on line 44 ('\d+(?= total)') will match any number before " total" in the entire file. While tail -1 mitigates this by taking the last match (which should be Jest's final summary), the pattern could be more specific to avoid false positives if other output contains numbers and "total".

♻️ More robust pattern
-          UNIT_TOTAL=$(grep -oP '\d+(?= total)' /tmp/jest-out.txt | tail -1 || echo "0")
+          UNIT_TOTAL=$(grep -oP 'Tests:.*\K\d+(?= total)' /tmp/jest-out.txt | tail -1 || echo "0")

This anchors the match to lines starting with "Tests:" to match the same summary line as the "passed" pattern.

🤖 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 @.github/actions/run-tests/action.yml around lines 37 - 51, The UNIT_TOTAL
extraction is too broad and can match any number before " total"; update the
grep used in the "Extract unit test stats" step (id: stats) to anchor the match
to the "Tests:" summary line so it mirrors the UNIT_PASSED logic — specifically
change the pattern used when setting UNIT_TOTAL (currently '\d+(?= total)') to a
pattern that only matches numbers on the "Tests:" line (e.g., anchor to "Tests:"
and then capture the number before "total") when reading /tmp/jest-out.txt.
🤖 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 @.github/actions/post-pr-ci-summary/action.yml:
- Line 43: The QA_YAML selection uses plain lexicographic sort which misorders
semantic versions; update the pipeline command that assigns QA_YAML (the find |
sort | tail -1 sequence) to use version-aware sorting by replacing sort with
sort -V so filenames like qa-test-cases-v1.10.0.yaml are ordered correctly and
the latest semantic version is chosen.

---

Nitpick comments:
In @.github/actions/run-tests/action.yml:
- Around line 37-51: The UNIT_TOTAL extraction is too broad and can match any
number before " total"; update the grep used in the "Extract unit test stats"
step (id: stats) to anchor the match to the "Tests:" summary line so it mirrors
the UNIT_PASSED logic — specifically change the pattern used when setting
UNIT_TOTAL (currently '\d+(?= total)') to a pattern that only matches numbers on
the "Tests:" line (e.g., anchor to "Tests:" and then capture the number before
"total") when reading /tmp/jest-out.txt.
🪄 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: CHILL

Plan: Pro

Run ID: 10454a43-585c-42b4-a9a0-11c2b1ee67e7

📥 Commits

Reviewing files that changed from the base of the PR and between e3585e1 and b12e2f3.

📒 Files selected for processing (7)
  • .github/actions/post-pr-ci-summary/action.yml
  • .github/actions/run-integration-tests-with-extensions/action.yml
  • .github/actions/run-integration-tests/action.yml
  • .github/actions/run-tests/action.yml
  • .github/workflows/ci.yml
  • packages/rangelink-vscode-extension/scripts/test-release-run.sh
  • packages/rangelink-vscode-extension/scripts/validate-qa-coverage.sh

Comment thread .github/actions/post-pr-ci-summary/action.yml Outdated
@github-actions
Copy link
Copy Markdown

CI / Test & Validate — run summary

Duration 7m 36s
Unit tests passed 1889 / 0
Integration tests passing 175
QA TC IDs exercised status-bar-menu-002, status-bar-menu-003, status-bar-menu-005, status-bar-menu-006, bind-to-destination-010, bind-to-destination-013, terminal-picker-001, terminal-picker-002, terminal-picker-003, terminal-picker-004, terminal-picker-005, terminal-picker-006, terminal-picker-007, terminal-picker-008, terminal-picker-011, terminal-picker-012, terminal-picker-013, file-picker-001, file-picker-002, file-picker-003, file-picker-004, file-picker-005, file-picker-009, file-picker-011, file-picker-012, clipboard-preservation-002, clipboard-preservation-003, clipboard-preservation-006, clipboard-preservation-007, clipboard-preservation-008, clipboard-preservation-009, send-file-path-001, send-file-path-006, send-file-path-007, send-file-path-008, dirty-buffer-warning-004, dirty-buffer-warning-006, dirty-buffer-warning-007, dirty-buffer-warning-019, send-terminal-selection-003, send-terminal-selection-006, send-terminal-selection-007, go-to-link-001, unbind-001, unbind-003, unbind-004, editor-binding-validation-004, full-line-navigation-001, full-line-navigation-002, char-navigation-001, char-navigation-002, full-line-link-generation-001, wrapped-link-navigation-001, wrapped-link-navigation-002, wrapped-link-navigation-003, wrapped-link-navigation-004, markdown-link-navigation-001, url-exclusion-001, stale-viewcolumn-001, full-line-selection-validation-001, core-send-commands-r-l-001, core-send-commands-r-c-001, core-send-commands-r-l-005, core-send-commands-r-p-001, core-send-commands-r-v-001, clickable-file-paths-001, clickable-file-paths-002, clickable-file-paths-003, clickable-file-paths-004, clickable-file-paths-005, clickable-file-paths-006, clickable-file-paths-007, clickable-file-paths-008, clickable-file-paths-009, clickable-file-paths-010, clickable-file-paths-011, clickable-file-paths-012, smart-padding-001, smart-padding-002, smart-padding-003, smart-padding-004, smart-padding-005, smart-padding-006, duplicate-tab-group-001, duplicate-tab-group-002, duplicate-tab-group-003, duplicate-tab-group-004, langswitch-binding-001, langswitch-binding-002, navigation-clamping-001, navigation-clamping-002, navigation-clamping-003, navigation-clamping-004, untitled-navigation-001, untitled-navigation-002, untitled-navigation-003, untitled-navigation-004, untitled-navigation-005, untitled-navigation-006, navigation-toast-settings-001, navigation-toast-settings-002, navigation-toast-settings-003, filename-fallback-navigation-001, filename-fallback-navigation-002, filename-fallback-navigation-003, filename-fallback-navigation-004, custom-ai-assistant-001, custom-ai-assistant-002, custom-ai-assistant-004, custom-ai-assistant-005, custom-ai-assistant-006, custom-ai-assistant-007, custom-ai-assistant-008, custom-ai-assistant-009, custom-ai-assistant-015, custom-ai-assistant-016, claude-code-001, github-copilot-chat-001, release-notifier-001, release-notifier-002
Report View run & artifacts

Two fixes from CodeRabbit review on PR #570.

- Replace plain `sort` with `sort -V` when selecting the latest QA YAML file so semantic versions (v1.10.0 > v1.9.0) order correctly
- Anchor UNIT_TOTAL grep to the "Tests:" prefix (`Tests:.*\K\d+(?= total)`) to match the same summary line as the UNIT_PASSED pattern

Benefits:
- Prevents wrong QA YAML selection once versions reach 1.10+
- Grep patterns are now symmetric: both anchor to the "Tests:" summary line

Ref: #570 (review)
@github-actions
Copy link
Copy Markdown

CI / Integration Tests (with extensions) — run summary

Duration 6m 34s
Integration tests passing 177
QA TC IDs exercised custom-ai-assistant-003, claude-code-006, claude-code-007
Report View run & artifacts

@github-actions
Copy link
Copy Markdown

CI / Test & Validate — run summary

Duration 7m 33s
Unit tests passed 1889 / 9
Integration tests passing 175
QA TC IDs exercised status-bar-menu-002, status-bar-menu-003, status-bar-menu-005, status-bar-menu-006, bind-to-destination-010, bind-to-destination-013, terminal-picker-001, terminal-picker-002, terminal-picker-003, terminal-picker-004, terminal-picker-005, terminal-picker-006, terminal-picker-007, terminal-picker-008, terminal-picker-011, terminal-picker-012, terminal-picker-013, file-picker-001, file-picker-002, file-picker-003, file-picker-004, file-picker-005, file-picker-009, file-picker-011, file-picker-012, clipboard-preservation-002, clipboard-preservation-003, clipboard-preservation-006, clipboard-preservation-007, clipboard-preservation-008, clipboard-preservation-009, send-file-path-001, send-file-path-006, send-file-path-007, send-file-path-008, dirty-buffer-warning-004, dirty-buffer-warning-006, dirty-buffer-warning-007, dirty-buffer-warning-019, send-terminal-selection-003, send-terminal-selection-006, send-terminal-selection-007, go-to-link-001, unbind-001, unbind-003, unbind-004, editor-binding-validation-004, full-line-navigation-001, full-line-navigation-002, char-navigation-001, char-navigation-002, full-line-link-generation-001, wrapped-link-navigation-001, wrapped-link-navigation-002, wrapped-link-navigation-003, wrapped-link-navigation-004, markdown-link-navigation-001, url-exclusion-001, stale-viewcolumn-001, full-line-selection-validation-001, core-send-commands-r-l-001, core-send-commands-r-c-001, core-send-commands-r-l-005, core-send-commands-r-p-001, core-send-commands-r-v-001, clickable-file-paths-001, clickable-file-paths-002, clickable-file-paths-003, clickable-file-paths-004, clickable-file-paths-005, clickable-file-paths-006, clickable-file-paths-007, clickable-file-paths-008, clickable-file-paths-009, clickable-file-paths-010, clickable-file-paths-011, clickable-file-paths-012, smart-padding-001, smart-padding-002, smart-padding-003, smart-padding-004, smart-padding-005, smart-padding-006, duplicate-tab-group-001, duplicate-tab-group-002, duplicate-tab-group-003, duplicate-tab-group-004, langswitch-binding-001, langswitch-binding-002, navigation-clamping-001, navigation-clamping-002, navigation-clamping-003, navigation-clamping-004, untitled-navigation-001, untitled-navigation-002, untitled-navigation-003, untitled-navigation-004, untitled-navigation-005, untitled-navigation-006, navigation-toast-settings-001, navigation-toast-settings-002, navigation-toast-settings-003, filename-fallback-navigation-001, filename-fallback-navigation-002, filename-fallback-navigation-003, filename-fallback-navigation-004, custom-ai-assistant-001, custom-ai-assistant-002, custom-ai-assistant-004, custom-ai-assistant-005, custom-ai-assistant-006, custom-ai-assistant-007, custom-ai-assistant-008, custom-ai-assistant-009, custom-ai-assistant-015, custom-ai-assistant-016, claude-code-001, github-copilot-chat-001, release-notifier-001, release-notifier-002
Report View run & artifacts

…'t truncate digits

The CodeRabbit-suggested pattern `Tests:.*\K\d+(?= total)` omitted a whitespace boundary before `\K`. Greedy `.*` consumes leading digits, leaving `\d+` with only the trailing digit — on `Tests: 1889 passed, 1889 total` it captured `9` instead of `1889`.

Adding `\s` before `\K` (`Tests:.*\s\K\d+(?= total)`) forces backtracking to a space boundary, ensuring `\d+` captures the full number.

Benefits:
- UNIT_TOTAL now correctly captures the full number (1889, not 9)
- Verified locally: pattern `Tests:.*\s\K\d+(?= total)` produces 12, 586, 1889 → tail -1 = 1889

Ref: #570 (comment)
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 @.github/actions/run-tests/action.yml:
- Around line 43-44: The current pipelines that set UNIT_PASSED and UNIT_TOTAL
can return empty strings because the `|| echo "0"` applies to the last command
only (tail), not the whole pipeline; fix by applying the fallback to the entire
pipeline so an absent grep match yields "0" — for example, wrap the pipeline in
a command group so the `|| echo "0"` runs on pipeline failure (i.e., change the
assignments for UNIT_PASSED and UNIT_TOTAL that read /tmp/jest-out.txt to use a
grouped pipeline with `|| echo "0"`), or alternatively perform the command
substitution and then use shell parameter expansion to default empty values to
0; update both the UNIT_PASSED and UNIT_TOTAL assignments accordingly.
🪄 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: CHILL

Plan: Pro

Run ID: c47b2b5f-821c-471b-bece-43ee71ec4e81

📥 Commits

Reviewing files that changed from the base of the PR and between b12e2f3 and e5e5580.

📒 Files selected for processing (2)
  • .github/actions/post-pr-ci-summary/action.yml
  • .github/actions/run-tests/action.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/post-pr-ci-summary/action.yml

Comment on lines +43 to +44
UNIT_PASSED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /tmp/jest-out.txt | tail -1 || echo "0")
UNIT_TOTAL=$(grep -oP 'Tests:.*\s\K\d+(?= total)' /tmp/jest-out.txt | tail -1 || echo "0")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify current fallback behavior vs fixed behavior (no repo files needed).

set +e

CURRENT=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /dev/null | tail -1 || echo "0")
echo "current='${CURRENT}' (expected often empty, not 0)"

FIXED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /dev/null | tail -1)
FIXED="${FIXED:-0}"
echo "fixed='${FIXED}' (expected 0)"

Repository: couimet/rangeLink

Length of output: 125


🏁 Script executed:

cat -n .github/actions/run-tests/action.yml | sed -n '35,55p'

Repository: couimet/rangeLink

Length of output: 853


Fallback-to-zero is ineffective when grep finds no match.

On Line 43 and Line 44, ... | tail -1 || echo "0" can yield empty output instead of 0 because the pipeline exits successfully via tail. When the Jest output file exists but lacks the expected pattern, these variables become empty strings, which propagate to the GITHUB_OUTPUT (lines 49–50) and can break downstream metrics.

Suggested fix
-          UNIT_PASSED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /tmp/jest-out.txt | tail -1 || echo "0")
-          UNIT_TOTAL=$(grep -oP 'Tests:.*\s\K\d+(?= total)' /tmp/jest-out.txt | tail -1 || echo "0")
+          UNIT_PASSED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /tmp/jest-out.txt | tail -1)
+          UNIT_TOTAL=$(grep -oP 'Tests:.*\s\K\d+(?= total)' /tmp/jest-out.txt | tail -1)
+          UNIT_PASSED="${UNIT_PASSED:-0}"
+          UNIT_TOTAL="${UNIT_TOTAL:-0}"
📝 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
UNIT_PASSED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /tmp/jest-out.txt | tail -1 || echo "0")
UNIT_TOTAL=$(grep -oP 'Tests:.*\s\K\d+(?= total)' /tmp/jest-out.txt | tail -1 || echo "0")
UNIT_PASSED=$(grep -oP 'Tests:\s+\K\d+(?= passed)' /tmp/jest-out.txt | tail -1)
UNIT_TOTAL=$(grep -oP 'Tests:.*\s\K\d+(?= total)' /tmp/jest-out.txt | tail -1)
UNIT_PASSED="${UNIT_PASSED:-0}"
UNIT_TOTAL="${UNIT_TOTAL:-0}"
🤖 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 @.github/actions/run-tests/action.yml around lines 43 - 44, The current
pipelines that set UNIT_PASSED and UNIT_TOTAL can return empty strings because
the `|| echo "0"` applies to the last command only (tail), not the whole
pipeline; fix by applying the fallback to the entire pipeline so an absent grep
match yields "0" — for example, wrap the pipeline in a command group so the `||
echo "0"` runs on pipeline failure (i.e., change the assignments for UNIT_PASSED
and UNIT_TOTAL that read /tmp/jest-out.txt to use a grouped pipeline with `||
echo "0"`), or alternatively perform the command substitution and then use shell
parameter expansion to default empty values to 0; update both the UNIT_PASSED
and UNIT_TOTAL assignments accordingly.

@github-actions
Copy link
Copy Markdown

CI / Integration Tests (with extensions) — run summary

Duration 6m 44s
Integration tests passing 177
QA TC IDs exercised custom-ai-assistant-003, claude-code-006, claude-code-007
Report View run & artifacts

@github-actions
Copy link
Copy Markdown

CI / Test & Validate — run summary

Duration 7m 36s
Unit tests passed 1889 / 1889
Integration tests passing 175
QA TC IDs exercised status-bar-menu-002, status-bar-menu-003, status-bar-menu-005, status-bar-menu-006, bind-to-destination-010, bind-to-destination-013, terminal-picker-001, terminal-picker-002, terminal-picker-003, terminal-picker-004, terminal-picker-005, terminal-picker-006, terminal-picker-007, terminal-picker-008, terminal-picker-011, terminal-picker-012, terminal-picker-013, file-picker-001, file-picker-002, file-picker-003, file-picker-004, file-picker-005, file-picker-009, file-picker-011, file-picker-012, clipboard-preservation-002, clipboard-preservation-003, clipboard-preservation-006, clipboard-preservation-007, clipboard-preservation-008, clipboard-preservation-009, send-file-path-001, send-file-path-006, send-file-path-007, send-file-path-008, dirty-buffer-warning-004, dirty-buffer-warning-006, dirty-buffer-warning-007, dirty-buffer-warning-019, send-terminal-selection-003, send-terminal-selection-006, send-terminal-selection-007, go-to-link-001, unbind-001, unbind-003, unbind-004, editor-binding-validation-004, full-line-navigation-001, full-line-navigation-002, char-navigation-001, char-navigation-002, full-line-link-generation-001, wrapped-link-navigation-001, wrapped-link-navigation-002, wrapped-link-navigation-003, wrapped-link-navigation-004, markdown-link-navigation-001, url-exclusion-001, stale-viewcolumn-001, full-line-selection-validation-001, core-send-commands-r-l-001, core-send-commands-r-c-001, core-send-commands-r-l-005, core-send-commands-r-p-001, core-send-commands-r-v-001, clickable-file-paths-001, clickable-file-paths-002, clickable-file-paths-003, clickable-file-paths-004, clickable-file-paths-005, clickable-file-paths-006, clickable-file-paths-007, clickable-file-paths-008, clickable-file-paths-009, clickable-file-paths-010, clickable-file-paths-011, clickable-file-paths-012, smart-padding-001, smart-padding-002, smart-padding-003, smart-padding-004, smart-padding-005, smart-padding-006, duplicate-tab-group-001, duplicate-tab-group-002, duplicate-tab-group-003, duplicate-tab-group-004, langswitch-binding-001, langswitch-binding-002, navigation-clamping-001, navigation-clamping-002, navigation-clamping-003, navigation-clamping-004, untitled-navigation-001, untitled-navigation-002, untitled-navigation-003, untitled-navigation-004, untitled-navigation-005, untitled-navigation-006, navigation-toast-settings-001, navigation-toast-settings-002, navigation-toast-settings-003, filename-fallback-navigation-001, filename-fallback-navigation-002, filename-fallback-navigation-003, filename-fallback-navigation-004, custom-ai-assistant-001, custom-ai-assistant-002, custom-ai-assistant-004, custom-ai-assistant-005, custom-ai-assistant-006, custom-ai-assistant-007, custom-ai-assistant-008, custom-ai-assistant-009, custom-ai-assistant-015, custom-ai-assistant-016, claude-code-001, github-copilot-chat-001, release-notifier-001, release-notifier-002
Report View run & artifacts

@couimet couimet merged commit 8209a78 into main May 14, 2026
4 checks passed
@couimet couimet deleted the issues/568 branch May 14, 2026 19:59
couimet added a commit that referenced this pull request May 19, 2026
* [issues/579] CI Summary Comment Improvements

## Summary

Fixes six bugs in the PR CI summary action introduced in #570. Comments now show pass/fail at a glance, previous successful comments are minimized instead of piling up, missing test reports are surfaced explicitly, the extensions job explains its scope, and re-run blocks are suppressed when most tests fail.

## Changes

- Pass/fail icon (S1): ✅ or ❌ prefix on the comment title, inferred from unit test pass rate and integration test failure count
- Stale comment cleanup (S1): after a successful run posts, previous successful comments from the same job are minimized via GraphQL. Failed comments stay visible, preserving error history
- Missing report detection (S2): when both integration test stats are 0/empty, the report file is checked for mocha output. If absent, a warning row is added
- Extension job scope (S3): when label-filter is requires-extensions, a row explains that unit tests ran in the Test & Validate job
- Re-run suppression (S4): when int-failed exceeds int-passing, the full re-run command block is replaced with a one-liner pointing to the suite command
- Documentation: CHANGELOG not needed (CI infrastructure); README not needed (no user-facing changes)

## Test Plan

- [ ] All existing tests pass
- [ ] Manual testing: CI run on this PR will exercise all changes (comment posting, minimizing, icon, missing-report detection, scope note, re-run suppression)

Closes #579

* [PR feedback] Defer pass/fail decision until after integration report validation; add --paginate

The ICON (✅/❌) was computed before the missing-report check, so a crashed integration run with passing unit tests showed a green checkmark with only a suble warning row. The gh api call that fetches previous comments for minimizing also lacked --paginate, silently missing old comments on PRs with more than 30 comments.

Fix A: detect missing/unparsable report file, set a flag, defer ICON computation until after that check. A missing report now flips PASS to false.
Fix B: add --paginate to the gh api comment-listing call so all pages are retrieved.

Ref: #591 (review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Post summary comments on PR when CI jobs complete (test counts, duration, QA TC IDs)

1 participant