check_gcode_comment.yml runs when a pull request's Build all run or a
check-gcode label run completes, finds the open pull requests from that
branch, and posts the report of the newest finished build on each one
that has the label. check_gcode_label.yml only wakes it when the label
is added after the build finished; it needs no token and runs nothing.
Neither uses pull_request_target, which GitHub blocks by default in
public repositories.
Runs are kept only when their head repository and branch are the pull
request's, and the artifact must name the pull request, so another fork
at the same commit cannot have its report posted. A run waiting for
approval counts as not finished. The comment is kept when unchanged,
edited in place when only the commit or the baseline moved, and
replaced otherwise. The report appears only inside a fence nothing in
it can close, errors print their type and HTTP status only, and the
step cannot leave a red check.
On a pull request, the Slice check now finds the newest build of the
base branch at or before the pull request's base commit that saved
fingerprints, compares them with its own, and writes report.txt into
the gcode-fingerprints artifact and the report into the job summary.
Every build also writes made_with.txt, the fingerprint script's hash and
the runner, so a report warns when the two sides were made differently.
scripts/ci_check_gcode.py reads the baseline's artifact in memory: the
download and each file in it are capped, and a file compressed with
anything but stored or deflate is refused, since a capped read does not
bound bzip2 or LZMA. An error writes its type only, never the text of
the files, and the step cannot fail the job.