From d309fd7f0ff394018a208ec7c54ced08e05d4ec8 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 21 Sep 2026 02:04:06 -0400 Subject: [PATCH] test(drafter): pin the rest of #2990's verify list to the span scan (#4222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #2990 asked for three cases. The wrapped-comment-continuation one shipped with #4222; these are the other two — a comment holding a whole rule defines nothing, and an unterminated comment does not swallow the file. Both already pass on both sides; the vectors are what stops a later change to the scan quietly taking them back. The phantom #2990 was filed for is among the twenty-two #4222 removes: `.editor-body` in TaskEditorView.vue, a persisted `code_shapes` row whose signature ends in `*/` and whose `used_by` count is zero — so it has been sitting in the unused_css number the operator is meant to act on. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01821k5B3Ysecp9fNYs92Kuy --- tests/test_pattern_coverage.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_pattern_coverage.py b/tests/test_pattern_coverage.py index 2acaba0..1cfb0d3 100644 --- a/tests/test_pattern_coverage.py +++ b/tests/test_pattern_coverage.py @@ -89,6 +89,18 @@ EXTRACTION_VECTORS = [ "/* A real base rule, not just descendants: the check reads a\n" " .ghost, class that only ever appears as an ancestor */\n.check { }\n", [("css", "check")]), + # The rest of #2990's verify list, which this scan satisfies as written: + # a comment holding a WHOLE rule defines nothing, and an unterminated + # comment does not swallow the file. The phantom it was filed for — + # `.editor-body` out of a wrapped comment in TaskEditorView.vue, a + # persisted row with a `used_by` count of zero inflating unused_css — is + # among the twenty-two this removes. + ("comment-containing-a-whole-rule", + "/* .ghost {\n color: red;\n } */\n.real { color: blue; }\n", + [("css", "real")]), + ("unterminated-block-comment", + "/* never closed\n.after { color: red; }\n", + [("css", "after")]), # A string that HOLDS a comment marker is not a comment — the case that # made the first draft of the scan eat 70 lines of live code. ("string-holds-a-marker",