Feat/ci coverage reporting - #121
Conversation
Job summaries listed the highest-coverage packages (almost all 100%) and never named failing tests. Capture go test -json / Vitest JSON and lead the summary with failures, then lowest packages, files, functions, area rollups, and coverage bands so a newly red test is visible on the Actions page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5b104204-65b7-4d04-90a4-e2d5897b8e2e
Surface CI, SI, ops, security, frontend quality, Helm, ai-eval, release, and docs status on main so a red workflow is visible without opening Actions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5b104204-65b7-4d04-90a4-e2d5897b8e2e
There was a problem hiding this comment.
🟡 Changes recommended
Address missing-result handling and package-level Go failure reporting in the coverage summaries.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Enhances CI with frontend/backend coverage summaries, test artifacts, and workflow badges.
Changes:
- Adds CI and quality-gate badges.
- Captures Go and Vitest results and coverage.
- Generates detailed summary reports.
File summaries
| File | Summary |
|---|---|
README.md |
Adds workflow status badges. |
.github/workflows/ci.yml |
Integrates coverage collection and reporting. |
.github/scripts/frontend_coverage_summary.mjs |
Generates frontend test and coverage summaries. |
.github/scripts/backend_coverage_summary.py |
Generates backend test and coverage summaries. |
Review details
Suppressed comments (2)
.github/scripts/backend_coverage_summary.py:327
load_reportpermits a missing or empty--jsoninput, but this fallback is selected whenever no failed event was parsed and therefore claims that all tests passed. If the Go runner exits before producing JSON while a coverage profile still exists, the generated summary hides that there are no test results; render an explicit unavailable/no-results state instead of a passing result.
else:
lines.append(
f"**All reported tests passed** "
f"({outcome['passed_tests']} pass, {outcome['skipped_tests']} skip, "
f"{outcome['passed_pkgs']} packages)."
.github/scripts/backend_coverage_summary.py:301
- A Go package can fail to build before any individual test runs, producing only a package-level
failevent. Those failures are recorded infailed_pkgs, but this table is populated only fromfailed_tests, so the summary reports a package failure without naming the package or showing its build error. Include the failed package names (and their captured output) in the failure section so this report is actionable for build failures.
rows = []
for pkg, name in failed_tests[:80]:
rows.append([f"`{name}`", f"`{short_pkg(pkg)}`"])
if rows:
lines.extend(md_table(["Test", "Package"], rows))
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } else { | ||
| lines.push( | ||
| `**All reported tests passed** (${tests.passed} pass, ${tests.skipped} skip).`, | ||
| ) | ||
| lines.push('') | ||
| } |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
🟡 Changes recommended
Three moderate review findings remain in the frontend and backend coverage summaries.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
.github/scripts/frontend_coverage_summary.mjs:158
- This branch ignores
tests.success. A Vitest collection/setup/transform failure can produce JSON withsuccess: falsebut noassertionResults, so the job summary will incorrectly say “All reported tests passed (0 pass, 0 skip)” and hide the failed run. Handle the unsuccessful run before emitting the all-passed message (and include any suite-level error if available).
} else {
lines.push(
`**All reported tests passed** (${tests.passed} pass, ${tests.skipped} skip).`,
)
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
| ] | ||
| ) | ||
| lines.extend( | ||
| md_table(["Area", "Covered", "Hit", "Stmts", "Missed"], layer_rows) |
| lines.push('') | ||
| lines.push( | ||
| ...mdTable( | ||
| ['Area', 'Covered', 'Hit', 'Lines', 'Missed'], |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
Description
Closes #
Type of Change
Checklist
Screenshots (if applicable)