Repository navigation
Add review checks for script re-entrancy, reactivity, CSS boundaries, and WPT traps - #6
Conversation
Tests often call `el[method](...)` from a list of method names, which the check missed. It now only covers methods added in a spec diff, and requires the guard to name the method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also drop a lookbehind that never matched anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocks that start after `</script><script>` on one line are now checked. To avoid false positives in existing wpt files, skip `<script>` in attribute values, one-line scripts, and `</script` not followed by whitespace, `/` or `>`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the general rule in each bullet and drop the specifics of the case it came from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI review and fixesReviewed at 126bfba I reviewed the Open questions
Suggestions
Nits
|
|
Comment by Claude:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI review and fixesReviewed at c42c53e (new commits d1b1954 and c42c53e) I reviewed the two new commits against my earlier comments, and checked that the PR description and the analyzer docs still match Open questions
Suggestions
|
Adds generalizable HTML specification & WPT review patterns distilled from multi-round review cycles on
whatwg/html#13053andwhatwg/html#12758:SKILL.mdAdditionsPhrasing Conventions): Require<span>continue</span>and<span>break</span>markup in algorithm steps (never barecontinueorbreak).Reactivity & Mutation-Hook Parity Audit): Audit trigger completeness, event/flag parity, and a folded bullet for image candidate selection (<picture>/<img>).Author Script Re-Entrancy & Mid-Algorithm DOM Mutations): Re-validate DOM invariants after author script can run (and before side-effectful element creation, not just at final insertion).Shared Parser Context Audit): Verify changes to shared parser/element algorithms across all 4 parser contexts (normal document parser, fragment parsers, speculative HTML parser, and XML parser).CSS Syntax & HTML Microsyntax Boundaries): Require exact CSS Syntax token types (<ident-token>,<whitespace-token>), division-by-zero / degenerate number guards,one or more/zero or more<span>ASCII whitespace</span>cardinality, and grammar vs. parser error-recovery parity.Post-Fix 4-Way Synchronization Sweep): Verify normative steps,<p class="note">/domintroblocks, PR descriptions, and companion WPT PRs stay synchronized after review fixes.WPT Antipatterns to Catch): Add rule for non-masking negative tests.ALGO-LOOP-CONTROL-SPAN,WPT-EARLY-SCRIPT-CLOSE, andWPT-UNGUARDED-TYPEERROR, with concise matching checklist items.Static Analyzer Additions
scripts/check_algorithms.py(ALGO-LOOP-CONTROL-SPAN): Deterministic check flagging barecontinue.orbreak.in<div algorithm>blocks without<span>wrapping (including at the start of wrapped lines).scripts/check_wpt_coverage.py(WPT-EARLY-SCRIPT-CLOSE&WPT-UNGUARDED-TYPEERROR):WPT-EARLY-SCRIPT-CLOSE: Flags literal</script>inside JS comments or string literals in.htmlWPT files.WPT-UNGUARDED-TYPEERROR: Flagsassert_throws_js(TypeError, ...)/promise_rejects_js(..., TypeError, ...)on methods added in a spec diff when the test file lacks an existence guard (assert_implements,typeof,in).