Repository navigation
Commit 0dd7c94
authored
A withheld plain comment holds nothing, and a fix is green on its required checks (#49)
* A withheld plain comment holds nothing; a withheld thread or review holds convergence
The skill made convergence wait on an empty `withheld`, and listed every
outside item under "Not read, waiting for a person". The fleet's convergence
rule counts unresolved review threads and unanswered review-body findings;
a plain PR comment is neither. A CI runner's status note, a landing queue's
note or a flaky-test note from the repo's own workflow is a plain comment,
and a bot's comment can't be cleared by hiding (gate.jq counts a hide only
for an author who couldn't have hidden it), so the only exits were a person
setting FETCH_REVIEWS_BOT_IDS or an agent stalling. hey-native-apps#4187
sat out of the queue for about eight hours on 2026-10-13 on two of Banyan's
queue notes, hidden as outdated to no effect; Jorge ruled on #4043 the same
day that such notes are "CI status notes, not review findings" and landed
with the flaky note visible; #6103 stalled on 2026-10-17 on the repo's own
tools/flaky note. Twelve hey-native-apps and hey-mcp-server PRs since
2026-10-08 carried the line, one of them with 17 items. Blacksmith's
runner notes, from an app the company doesn't own, sit on 263 PRs in the
org since 2026-10-06 and stay withheld after #48's allowlist, so the next
unknown bot would hold the next PR the same way.
Each withheld entry now carries `holds`: true for a `thread` (an unresolved
thread) and a `review` (a body that may carry findings), false for a plain
`comment` and a `thread-comment` in a resolved thread. Convergence waits on
no entry with `holds` false; the summary lists those under "Not read" so a
person can read them, and the holding ones under "Not read, holding". The
hide-as-Resolved clearing stays for a thread's outside comment, where it
lets the rest of the thread through.
Two smaller rules move with it. Exit 3 for "the PR changed while reading;
run again" is a retry, up to three times, not a stop: the old text said
stop and the script said run again. A reviewer that last reported on an
older head is re-requested once per pull request, never after each push,
and Codex counts where it reported on the head and is named where it
hasn't, as hey-native-apps' Done has said since e47394da6dc; a repo's own
landing rules win where they ask less. Converged is said to mean the review
is done, not a word to merge.
Verified: bin/ci passes, 63 checks. The new holds check fails against
7ef1edb's gate.jq (holds comes back null).
Not done: dropping the withheld listing altogether. A person may still
want to read what an outsider or an unknown bot wrote; what changes is
that the PR no longer waits for them to.
* resolve-thread judges a fix by the head's required checks, as the landing does
`fixed` read the head's combined statusCheckRollup.state and resolved only
on SUCCESS. The rollup folds in every context on the head: an optional
runner's status, a shed's setup-check/<platform> status posted hours late,
and on hey-native-apps Banyan's own `ask`, `trunk` and `tick` runs, one of
which cancelled turns the rollup red while the required `gate` check is
green. tools/land filters exactly those out for the same reason. Under the
rollup rule a fixed thread on such a head could never be resolved, and the
fleet's convergence rule asks for the thread to be resolved once the fix
lands and CI passes.
The query now reads the rollup's contexts with isRequired for this pull
request. Where the base requires checks, those decide: a required check
still running or expected holds, a required check that failed holds, and
SUCCESS, NEUTRAL or SKIPPED passes, as GitHub counts a skipped required
check. Where the base requires none, the rollup state decides as before.
A head with more than one page of contexts holds, since the required ones
past the page can't be read.
Verified: bin/ci passes; six new resolver checks cover a required check
passing beside an optional failure, a skipped required check, a required
failure beside optional passes, a required check still running, and both
outcomes where nothing is required. Against 7ef1edb's script all six fail:
four on behaviour, two because the stub refuses a query that doesn't ask
for the fixture's contexts. Live, read-only, the query on
hey-native-apps#6103 returns 18 contexts with `gate` the one required.
* resolve-thread reads what the base requires from the rulesets, so a check that hasn't reported holds
isRequired marks only the contexts that have reported. A check the base
requires that hasn't started yet has no context on the head, so with one
required check green and an optional one red the rollup read FAILURE, not
EXPECTED, and the resolver returned SUCCESS while branch protection still
waited (Codex and Copilot on #49; cli/cli#6448 shows the rollup reading
every visible check green while the merge was refused).
The query now reads the repository's active branch rulesets, parents
included, and the base's classic protection rule. A ruleset reaches the
base when an include condition is ~ALL, ~DEFAULT_BRANCH on the default
branch, the base's own refs/heads name or a glob matching it, and no
exclude does. Every REQUIRED_STATUS_CHECKS context those name has to
appear on the head and pass; one that hasn't reported holds with its own
reason. mergeStateStatus was tried and rejected as the backstop: on
hey-native-apps it reads BLOCKED with every check green, since a ruleset
lets only Banyan push the trunk.
Verified: bin/ci passes, 64 checks; the new case (required gate passed,
optional red, a named required check unreported) holds. Live, read-only,
the query and jq on hey-native-apps#6103 (rulesets name gate on
~DEFAULT_BRANCH; 18 contexts) and house-skills#49 (no required check)
each give the verdict the rollup alone would.
* Bound the ruleset read, and fail closed past its bound
Codex on 75250c7 found three edges of reading required checks from the
rulesets: an fnmatch pattern with ? or [...] that the glob converter can't
express, a Workflows rule that names runs rather than contexts, and a check
restricted to one GitHub App that a same-named context from another app
would satisfy by name. Three variations of one class is where the fleet
file says to reassess the instrument, not add a selector per case.
The read is now bounded on purpose and fails closed past it: a pattern it
can't convert is read as reaching the base, so its checks are required; a
Workflows rule reaching the base holds the fix as unjudged, with its own
reason; the App restriction is matched by name alone, since a same-named
context from another app on the same head isn't a case worth a selector.
The glob was also evaluated against the base's name rather than the
pattern, so every pattern reached every base; the pattern is bound first.
Verified: bin/ci passes, 72 checks: a glob that reaches names its checks,
one that doesn't names nothing, an unconvertible pattern holds, a
Workflows rule holds. Live, read-only, hey-native-apps#6103 (gate on
~DEFAULT_BRANCH, no Workflows rule) and house-skills#48 still read SUCCESS.
* Escape a pattern's dots by capture, and keep a ruleset whose exclusion can't be read
Copilot on 411450e: jq's gsub hands its replacement the captures object,
so with no named capture "\(.)" interpolated "{}" and a pattern naming a
base with a dot, refs/heads/release/v1.0, became the regex
release/v1\{}0 and reached nothing; its required checks dropped out of
the read. The escape now captures the character it escapes. And an
unconvertible pattern (fnmatch ? or [...]) read as reaching in an
exclusion discarded the ruleset, the opposite of failing closed; in an
exclusion it now reads as not excluding, so the ruleset's checks stay
required.
Verified: bin/ci passes, 75 checks: a dotted base is reached by its own
name and not by a near one, and a ruleset including ~ALL with an
unconvertible exclusion keeps its checks required.1 parent f85c6f7 commit 0dd7c94
4 files changed
Lines changed: 211 additions & 61 deletions
File tree
- plugins/dev/skills/address-pr-reviews
- scripts
- test/address-pr-reviews
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | | - | |
83 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
253 | | - | |
254 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
255 | 262 | | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
259 | 266 | | |
260 | 267 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
286 | 304 | | |
287 | 305 | | |
288 | 306 | | |
| |||
293 | 311 | | |
294 | 312 | | |
295 | 313 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
304 | 325 | | |
305 | 326 | | |
306 | 327 | | |
| |||
310 | 331 | | |
311 | 332 | | |
312 | 333 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
317 | 342 | | |
318 | 343 | | |
319 | 344 | | |
| |||
334 | 359 | | |
335 | 360 | | |
336 | 361 | | |
337 | | - | |
| 362 | + | |
| 363 | + | |
338 | 364 | | |
339 | 365 | | |
340 | 366 | | |
| |||
344 | 370 | | |
345 | 371 | | |
346 | 372 | | |
347 | | - | |
348 | | - | |
349 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
350 | 378 | | |
351 | 379 | | |
352 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| |||
0 commit comments