Repository navigation
Detector: corpus round 11 deferred edge cases - #1155
Conversation
- At-rule headers: enclosingCssSelector finds each enclosing block's header start outside quoted strings, so a quoted brace or semicolon in an @supports condition no longer cuts it short. - Pattern walk: dark-glow, radial-halo and codex-grid-background candidates need an element that computes what they declare, as the stripe rule already did; the grid scan now offers every grid block. - text-overflow: a scrolling page shell does not exempt code in it. - Ghost wordmark: title parts name the site only where og:site_name / application-name are absent and the host name holds them. Item 1 (scaled 1px text) is left for after round 13's rewrite of the same readers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/live/assets/detect-antipatterns-browser.js
|
Nothing to fix. About this review
Reviewed 1 file on 23 Oct 2026, 21:29 UTC · Run page Reviews (5) · Last reviewed commit: Wordmark: match title parts against the host without its top-level label |
[Medium impact] The PR appears safe to merge; no new actionable issue was found. SummaryAddresses five detector edge cases, with regression fixtures, browser tests, and updated behavior notes.
Reviews (5) · Last reviewed commit: "Wordmark: match title parts against the ..." · Reviewed by Greptile |
# Conflicts: # crates/live/assets/detect-antipatterns-browser.js # docs/CLI-CONTRACT.md # tests/oracle/DELTAS.md
The paint gate already judged font-size: 1px text at the size a transform draws it. The sub-1px descendant test, text-occlusion's top-text test and its victim test now ask the same drawn_at_most_1px helper, so a run enlarged by a transform counts as text. The cramped-padding flush form already keeps such text by its measured rect since #1151. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arts are Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/live/assets/detect-antipatterns-browser.js
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 910a57d. Configure here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes in #1155; bundle regenerated. Co-Authored-By: Claude Code <noreply@anthropic.com>
Main moved again while the previous merge was verified: release 4.7.1 and engine 0.1.17 (#1159, #1158), the row-stripe side tab and its follow-ups (#1133, #1156), the stepper resting state (#1148), the corpus round 11 deferred edge cases (#1155), the contrast grounds work that drops unmeasured handed verdicts (#1147), and the generated provider sync. No source conflicts; the in-page bundle conflicted as a generated file and was regenerated from the merged source with `cargo xtask bundle`. The sweep goldens stay main's as they stand: main carries its newest fixtures' entries in them as accepted deltas in DELTAS.md rather than re-recording, and this branch's sweep entries are covered by its existing DELTAS entries the same way, as in the previous merge. Prepared with AI assistance (Claude Code). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Fixes #1076 (all five items).
What changes
Quoted braces in at-rule headers (item 3, both engines).
enclosed_only_by_at_rules(crates/foundation/src/css/scan.rs) now records where each block's header starts during the quote-aware scan it already runs (a newline ends an unterminated string, as inlast_unquoted_delimiter). Before, it searched back with a quote-unawarerfind, so@supports (content: "a;b") { .b { … } }lost.b's selector. New cases are inenclosing_selector_matches_node.Inactive at-rule candidates in the pattern walk (item 2, URL engine). The stripe-only
repeating_gradient_appliesbecomescomputed_paint_applies. A glow needs the shadow property its snippet names to be something other thannone, a halo needs aradial-gradientbackground image, and a grid needs agradientbackground image. A value the capture did not record still answers yes. So does a::before/::afterpart for the three new rules, because acontent: ''box is never recorded.codex-grid-backgroundused to offer only the first grid block, so the walk never got a second candidate. It now offers every grid block lazily throughgrid_background_hits. The frozenscanCssTextForGridBackgroundexport still returns the first.Code in a scrolling page shell (item 4, URL engine). If a scroll-region ancestor is the page shell (
clipping_container_is_page_shell), it no longer exempts code inside it. The existing code tests then decide, so a line that runs past the screen edge is reported.Wordmark name match (item 5, URL engine). If
og:site_nameorapplication-nameis present, that is the site name and the title is not read. Otherwise a title with one part still counts whole. In a title with several parts, a part counts only if the host name contains it. A faint 100px "Pricing" on "Pricing | Northwind" now reports as a warning instead of an advisory.Scaled 1px text (item 1, URL engine). I checked this against main after Fix small measurement defects from craft run 1009 (round 13, branch D) #1151 landed. Fix small measurement defects from craft run 1009 (round 13, branch D) #1151 fixed the cramped-padding flush form: it now keeps sub-1px text that has a measured rect of 1px or more,
text_descendants_flush_sidesinquality.rs. The rest was still open: the sub-1px descendant test inno_font_sizeandtext-occlusion'stop_own_textboth read the raw computed size. A new helper,painted::drawn_at_most_1px, now serves those readers and the occlusion victim test, so text a transform enlarges counts as text. The new fixture istext-occlusion-scaled-1px.html, with unit cases inpainted.rsandpage_checks.rs. The browser test fails with the source change stashed. This part touches only browser code, so the hook cost is unchanged.Tests
text-occlusion-scaled-1px.html,pattern-walk-inactive-at-rules.html,text-overflow-code-page-shell.html,low-contrast-title-wordmark.html.crates/browser/tests/round11_edge_cases.rsdrives them in a real browser. All three tests fail with the source changes stashed and pass with them.driver.rs,decorative_text.rsandcss_scan.rs.DELTAS.md). No existing golden moved, and the frozen vectors replay unchanged. The directory sweeps are accepted deltas that were already behind main, so I did not re-record them.docs/CLI-CONTRACT.md: new "Round 11 deferred edge cases" bullet. The wordmark site-name parenthetical is updated.Hook cost
Item 3 reaches the text and static-HTML engines. Below are
rule_cost --runs 9 tests/fixtures/antipatternsnumbers (261 inputs) for main and this branch, run on the same machine and the same fixture set. The differences are within noise.🤖 Generated with Claude Code
Note
Medium Risk
Touches core detection heuristics (pattern gating, wordmark classification, text occlusion/overflow, and CSS selector recovery) with broad fixture coverage but subtle behavior changes on real pages.
Overview
Addresses corpus round 11 deferred edge cases (#1076) across CSS parsing, HTML pattern detection, and several browser checks.
Pattern walk: Inactive
@media/@supportsrules no longer suppress visible candidates. Stripe-onlyrepeating_gradient_appliesis generalized tocomputed_paint_applies, which also requires computed glow shadows, radial halos, and grid gradients to match what the rule declares. Grid backgrounds are offered lazily viagrid_background_hitsso the walk can skip dead candidates and still find the next match.CSS structure:
enclosed_only_by_at_rulestracks header start positions with quote-aware scanning so selectors inside at-rules with quoted;or}in the header (e.g.@supports (content: "a;b")) are not lost.Text checks:
drawn_at_most_1pxcentralizes “1px unless transform scales it up” logic for unpainted text, occlusion victims, and overlay text—sofont-size: 1pxwithscale: 16is treated as readable. Code inside a full-pageoverflow: autoshell is no longer skipped as if it lived in a normal scroll region; overflow on code can still flag.Wordmarks / low contrast: Site naming prefers non-empty
og:site_name/application-nameand ignores title parsing when set. Multi-part titles contribute site names only for segments corroborated by the hostname; faint page titles like “Pricing” onPricing | Acmeare not advisory wordmarks.Tests: New antipattern fixtures plus
round11_edge_cases.rsbrowser integration tests and targeted unit tests indriver,decorative_text,css_scan,painted, andpage_checks.Reviewed by Cursor Bugbot for commit cd20e24. Bugbot is set up for automated code reviews on this repo. Configure here.