Repository navigation
fix(detector): require a vague close for false-concession - #359
Conversation
…don#211) Only flag "while X is impressive" / "although X has made strides" when a vague second half ("remains a challenge", "is still an open question", "there is still work to do", "remain unanswered") closes the same sentence, and widen the subject past a single word. A bare opener followed by a specific, concrete continuation no longer flags. Drop the bare "despite X challenges" opener entirely: alone it is too common a shape in ordinary prose to carry the tell. Remove the now-covered false-concession entry from detector/categories.test.js's LEGACY_UNCOVERED_TYPES.
…onorbronsdon#211 Run the two required sync scripts so the bundled skill/plugin/cursor copies of the false-concession fix reach parity with the canonical detector/patterns.js, matching CONTRIBUTING.md's post-edit sync step. Rewrite the CHANGELOG entry as a single quoted clause. CHANGELOG.md is long enough that self-scan.js scores it in ~4000-word chunks by worst chunk, and this file sits close enough to a chunk boundary that any unquoted prose added to the Fixed section's paragraph shifts the split and concentrates an unrelated high-scoring passage into a small, high-density chunk, failing npm run self-scan:check. Quoting the description applies the same quoted-example exemption the tool already documents for text that is itself about an AI-writing pattern, keeping the entry descriptive while staying inside the budget.
PR Summary by QodoRequire a vague close to flag false concessions
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
…onorbronsdon#359) The false-concession fixture for conorbronsdon#211 padded the reported sentence with "still" to clear the ten-word scoring minimum, leaving the exact nine-word example untested: analyzed alone it returns before FALSE_CONCESSION runs. Add a regression covering both outcomes: the exact sentence alone stays too-short with no issues (existing behavior, unchanged), and the same sentence within a longer input is flagged as false-concession. The global minimum-word threshold is untouched.
…loses (conorbronsdon#211) "there is still work to do" had no trailing \b, so it matched as a bare prefix of "download" and flagged Qodo's example sentence ("...there is still work to download the update.") as false-concession. Add \b after the grouped closing alternatives and cover both the must-not-fire download sentence and a must-fire case ending in the actual phrase "work to do".
… close (conorbronsdon#359) The FALSE_CONCESSION gap let the vague close match inside the opening "while"/"although" clause itself, with no clause break between "is impressive" and the close. "While the model is impressive and remains a challenge to maintain, we plan to replace it next month" matched both phrases in the opening clause and never considered the concrete main clause that followed, missing conorbronsdon#211's two-half concession structure. Require a comma, semicolon or colon between the opener and the vague close so it can only match in the following clause. Add the reported sentence as a must-not-fire fixture and a paired must-fire example with the same close moved into the second clause. The sentence- boundary restriction (no match across ./!/?) is unchanged.
…o attribution (conorbronsdon#359) Review on conorbronsdon#359 accepted the clause-separator fix for the false-concession close but flagged two gaps: the abbreviation-period limit it implies was neither documented nor tested, and a must-not-fire fixture labeled "Qodo's own example" used wording Qodo never wrote. Comment beside FALSE_CONCESSION_GAP that a period inside an abbreviation ("U.S.", "e.g.") ends the gap like any other sentence boundary, so a close past one is deliberately missed rather than risk the boundary guarantee, and that only a comma, semicolon or colon counts as the separator. Add a must-not-fire fixture for that limitation. Add Qodo's exact reported sentence as its own fixture, and correct the existing "download the update" fixture's comment to say it is a variant, not verbatim.
Summary
Fixes #211.
FALSE_CONCESSIONonly checked the opener ("while X is impressive") and also matched a baredespite ... challengesform, so it flagged ordinary sentences like "Despite these challenges, the team shipped on schedule". This change requires a vague second half in the same sentence (e.g. "remains a challenge"), matching the two-half shapereferences/patterns.mddocuments, and drops the baredespiteform. Added must-fire/must-not-fire fixtures and synced the generated copies.Checklist
npm testpasses (engine fixtures +CATEGORIES.mdcontract check)SKILL.md,references/patterns.md, ordetector/: I ranbash scripts/sync-plugin-skill.sh && bash scripts/sync-cursor-rules.shand committed the generated changesnpm run self-scan:checkpasses.ssot-local.yaml: I updated any affected manifest patterns and ranpython3 ../ssot-check/ssot_check.py check --manifest .ssot-local.yamlusing the checker setup instructionstype: it's documented indetector/CATEGORIES.mdand has a fixture indetector/patterns.test.js(a true positive and a must-not-fire case)detector/CATEGORIES.mdCHANGELOG.mdentry for a user-facing change, or this PR is exempt under the changelog policy###inreferences/patterns.md: the**NN pattern categories**bullet inREADME.mdand the quoted count inCLAUDE.mdmatchscripts/check-pattern-count.shOnly
npm testandself-scan:checkare commands I ran and saw pass on this HEAD; the rest don't apply here (no new type, no release, no ssot prose), so left unticked.🤖 Generated with Claude Code