Repository navigation
Conversation
|
Review of #1345. The change is scoped and well tested, and I found nothing that should block merge. Remarks below.
Docs and CHANGELOG are updated. Registry tests are not affected, because no rule id was added or changed. I did not run the tests locally. |
9cf9ef5 to
af3ba05
Compare
|
Review of #1345. The change is well scoped, and the true-positive controls are good. I read the diff only and did not run the tests or the benchmarks.
No critical or high findings. |
|
Review of #1345 (keyword-stuffing false positives). The change is scoped and well tested. I read the diff only and did not run the tests. CI was still pending when I looked.
|
|
Review of #1345 (keyword-stuffing false-positive fixes). I read the diff only and did not run the tests or the smoke test.
AGENTS.md checklist: the CHANGELOG entry and docs update are present, and no |
|
Reviewed
Tests cover the true-positive controls and the bounded-cost cases, and the docs state the trade-offs. |
…without landmarks, per-card microcopy #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
… the whole text of its wrapper, no two-letter words, bound counts candidates #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
…nu signal and keyword-cloud guard, linear time #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
… card, 20% cap, keyword-cloud share 30% #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
…ped deduction with a per-word floor and a raw-density limit #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
… of a card number are deducted with the card #1315 Signed-off-by: Nik Cubrilovic <[email protected]>
15e8343 to
7aee982
Compare
|
Review of the keyword-stuffing changes. I read the diff only and did not run the tests. No critical or high issues. The code is bounded: anchors, depth, card candidates and scanned elements are all capped, and the card deduction is clamped by share and by a per-word floor. The docs, CHANGELOG and code agree on the menu-signal definition.
Tests cover each new class plus the true-positive controls and the bounded-cost cases. Per AGENTS.md, I could not confirm the golden pins, the registry-wide tests or the template-verdict tests. CI should confirm them. |
|
Landed in v0.0.145 as nik |
Closes #1315
Three false-positive classes on a German shop (brunobanani.com, from the issue):
sie,für,dich,dir,deinen,deinem,deiner,ihn,ihmand a few inflections (the two-letter ones from the issue,du zu im am ob so, are below the 3-character token minimum and were never counted)) and Englishoutare filler.divs: on the body-fallback path, blocks that are at least 85% link text with at least 6 links and 4 different labels AND a menu signal (a list of links, or menu/nav/dropdown naming up to 3 wrappers up) are left out. One anchor repeated 20 times, or a bare div of keyword links, is not a menu and still flags.Tests:
packages/rules/tests/keyword-stuffing.test.ts(each AC, both true-positive controls, and a bounded-cost test with 6000 nested anchors and 6000 cards); the new German,out, menu and card tests fail on main. Local smoke on the issue's site (30 pages, rule only) still reports a few words on one aggregated check (bestellung,jetzt,newsletter, ...); not claiming it is clean.Known cost, stated in the rule docs: a page whose copy is a long list of different link labels reads as a menu, and a stuffed phrase repeated in separate wrappers that each hold only that phrase reads as a card.
Docs:
docs/rules/content/keyword-stuffing.mdx, CHANGELOG under Unreleased. Skill: none.Review round: the two false negatives (25 wrappers each holding only the phrase; a bare div of 24 keyword links) are tests that flag now, with the controls; card bound counts candidate cards (4,000) and scanned elements (40,000), tested with 700 cards.
Round 2 (review + security scan): card deduction now only for NUMERIC text whose digits differ between occurrences in >=3 wrappers (a stuffed phrase repeats identically, so it can never be a card: your 25x div>(p phrase + p call N) and ul>(li phrase + li more info) flag; identical-digit phrases flag); no parent text is read at all (the quadratic parent.textContent is gone; every leaf counts toward the 4,000/40,000 bounds); link-list exclusion needs a real signal (role menu/menubar/navigation, aria-haspopup/aria-expanded), class/id names and plain ul>li dropped, plus a keyword-cloud guard (a word in >=60% of labels): div.nav, #footer-menu, bare ul>li and role=menubar clouds of 24 keyword links flag. Timing tests (40k spans, 3,000 cards under a 2M-char parent, 8k li, 2,000 groups under 500-char classes) all < 1.5 s on the loaded box.
Round 3: only rating/price-shaped numbers (decimal, amount with currency, %, 4 of 5, star/review counts) make a card; bare integers (doorway numbering) never do (the three digit-varying repros flag); card deduction capped at 20% of the words; keyword-cloud share lowered to 30% (tests at 40% and 58%, with role=menubar and aria-expanded); costs documented: real menus repeating a word and plain-div menus with no signal count, bare counts and non-numeric card text count, card bound is ~400 cards.