Commit 437597e
fix(verdict): a public suffix is not a domain (#1605)
classifyPage decides "offsite-redirect" by comparing the registrable domain of
the requested host against the final one, and computed it as `parts.slice(-2)`.
That reads every Brazilian host as "com.br", so a redirect from one .com.br
site to an unrelated one compared EQUAL, the hop was never flagged, and a page
that had moved to somebody else's business went on being judged on its own
content — a false LIVE, the opposite of the false deaths this file exists to
prevent. Same shape for co.uk, com.au, co.jp and the rest.
src/lib/partner-project-identity.ts already carries the suffix list and its
tests, so this drops the local copy and calls registrableDomain. Third place in
the codebase to hit it this week; scripts/data/backfill-deployment.ts has its
own correct copy, and scripts/eval/engine-b-sweeps.ts still has a naive one
whose inputs I have not checked.
Exposure today is small and worth stating: three directory rows sit on .com.br
and none on the other multi-label suffixes. The cost of the bug is not its
current blast radius — it is that the failure is silent and lands on the
"still live" side.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 043dd87 commit 437597e
2 files changed
Lines changed: 39 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
56 | | - | |
57 | | - | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
0 commit comments