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
Function-level vectors
record-calls.mjs runs the detect CLI and the pure-function unit tests with a
loader hook (hooks.mjs / hooks-impl.mjs) that routes every exported
function declaration in the pure engine modules through recorder.mjs. Each
call whose arguments and result are plain data is written once (deduplicated by
arguments) to calls/<module>/<fn>.jsonl as { "args": [...], "result": ... }.
Encoding of values JSON cannot carry: {"$undef":true}, {"$nan":true},
{"$inf":1|-1}, {"$negzero":true}, {"$map":[[k,v],...]}, {"$set":[...]}.
calls/_skipped.json names the functions whose calls held DOM-ish objects or
closures; those are covered end to end by the detect goldens instead.
calls/ (about 10 MB) is the frozen snapshot recorded from the JS engine
right before it left the tree with the launcher swap. It can never be
regenerated: the modules record-calls.mjs, hooks.mjs, hooks-impl.mjs,
and recorder.mjs instrumented no longer exist here, and those scripts stay
only as the historical record of how the vectors were produced. Treat the
directory as read-only test data for the engine's rule-level parity checks.