Repository navigation
Commit bf8019f
authored
🤖 fix: accept Resolved mark on Codex summary findings (#220)
## Summary
`scripts/check_codex_comments.sh` now accepts the ` · **Resolved**`
suffix that Codex appends to finding lines in its review-summary card. A
finding marked Resolved, or whose review thread is resolved, no longer
fails the `Codex Comments` check. Unresolved findings still fail.
## Background
Codex now writes resolved findings in the summary card as, for example:
```
- 🟡 [Title](#212 (comment)) · **Medium** · **Resolved**
```
The finding regex required the line to end right after the severity (`·
\*\*(Critical|High|Medium|Low)\*\*$`). A marked line did not match, so
the whole card counted as an unresolved comment. This turned the
non-required `Codex Comments` check red on #212 (run 37137600873),
although all 11 Codex threads on that PR were resolved.
## Implementation
- `finding_regex` takes an optional ` · \*\*Resolved\*\*` group after
the severity, anchored at end of line.
- `is_resolved_finding` clears a finding that links to this PR when the
exact Resolved mark is present, or (as before) when its linked thread is
a resolved thread the bot started.
- The Resolved mark alone clears a finding, even when its thread is
missing from the thread list. This trusts the bot-authored card, as
requested. An open bot thread still blocks through the separate thread
count.
- Unchanged: the card shape checks, the same-repo/same-PR link check,
the finding count check, and the separate count of unresolved bot
threads. A finding marked Resolved whose thread is still open keeps the
check red through that thread count.
## Validation
- Tests first: the new cases failed on `origin/main` (3 of 68 failed),
then passed with the fix (68 of 68).
- New frozen fixture
`summary-security-advisory-findings-resolved-pr212.txt`: the #212
summary card (comment 5970636463) with only the two finding titles
replaced. It has one marked and one unmarked finding, as in the failing
run.
- New cases: marked + thread resolved (pass), marked + thread missing
(pass), real #212 card with both threads resolved (pass); unmarked #212
finding with an unresolved or missing thread (fail), marked finding with
an unresolved thread (fail), marked finding linking another PR (fail),
and lookalike marks `**Unresolved**`, `**resolved**`, unbolded,
repeated, trailing text (all fail).
- `make test-scripts`, and `shellcheck` 0.11.0 on both scripts. No
workflow changed, so actionlint was not needed.
## Risks
Low. Only the non-required `Codex Comments` check uses this parser. The
change widens one exact, end-anchored suffix, and only on bot-authored
cards that already pass the structural checks.
---
_Generated with `mux` • Model: `anthropic:claude-opus-5-5` • Thinking:
`high`_
<!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high -->1 parent 8afd850 commit bf8019f
3 files changed
Lines changed: 108 additions & 6 deletions
File tree
- scripts
- testdata/check_codex_comments/bodies
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | | - | |
| 234 | + | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
236 | | - | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
| |||
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
177 | 192 | | |
178 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
179 | 205 | | |
180 | 206 | | |
181 | 207 | | |
| |||
242 | 268 | | |
243 | 269 | | |
244 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
245 | 285 | | |
246 | 286 | | |
247 | 287 | | |
| |||
363 | 403 | | |
364 | 404 | | |
365 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
366 | 435 | | |
367 | 436 | | |
368 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments