Repository navigation
fix(ac-parser): inferVerificationMethod matches keywords as substrings, not word boundaries (#946) - #950
Merged
admarble merged 2 commits intoAug 17, 2026
Conversation
…s, not word boundaries (#946) VERIFICATION_KEYWORDS and the sibling GATE_TEST_KEYWORDS (isGateTestEvidence) matched single-word keywords via `.includes()`, so "ui" matched inside "requires", "quick", "guidance", "building"; "display" had the same class of false positive. Both now use \b-anchored regexes; multi-word phrases ("unit test", "skill gate", "mutation-verified") are unchanged since they were already effectively self-anchoring. Gate-test keywords likely to appear inflected in evidence prose (fixture, section, flag, present) tolerate an optional trailing "s" so anchoring doesn't lose plural/verb forms. Re-ran the #938/PR #945 missing-evidence measurement over the same 50-issue corpus: 30 -> 15 flagged ACs, all 15 eliminated hits confirmed as browser_test false positives from the substring bug, zero new hits. Fixes #946
Closed
4 tasks
- Export keywordMatcher (@internal, testing only) and add direct unit tests for it: metacharacter escaping ("a+b" keyword — proves the literal isn't misinterpreted as a regex quantifier) and allowPlural on/off behavior. - Add a regression-pinning test locking down which GATE_TEST_* keywords are plural-tolerant (fixture/section/flag/present) vs not (wired/exists/registered), so a future accidental list-swap fails a test instead of silently changing match behavior. Test-only diff — no production logic changed.
admarble
deleted the
feature/946-fix-ac-parser-inferverificationmethod-matches-
branch
August 17, 2026 13:41
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inferVerificationMethod(VERIFICATION_KEYWORDS) matched single-word keywords via.includes(), so"ui"matched inside"requires","quick","guidance","building";"display"had the same class of false positive. Now\b-anchored.isGateTestEvidence(GATE_TEST_KEYWORDS) had the identical substring bug —"present"inside"represents","section"inside"intersection","flag"inside"camouflage"— this classifier feeds the feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939 §6i mutation-verification gate. Now\b-anchored with optional trailing"s"on the four keywords most likely to appear inflected in evidence prose (fixture,section,flag,present), so"flags are wired"and"fixtures exist"still match."unit test","end-to-end","skill gate","mutation-verified") are unchanged — they were already effectively self-anchoring under substring matching.Pre-PR AC Verification
inferVerificationMethod("The feature requires additional validation before merge.")returnsmanualsrc/lib/ac-parser.test.ts— "does not match single-word keywords as substrings of unrelated words (#946 AC-1)""ui","click","dashboard") continue to pass unchangedac-parser.test.tssuite, 70/70 passingbrowser_testfalse positives from the substring bug, zero new hitsisGateTestEvidencesibling site anchorsGATE_TEST_KEYWORDSto word boundaries with plural tolerance; existing tests pass unchangedsrc/lib/ac-parser.test.ts— "should not match single-word gate-test keywords as substrings..." + "should match plural/inflected forms..." (#946 AC-4); all 8 pre-existingisGateTestEvidencetests pass unchangedMeasurement detail (AC-3)
Corpus fetched once via
gh issue list --repo sequant-io/sequant --limit 50 --state all --json number,body, linted at base commit (f81f85e) and with this fix, over the identical snapshot:missing-evidencehitsAll 15 eliminated hits were
browser_testinferences on ACs whose description contained the substring"display"or"ui"inside an unrelated word (e.g.displaySummary,guidance) — confirmed by diffing the hit list issue-by-issue. Zero new hits appeared after the fix.Test plan
npm test -- ac-parser— 70/70 passingnpm run build— passesnpm run lint— passesnpm test) — 266 test files, 5470 tests passing, 1 expected fail, 2 skippedCloses #946