Skip to content

fix(action): show warnings in zero-finding PR summaries - #1755

Closed
hyy321 wants to merge 1 commit into
alibaba:mainfrom
hyy321:fix/action-zero-findings-warnings
Closed

hyy321 wants to merge 1 commit into
alibaba:mainfrom
hyy321:fix/action-zero-findings-warnings

Conversation

@hyy321

@hyy321 hyy321 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

The zero-finding path previously skipped result.warnings and always displayed a ✅ summary.

This change:

  • Shows ⚠️ when warnings are present and renders them using the existing formatWarnings() helper.
  • Preserves result.message, with a neutral fallback when warnings exist but no message is provided.
  • Keeps the no-warning output and checkpoint behavior unchanged.
  • Adds regression tests for new and sticky summaries, warning formats, and checkpoint advancement.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing

Additional checks:

  • make check — passed
  • make build — passed
  • node scripts/github-actions/post-review-comments.test.js — passed
  • git diff --check — passed

npm run test:github-actions did not complete on Windows. The post-review-comments and translation-sync tests passed, but the Action contract tests invoke /bin/bash, which returned ENOENT on Windows. The remaining contract suites were not executed.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes (full Actions suite pending)
  • I have updated the documentation accordingly (if applicable; no documentation changes needed)
  • I have signed the CLA

Related Issues

Fixes #1752.

AI-Assisted Development

I used OpenAI Codex during the analysis and implementation. I reviewed the changes and ran the local checks listed above.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@NanaseInori NanaseInori 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.

Reviewed both changed files, #1752, the existing discussion, and the alternative implementation in #1766. This PR is the earlier submission for the same zero-finding warning omission. Its fix stands on its own and does not need to wait for the later duplicate.

The zero-finding branch now uses the existing warning formatter, preserves a supplied message, chooses a neutral fallback when warnings exist, and leaves the no-warning body unchanged. Warning details precede the narrowed-range note, consistent with the findings path. The existing summary-posting and checkpoint functions remain responsible for their original decisions; warnings alone are not promoted into failure or a checkpoint veto.

The regression additions cover new and sticky summaries, mixed string/structured warnings, fallback wording, the unchanged clean body, the range-note order, and complete/partial/failed checkpoint cases. I found no blocking defect in this focused presentation change.

Validation was source and test inspection. I did not independently execute the Node/Actions or full repository suites; the contributor's documented Windows /bin/bash limitation remains separate from this code approval.

This review was conducted by NanaseInori's review bot, using the model GPT-6 Astra Pro. If you need a human review, please manually @NanaseInori.

@lizhengfeng101

Copy link
Copy Markdown
Contributor

Thank you for the focused fix for #1752. After comparing this head (39360b02) and #1766 (c19e6bbb), we will carry #1766 forward based on regression coverage, rather than submission order.

I found no blocking production defect in this patch, and both pinned heads passed local npm run test:github-actions and make check. The distinction is that #1766 also catches loss of warning details specifically on non-sticky summaries and on checkpoint-enabled partial/failed summaries. Controlled in-memory mutations confirmed that those regressions are caught there but can pass this PR's current tests.

Both PRs currently conflict with main. I have asked for #1766 to be rebased, retain main's current summary-publication behavior, and pass updated CI and review. We will leave this PR open until that consolidation is ready, rather than merging two overlapping fixes.

AI disclosure: This comparison used OpenAI Codex and the OpenCodeReview CLI, with local verification against the pinned heads.

@lizhengfeng101

Copy link
Copy Markdown
Contributor

Thank you for contributing this fix. Closing this PR as a duplicate of #1766, which has now been merged and resolves #1752.

Both PRs address the same zero-finding warning omission in the GitHub Action. We consolidated the fix in #1766 for its more complete regression coverage, including warning retention in non-sticky summaries and in checkpoint-enabled partial/failed results. The merged fix now covers this request, so a second overlapping implementation is no longer needed.

This is a consolidation decision, not a correctness rejection of this patch. Thank you for your work on it.

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.

fix(action): show warnings in zero-finding PR summaries

3 participants