Harden the Sliced G-code Comparison Against Broken Artifacts and Comments

A corrupt or encrypted zip member, or a bad file name, is now an
artifact error, so a broken artifact gets the "made no comparison" note
instead of stopping the comment, and the report step writes a report
whatever fails. The fence also drops format, C1 and line separator
characters. The comment is posted before the old one is deleted,
comments without a user are skipped, a body GitHub returns with other
line ends counts as unchanged, and a download redirect must be https.
The commenter's concurrency group is on the job, so the skipped wakes of
other labels cannot take the place of a pending real one.

New tests cover the bounded read of a member, a run on another branch,
other bot comments, comments past the first page, the newest run of a
commit, and the token never reaching the storage host.
This commit is contained in:
Hanif Koh authored and HanifKoh committed 2026-11-28 22:08:48 +08:00
1 parent 2fa02ab758
commit c7981ba94c
4 files changed
+230 -28

No files matched your search

+6 -6
View File
@@ -23,11 +23,6 @@ permissions:
# Needed to delete outdated bot comments through the issues/comments endpoint.
issues: write
# One handler at a time per source branch, so two wakes cannot race delete-and-post.
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: false
jobs:
post_comment:
name: Post the comparison comment
@@ -35,6 +30,11 @@ jobs:
timeout-minutes: 10
# A label workflow run for any other label is skipped and has nothing to wake.
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'skipped' }}
# One handler at a time per source branch, so two wakes cannot race post-and-delete. On the
# job, not the workflow, so the skipped wakes of other labels never take a pending place.
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: false
steps:
- name: Checkout the scripts from the default branch
uses: actions/checkout@v7
@@ -46,7 +46,7 @@ jobs:
persist-credentials: false
- name: Update the comment
# A failure would leave a red check on the pull request, which blocks pr-merge-bot.
# The comparison is not a check; a failure is reported in the log and the next wake retries.
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}