mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 16:46:31 +03:00
Upstream sha fa44839f72.
Advisory handling. `severity` becomes the canonical registry field: the
`advisory` bool leaves `Antipattern`, `advisory_rule_ids` filters on
`severity == "advisory"`, and `derive_advisory_flag` stamps the finding's
`advisory: true` from the effective severity, so a per-finding promotion or
demotion carries the flag. The html and browser engines call it after their
severity override; the detect CLI and the hook accept either spelling; the
driver's serializer and the wasm registry exports derive it the same way.
em-dash-overuse moves from `advisory: true` to `severity: "advisory"`.
URL scans. `expand_joined_url_targets` splits an argv value that is entirely
whitespace-separated URLs and leaves paths with spaces alone. The browser
driver reads the readable linked-stylesheet corpus into the HTML pattern
corpora and resolves a finding's selector with `selector_nodes_for_live_dom`
/ `pseudo_element_host_selector`, so an unresolvable selector drops the
finding instead of keeping it page-level. The CSSOM walk itself is page JS:
`browser-bundle/15-snapshot.js` gains `__snapLinkedStylesheetText` (grouping
rules flattened, container-query probes, effective keyframes) and puts it in
the snapshot as `linkedCss`; `10-probe.js` exposes the same for the in-page
route, and the Dom trait carries `linked_stylesheet_text`.
Also `enclosing_css_selector` blanks comments before hunting the previous
declaration delimiter, and `check_typography` reports the uniquely most-used
family instead of every family over a 15% share.
Verified: `impeccable detect --no-config --json tests/fixtures/antipatterns`
is now byte-identical to `node cli/bin/cli.js` on an origin/main worktree
over the shared corpus (432 findings). The two changed lines in
tests/oracle/vectors/calls/rules.checks/checkHtmlPatterns.jsonl were
re-recorded by running origin/main's `checkHtmlPatterns` over the frozen
args; only the comment-polluted selector changed. Goldens re-recorded for
the advisory partition (config-*, fixture gemini/gpt-tells,
numbered-section-labels, scoped-ignore, shape-assembled-illustration,
color, em-dash-entities) and the help text, each cross-checked against the
JS on origin/main.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY
8 lines
2.7 KiB
JSON
8 lines
2.7 KiB
JSON
{
|
|
"stdout": "[\n {\n \"antipattern\": \"numbered-section-labels\",\n \"name\": \"Tiny numbered section labels\",\n \"description\": \"Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\",\n \"severity\": \"advisory\",\n \"category\": \"slop\",\n \"file\": \"<REPO>/tests/fixtures/antipatterns/numbered-section-labels.html\",\n \"line\": 0,\n \"snippet\": \"tiny numbered label \\\"01\\\" beside h2 \\\"Alpha ships first\\\" (4 on page)\",\n \"advisory\": true\n },\n {\n \"antipattern\": \"numbered-section-labels\",\n \"name\": \"Tiny numbered section labels\",\n \"description\": \"Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\",\n \"severity\": \"advisory\",\n \"category\": \"slop\",\n \"file\": \"<REPO>/tests/fixtures/antipatterns/numbered-section-labels.html\",\n \"line\": 0,\n \"snippet\": \"tiny numbered label \\\"02\\\" beside h2 \\\"Beta earns trust\\\" (4 on page)\",\n \"advisory\": true\n },\n {\n \"antipattern\": \"numbered-section-labels\",\n \"name\": \"Tiny numbered section labels\",\n \"description\": \"Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\",\n \"severity\": \"advisory\",\n \"category\": \"slop\",\n \"file\": \"<REPO>/tests/fixtures/antipatterns/numbered-section-labels.html\",\n \"line\": 0,\n \"snippet\": \"tiny numbered label \\\"03\\\" beside h2 \\\"Gamma holds the line\\\" (4 on page)\",\n \"advisory\": true\n },\n {\n \"antipattern\": \"numbered-section-labels\",\n \"name\": \"Tiny numbered section labels\",\n \"description\": \"Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\",\n \"severity\": \"advisory\",\n \"category\": \"slop\",\n \"file\": \"<REPO>/tests/fixtures/antipatterns/numbered-section-labels.html\",\n \"line\": 0,\n \"snippet\": \"tiny numbered label \\\"04 / ROLLOUT\\\" beside h2 \\\"Delta closes the loop\\\" (4 on page)\",\n \"advisory\": true\n }\n]\n",
|
|
"stderr": "",
|
|
"exit": 0,
|
|
"signal": null,
|
|
"files": {}
|
|
}
|