Commit 5ff9350
Fix gencode indexer to detect unsigned SignedSource files
Summary:
The Glean Python gencode indexer's `GENERATED_PATTERN` regex only matched the signed form `generated SignedSource<<HEX>>`, missing ~8,000+ files that have the unsigned placeholder `generated <<SignedSource::TOKEN>>`. These files are legitimately generated but invisible to the `gencode.GenCode` Glean predicate, leaving them unprotected by `DenyIfGleanGeneratedDeadCodeClassifierRule` in the Dead Code Bot classifier pipeline. This was discovered when D99778344 deleted a generated bloks file that should have been blocked.
The regex is updated to also match the `<<SignedSource::TOKEN>>` format via an alternation. Files matching this format produce a GenCode fact with no signature (correct — the token is a placeholder, not a real hash). The OCaml/Hack indexer already handled this correctly due to a trailing `.*$` in its regex.
Reviewed By: donsbot
Differential Revision: D100816292
fbshipit-source-id: fbf48fae587aae613d52106ce38758808b9e32ed1 parent 1d95b40 commit 5ff9350
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
0 commit comments