Commit 7165916
ci(4311): list fmt-affected files in job summary on drift
The cargo fmt gate already existed in ci-pr.yml, ci-main.yml, and
.gitea/workflows/native-ci.yml and was correctly wired into the merge
gate (ci-pr.yml:636). The one unmet AC of #4311 was 'lists the affected
files in the job summary' -- previously the step dumped only a raw
unified diff.
Replace the bare one-line Rustfmt Check with a step that captures the
diff, preserves the exit code (any non-zero cargo fmt exit propagates),
and on failure writes a deduplicated, repo-relative affected-files list
to $GITHUB_STEP_SUMMARY. Behaviour-preserving: still fails on drift,
still passes when clean (no summary written on the clean path).
Mirrored identically into ci-main.yml. The native .gitea workflow is
left untouched (Gitea Actions syntax, no step-summary support; its gate
goal of failing on drift is already met).
Verification (this session):
- drift path: exit 1, summary lists 4 files (deduped from 13 hunks),
no stray commas (rendered output cat -A checked)
- clean path: exit 0, no summary written
- bash -n on extracted shipped body: SYNTAX OK
- python3 yaml.safe_load on both files: VALID
- rch exec exit-code propagation verified (true->0, false->1, fmt drift->1)
Out of scope (surgical): pre-existing fmt drift (#3013, owned by open
PR #3018) is NOT reformatted -- only the gate UX is changed.
Refs #4311
Co-Authored-By: Claude <noreply@anthropic.com>1 parent bb8062a commit 7165916
2 files changed
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
203 | 224 | | |
204 | 225 | | |
205 | 226 | | |
| |||
0 commit comments