Files
Shaojin Wen 37e29fd656 fix(ci): read prettier's whole ignore set at the base tip (#16729)
A Critical landed with the previous change and was reproduced on the merged
tree. The prettier narrowing fetched .gitignore through the same helper as
.prettierignore, so it read the newest commit touching .prettierignore rather
than the base tip. .gitignore owns no gate verdict of its own, so a later
base-side change to it was invisible: the equality held, the subset held, and
a branch whose prettier scope was narrower than the base gate's was certified
fresh. Three-ref probe on the merged module returns no stale file; the same
probe on this one returns the verdict.

Rather than patch the ref for one file, stop guessing which files matter.
Prettier discovers .gitignore and .prettierignore at every depth — the lane
groups by the nearest ancestor carrying one, and the repository tracks 29 of
them — so the narrowing now reads both recursive trees and compares the whole
ignore-file set by path and blob SHA. Everything except the root
.prettierignore must be identical, which blob SHAs answer without fetching
content. A truncated tree never narrows. This closes the nested-file gap the
same review raised, at the same call count.

Also from that review's deferred list:

Extraction failure returned false, so it never reached the catch that emits
the warning — the design promised an annotation on that path and did not
deliver one. It throws now.

The Chinese design still said two content fetches while its own constraints
bullet said four; both languages now describe the tree calls.

The eslint real-file drift guard checked anchors but not negations, so a bang
in the global array would have disabled that narrowing silently too.

The relocated-block shape did not reproduce: every placement leaves the
files property in the byte-compared remainder. Four regression cases pin
that rather than adding a brace matcher for a shape already covered.
2026-11-09 20:16:31 +08:00
..