Skip to content

fix(ac-parser): inferVerificationMethod matches keywords as substrings, not word boundaries #946

Closed

Description

@admarble

Motivation

inferVerificationMethod (src/lib/ac-parser.ts) matches verification keywords with plain substring .includes(), not word boundaries. Two live false positives, both found while planning/measuring #938:

  • inferVerificationMethod("The feature requires additional validation before merge.") → browser_test, because "ui" is a substring of "requires".
  • The same "ui" hit also fires inside "quick", "guidance", "building", and any other word containing the two-letter sequence.

The AC-6 measurement in #938 (PR #945) quantified the blast radius: running the (then-new) missing-evidence linter rule over the last 50 issues found 30/220 ACs flagged, and 17 of those 30 (57%) trace to this substring bug, not a genuine browser-test signal. "display" is a smaller instance of the same class.

Proposal

Anchor the single-word keywords (ui, api, click, display, dashboard, unit, etc.) to word boundaries (\bui\b) in VERIFICATION_KEYWORDS lookup, while leaving multi-word phrase keywords ("unit test", "end-to-end") as substring matches since those are already effectively self-anchoring.

The same fix applies to the sibling site in the same file: isGateTestEvidence matches GATE_TEST_KEYWORDS (flag, section, present, exists, ...) with the same substring .includes(), so "present" fires inside "represents" and "section" inside "intersection". Since real evidence text uses plurals ("flags are wired"), the gate-keyword anchoring is plural-tolerant (\bflags?\b). Scoped in as AC-4 (was originally deferred as a follow-up).

Acceptance Criteria

  • AC-1: inferVerificationMethod("The feature requires additional validation before merge.") returns manual, not browser_test. Evidence: npm test -- ac-parser (unit test asserting the exact string above)
  • AC-2: Existing keyword-match tests in ac-parser.test.ts (standalone "ui", "click", "dashboard", etc. as real words) continue to pass unchanged. Evidence: npm test -- ac-parser (full existing suite, zero regressions)
  • AC-3: Re-running the AC-6 measurement script from feat(spec/qa): explicit Evidence: clause on ACs — declared verification replaces keyword inference #938/PR feat(#938): explicit Evidence: clause on ACs — declared verification replaces keyword inference #945 over the same 50-issue corpus shows a reduced hit count for missing-evidence, with the reduction attributable to this fix. Evidence: rerun of gh issue list --repo sequant-io/sequant --limit 50 --state all --json number,body piped through the linter; counts recorded in the PR body
  • AC-4: isGateTestEvidence (sibling site, same file) anchors its single-word GATE_TEST_KEYWORDS to word boundaries with plural tolerance (e.g. \bflags?\b): evidence text like "represents each hit as a row" or "at the intersection of both corpora" no longer classifies as a gate test, "flags are wired" still does, and all existing isGateTestEvidence tests pass unchanged. Evidence: npm test -- ac-parser

Non-Goals

  • No change to multi-word phrase keywords ("unit test", "integration test", "end-to-end") — those are not affected by this bug class.
  • No change to the Evidence: clause / resolveVerificationMethod declared-evidence path from feat(spec/qa): explicit Evidence: clause on ACs — declared verification replaces keyword inference #938 — that already bypasses inference entirely when evidence is declared.
  • No change to MANUAL_REVIEW_NEGATIVE_SIGNALS — multi-word phrases, already self-anchoring (same rationale as the phrase keywords above).

Context

Follow-up from #938 (PR #945) — flagged in that PR's QA review rather than fixed there, since it's a broader change to inferVerificationMethod than the Evidence-clause feature's scope.

Activity

  1. added
    bug
    on Aug 13, 2026
  2. added 2 commits that reference this issue on Aug 13, 2026
  3. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    Spec Plan (Phase 1)

    Complexity: Standard (3 ACs, 1 directory)

    Acceptance Criteria

    Key findings from context gathering

    1. Root cause confirmed: src/lib/ac-parser.ts:151 — lowerDesc.includes(keyword) over VERIFICATION_KEYWORDS (lines 105–132). Single-word keys ui, api, unit, click, display, dashboard, etc. match inside longer words.
    2. One existing test asserts the buggy behavior: ac-parser.test.ts:617–627 ("declared evidence overrides… false keyword hit") contains expect(inferVerificationMethod(description)).toBe("browser_test") for the exact AC-1 string. That inline assertion must flip to "manual" and the comment reworded — the test's real subject (Evidence overrides inference) remains valid. This does not violate AC-2: it is an Evidence-override test, not a keyword-match test. All keyword-match tests (lines 486–535) use standalone real words ("Display user name", "Click button", "UI shows error") and pass unchanged under word boundaries.
    3. AC-3 causal chain verified: detectMissingEvidence (ac-linter.ts:366) fires when verificationMethod !== "manual" and no Evidence clause — so false browser_test inferences directly inflate its hit count; anchoring reduces it.
    4. Corpus drift risk for AC-3: gh issue list --limit 50 --state all today returns a different issue window than when feat(#938): explicit Evidence: clause on ACs — declared verification replaces keyword inference #945 ran (issues filed since then shift the window). To make the reduction attributable to this fix, fetch the corpus once, run the linter over the same snapshot twice — at the base commit and with the fix — and report before/after counts. Pin the same issue-number range as feat(#938): explicit Evidence: clause on ACs — declared verification replaces keyword inference #945's run if recoverable.

    Implementation Plan

    Phase 1: Fix + unit tests

    1. src/lib/ac-parser.ts — precompile a word-boundary regex per keyword at module scope (new RegExp(\b${escaped}\b), with regex-escaping), keep the existing longest-first precedence, replace the .includes() test at line 151. Recommend applying \b anchoring uniformly to all keywords: behavior-identical for multi-word phrases ("unit test", "end-to-end" — \b sits fine around hyphens), simpler than a split single/multi-word code path, and consistent with the Non-Goal (no behavioral change to phrase keywords).
    2. src/lib/ac-parser.test.ts — add AC-1's exact-string regression test inside the inferVerificationMethod describe block; update the line-617 test's inline assertion (browser_test → manual) and its comment.
    3. npm test -- ac-parser → AC-1 + AC-2 green.

    Phase 2: Measurement (AC-3)
    4. Fetch corpus snapshot once (gh issue list --limit 50 --state all --json number,body → file); run the missing-evidence linter over it at base commit and with the fix; record before/after hit counts (and how many of the eliminated hits trace to ui/display substring FPs) in the PR body.

    Design Review

    1. Where does this logic belong? Entirely inside inferVerificationMethod / VERIFICATION_KEYWORDS in src/lib/ac-parser.ts — it's the only substring-matching consumer; resolveVerificationMethod and callers are untouched.
    2. Simplest correct approach: uniform precompiled \b-anchored regexes. Rejected: keyword-by-keyword split (single-word regex vs multi-word .includes()) — two code paths for zero behavioral gain.
    3. Existing pattern: module-scope precompiled regex constants (EVIDENCE_CLAUSE_RE, UNIT_TEST_COMMAND_RE in the same file).
    4. Senior-reviewer challenge: "You just broke inflections — displays, clicks, clicked no longer match." True, and accepted (Open Question 1): inference is a fallback heuristic whose safe default is manual; the robust channel is the declared Evidence: clause from feat(spec/qa): explicit Evidence: clause on ACs — declared verification replaces keyword inference #938.

    Sibling Site (surfaced, not scoped in)

    GATE_TEST_KEYWORDS matching at ac-parser.ts:298 uses the same .includes() pattern with single-word keys — same bug class: "present" matches inside "represents", "section" inside "intersection", "flag" inside "camouflage". Not trivially co-located in risk: that classifier feeds the /qa §6i mutation gate (#939), and its substring behavior partially functions as useful stemming ("flag" → "flagged"). Recommend a follow-up issue with its own FP/FN analysis rather than widening this fix.

    Open Questions

    1. Accept inflection loss (displays/clicks/clicked → manual)? — Recommendation: yes, accept. Impact if wrong: some UI ACs infer manual and stop receiving the missing-evidence nudge — minor, and recoverable by adding explicit inflected keys later.
    2. File the GATE_TEST_KEYWORDS sibling as a follow-up issue? — Recommendation: yes (see above). Impact if skipped: known FP class persists in the gate-test classifier.

    Note: AC-linter flagged AC-2's etc. as open-ended (warning only) — the declared Evidence clause ("full existing suite, zero regressions") pins the scope, so no rewrite needed.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: disabled
    Reasoning: SCOPE_OK bug fix in one module. Testgen skipped despite two declared unit-test ACs: AC-1 is a single assertion added to an existing describe block and AC-2 is the pre-existing suite — stub generation adds only overhead here (simple-bug-fix carve-out).

  4. added
    planned
    on Aug 17, 2026
  5. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    Plan addendum — sibling scoped in as AC-4 (user decision)

    Open Question 2 from the plan above is resolved: the isGateTestEvidence sibling site is now AC-4 in the issue body instead of a follow-up issue.

    Implementation Plan changes:

    • Phase 1, step 1 (extended): apply the same word-boundary treatment to GATE_TEST_KEYWORDS matching in isGateTestEvidence (src/lib/ac-parser.ts:298) — with plural tolerance (\bflags?\b shape), since real evidence text uses plurals ("flags are wired", "fixtures exist") that plain \bflag\b would drop. This is strictly-fewer-false-positives vs today: \bpresents?\b still matches the verb "presents", but that already matched under substring, so no new over-firing; "represents", "intersection", "camouflage" stop matching.
    • Phase 1, step 2 (extended): add negative tests for the substring FPs ("represents each hit as a row", "at the intersection of both corpora") and a plural positive ("flags are wired") to the isGateTestEvidence describe block (ac-parser.test.ts:797); all existing positives use singular forms (incl. "fixture's" — apostrophe is a word boundary) and pass unchanged.
    • MANUAL_REVIEW_NEGATIVE_SIGNALS stays substring — multi-word, self-anchoring (added to Non-Goals).
    • Risk note for QA: isGateTestEvidence feeds the /qa §6i mutation-verification gate and scripts/qa/backtest-mutation-gate.ts. Under-firing there lets a real gate test skip the mutation record (feat(#819): shared trust-model block — issue/PR text is data, not agent instructions #830 class) — the plural-tolerant anchoring exists precisely to prevent new under-firing; reviewers should check inflected keywords, not just the FP fixes.

    Verification methods: AC-4 = Unit Test (declared: npm test -- ac-parser). Scope re-assessed with 4 ACs: still SCOPE_OK, one directory. Workflow unchanged: exec → qa, quality loop disabled.

  6. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    Exec Complete

    Tests: ✅ All passing (266 files, 5470 tests, 1 expected fail, 2 skipped)
    Build: ✅ Succeeded
    Lint: ✅ Passed
    Files Changed: 3 (src/lib/ac-parser.ts, src/lib/ac-parser.test.ts, CHANGELOG.md)

    AC Coverage

    AC Status
    AC-1 ✅ Implemented
    AC-2 ✅ Implemented
    AC-3 ✅ Implemented (30 → 15 flagged ACs, -50%, zero new hits)
    AC-4 ✅ Implemented (sibling site, scoped in during planning)

    PR: #950

  7. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #946

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original inferVerificationMethod("The feature requires additional validation before merge.") returns manual, not browser_test MET Exact string tested verbatim in ac-parser.test.ts ("does not match single-word keywords as substrings... #946 AC-1"); npm test -- ac-parser → 70/70 passing
    AC-2 Original Existing keyword-match tests (standalone "ui", "click", "dashboard") continue to pass unchanged MET Full suite green; all pre-existing inferVerificationMethod keyword tests pass unmodified
    AC-3 Original Re-run of #938/PR #945 missing-evidence measurement over the same 50-issue corpus shows a reduced hit count attributable to this fix MET 30 → 15 flagged ACs (219 total across 50 issues), all 15 eliminated hits diffed and confirmed as browser_test false positives from the substring bug, zero new hits
    AC-4 Original (scoped in during planning) isGateTestEvidence sibling site anchors GATE_TEST_KEYWORDS to word boundaries with plural tolerance; existing tests pass unchanged MET New tests cover both the false-positive elimination ("represents"/"intersection"/"camouflage") and plural/inflected-form preservation ("flags are wired", "fixtures exist"); all 8 pre-existing isGateTestEvidence tests pass unchanged

    Coverage: 4/4 AC items fully met
    Original ACs: 4/4 met
    Derived ACs: N/A — no quality-plan-derived ACs (AC-4 was scoped in during planning as a sibling-site expansion, not a QA-derived AC)


    Quality Plan Verification

    N/A — no Feature Quality Planning section in the spec comment (Standard-tier bug fix; spec output omitted this section by design).


    Precheck Findings

    Section Status Surfaced
    Fixtures not_applicable No motivating-example payload block in issue body (the AC-1 code sample is inline prose, not a fenced/quoted fixture — exercised directly as a test case regardless)
    Sibling-grep pass 7 new identifiers (escapeRegExp, keywordMatcher, VERIFICATION_KEYWORD_MATCHERS, GATE_TEST_PLURAL_KEYWORDS, GATE_TEST_SINGULAR_KEYWORDS, GATE_TEST_PHRASE_KEYWORDS, GATE_TEST_KEYWORD_MATCHERS) — all internal to ac-parser.ts, zero cross-file sibling sites (expected: none are exported)
    AC literal-diff fail (false positive) Flagged "AC-6" as missing from the PR body. Confirmed false positive by inline fallback: the issue body has no AC-6 checkbox — parseAcceptanceCriteria returns exactly AC-1..AC-4, and "AC-6" only appears inside AC-3's own prose ("the AC-6 measurement script from #938/PR #945"), a reference to a different issue's AC. PR body's table (AC-1..AC-4) is complete.

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    validate-plugin SUCCESS pass ✅ MET
    build (22.x) SUCCESS pass ✅ MET
    node-floor-guard SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET
    typecheck SUCCESS pass ✅ MET

    CI Summary: 5 passed, 0 pending, 0 failed
    CI-related AC items: None of AC-1..AC-4 name CI explicitly; all gating checks green.


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 files (1 test renamed/superseded, net +4 tests) OK
    Files changed 3 OK
    Lines added +138 -
    Lines deleted -29 -

    Cache Status

    N/A — caching not exercised this run (fresh QA, no prior cached checks for this diff hash).


    Build Verification

    N/A — build passed (npm run build, no errors; also confirmed via CI typecheck/build (22.x)).


    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    src/lib/ac-parser.ts Standard ✅ Yes src/lib/ac-parser.test.ts
    src/lib/ac-parser.test.ts Optional (test file) - -
    CHANGELOG.md Optional - -

    Coverage: 1/1 changed source file has corresponding tests
    Critical paths without tests: None — no auth/payment/security/server-action/middleware/admin paths touched


    Code Review

    Strengths:

    • Minimal, surgical fix: a single keywordMatcher() helper reused for both VERIFICATION_KEYWORDS and the sibling GATE_TEST_KEYWORDS, avoiding duplicated anchoring logic.
    • Precompiled regex matchers at module scope (matches the existing pattern in the file — EVIDENCE_CLAUSE_RE, UNIT_TEST_COMMAND_RE) rather than compiling per-call.
    • Plural-tolerance design (fixture, section, flag, present → optional trailing s) is narrowly scoped to the keywords likely to appear inflected in evidence prose, not applied blanket — avoids reintroducing false positives on keywords with no natural plural (wired, exists, registered).
    • Regex-escaping (escapeRegExp) correctly guards against keyword literals containing regex metacharacters, though none of the current keyword lists happen to contain any.
    • Multi-word phrases ("unit test", "skill gate", "mutation-verified") deliberately left as \b-anchored-but-unchanged-behavior, consistent with both issues' Non-Goals.
    • Stale {@link GATE_TEST_KEYWORDS} JSDoc reference caught and corrected to {@link GATE_TEST_KEYWORD_MATCHERS} in the same diff.

    Issues:

    • None found.

    Suggestions:

    • None — the diff is proportional to the AC and doesn't introduce speculative abstraction.

    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK All new tests assert on inferVerificationMethod/isGateTestEvidence return values, not internals
    Coverage Depth ✅ OK Both false-positive-elimination and true-positive-preservation cases covered for each of AC-1/AC-2 and AC-4
    Mock Hygiene ✅ OK No mocks — pure function tests
    Test Reliability ✅ OK Deterministic string fixtures, no timing/network dependencies

    Issues Found:

    • None. (One self-caught issue during authoring: the first AC-4 substring-FP test used "presents" — a legitimate standalone inflection that correctly matches — rather than "represents"; corrected before commit and verified against the actual \b boundary semantics.)

    Anti-Pattern Detection

    Dependency Audit

    N/A — no package.json changes.

    Code Patterns

    File:Line Category Pattern Suggestion
    — — None found —

    Critical Issues: 0
    Warnings: 0


    Call-Site Review

    N/A — no new exported functions. escapeRegExp, keywordMatcher, and all *_KEYWORD_MATCHERS/*_KEYWORDS constants are module-internal (unexported); inferVerificationMethod and isGateTestEvidence remain exported with unchanged signatures.


    Execution Evidence

    N/A — no scripts/ or CLI files modified.


    Skill Command Verification

    N/A — no .claude/skills/**/*.md files changed.


    Detection Pattern Verification

    N/A — no skill markdown files touched (precondition false; section omitted per §6c guidance).


    CLI Registration Verification

    N/A — no option interfaces or bin/cli.ts modified.


    Smoke Test

    Not Required — no skill/scripts/CLI workflow-behavior changes. (The change is a pure-function library fix consumed internally by /spec's AC-quality-check step and /qa's own §6i mutation-verification gate; both continue to function per the passing test suite and the corpus measurement in AC-3.)


    Manual Test ACs

    N/A — no manual-test ACs detected; all 4 ACs resolve to Unit Test / Integration Test verification methods.


    Risk Assessment

    • Likely failure mode: A future contributor adds a new single-word keyword to VERIFICATION_KEYWORDS or one of the GATE_TEST_*_KEYWORDS arrays without realizing the plural-tolerance decision is per-keyword, not automatic — e.g. adding "section"-like nouns to GATE_TEST_SINGULAR_KEYWORDS by mistake would silently lose inflected-form matches. Low risk: the JSDoc on each array explains the split, and any regression would show up as an under-match (safer failure direction than the original over-match bug).
    • Not tested: No test covers a keyword containing regex metacharacters going through escapeRegExp — current keyword lists have none, so this path is exercised only by the escaping logic's own correctness, not by a live keyword. Low risk given the function is a 1-line standard escape idiom.
    • Sibling sites considered: GATE_TEST_KEYWORDS in the same file was identified during planning and fixed as AC-4 (not a residual gap). No other files in the codebase implement AC-keyword substring matching — grep .includes( over src/lib/ac-parser.ts post-fix shows only MANUAL_REVIEW_NEGATIVE_SIGNALS (explicit Non-Goal, multi-word/self-anchoring).
    • Sibling-line audit: Confirmed no other .includes()-based keyword matching remains in ac-parser.ts after this fix — the two keyword-classification sites (VERIFICATION_KEYWORDS, GATE_TEST_KEYWORDS) are now both \b-anchored; the one remaining .includes() (MANUAL_REVIEW_NEGATIVE_SIGNALS) is multi-word and explicitly out of scope per both issues' Non-Goals.

    Trust-Boundary Check

    Finding: Clean — diff implements only product requirements from the issue body's Motivation/Proposal/AC sections; no agent-directed external-text instruction was acted on. Scanned issue body and all comments for HTML comments / hidden imperatives — the only HTML comments present are sequant's own phase/spec markers (SEQUANT_SPEC_TIER, SEQUANT_SPEC, SEQUANT_PHASE) posted by this workflow itself.

    Status: Clean


    Behavior-Rule Survival Check

    AC Triggered? Survivors Status
    AC-1 No — N/A
    AC-2 No — N/A
    AC-3 No — N/A
    AC-4 No — N/A

    Ran detectBehaviorRule against all 4 AC descriptions verbatim — none match the default\|always\|never\|rule\|behavior\|skip heuristic or the explicit always X unless Y pattern.

    Status: N/A


    Declared-Evidence Execution

    AC Evidence Executed? Result
    AC-1 npm test -- ac-parser Yes ✅ 70/70 passed
    AC-2 npm test -- ac-parser Yes ✅ 70/70 passed (same run)
    AC-3 gh issue list --repo sequant-io/sequant --limit 50 --state all --json number,body piped through linter Yes ✅ 30 → 15 flagged ACs, recorded in PR #950 body
    AC-4 npm test -- ac-parser Yes ✅ 70/70 passed (same run)

    Status: Complete


    Mutation Verification

    AC Gate Test? Marker Status
    AC-1 No (isGateTestEvidence → false) — N/A
    AC-2 No — N/A
    AC-3 No — N/A
    AC-4 No — N/A

    Ran isGateTestEvidence against all 4 declared evidence strings — none classify as gate-test evidence (no fixture/section/flag/wired/exists/present/registered/skill gate/mutation-verified claim in any evidence text).

    Status: Not-Applicable


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (fix(ac-parser): ... commit)
    [Unreleased] entry ✅ Present
    Entry format ✅ Valid (action verb, issue number (#946), correct ### Fixed section)

    Result: CHANGELOG requirements met


    Adversarial Re-Read

    Findings: No gaps found because:

    1. Fixtures: the issue's one motivating example — inferVerificationMethod("The feature requires additional validation before merge.") — is run verbatim as a test assertion in AC-1's test (not merely referenced in prose).
    2. Evidence-claims audited: AC-3's 30→15 measurement is a genuine before/after comparison over an identical corpus snapshot (fetched once, linted twice), not a pre-fix repro dressed up as validation — confirmed by diffing the eliminated-hit list issue-by-issue and verifying all 15 trace to the substring bug with zero new hits.
    3. Process state inspected: worktree is clean (git status --short empty), single commit ahead of origin/main, no relevant stashes.
    4. Sibling sites cited: cross-file (§5) — none, confirmed via precheck's sibling-grep (all new identifiers unexported, zero external references) and manual grep of .includes( showing no other substring-keyword-matching code elsewhere in the codebase. Intra-file (§4 Q5) — the GATE_TEST_KEYWORDS sibling in the same file was found during planning and is itself AC-4, not a residual gap; post-fix grep confirms no third .includes()-based keyword site remains.
    5. Non-Goals checked: both issues' Non-Goals (no change to multi-word phrase keywords; no change to MANUAL_REVIEW_NEGATIVE_SIGNALS) are respected — MANUAL_REVIEW_NEGATIVE_SIGNALS is untouched in the diff, and phrase keywords keep identical matching behavior under \b anchoring (verified analytically: \b sits correctly around spaces/hyphens).

    Status: Clean


    Verdict: READY_FOR_MERGE

    All 4 ACs are MET with executed, verified evidence. Quality checks (type safety, scope/size, security) all pass. CI is fully green (5/5 checks). No trust-boundary, mutation-verification, or behavior-rule concerns apply. Adversarial re-read surfaced no gaps. The fix is minimal, well-tested (5 new regression tests covering both directions of the bug), and its corpus-level impact is measured and recorded (30→15 false positives eliminated, zero new false positives introduced).

    Documentation

    • N/A - Bug fix, no README/docs update needed beyond the CHANGELOG entry already added

    Next Steps

    1. Merge PR fix(ac-parser): inferVerificationMethod matches keywords as substrings, not word boundaries (#946) #950.
    2. No follow-up required — the one sibling scope decision (GATE_TEST_KEYWORDS) was already folded into this PR as AC-4 rather than deferred.
  8. added
    ready-for-review
    on Aug 17, 2026
  9. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #946
    Status: READY_FOR_MERGE

    Summary

    • AC: 4/4 met
    • Tests: 70/70 (ac-parser.test.ts) + full suite 266 files / 5470 tests passing
    • QA: All checks passed — type safety, scope/size, security scans PASS; CI 5/5 green; adversarial re-read Clean; trust-boundary Clean; declared-evidence Complete; mutation-verification N/A (no gate-test ACs)

    Progress

    Phase Iterations Status
    Spec 1/1 Complete (AC-4 sibling scoped in via follow-up discussion before exec)
    Exec 1/1 Complete
    Test N/A Skipped — no ui/frontend/admin label
    QA 1/2 Complete — READY_FOR_MERGE on first pass

    AC Coverage

    AC Status
    AC-1 MET
    AC-2 MET
    AC-3 MET (measured: 30 → 15 false-positive missing-evidence hits, zero new hits)
    AC-4 MET

    Risk Assessment

    • Likely failure mode: Low — a future contributor could add a plural-tolerant keyword to the wrong list (GATE_TEST_SINGULAR_KEYWORDS instead of GATE_TEST_PLURAL_KEYWORDS), silently losing an inflected-form match. Fails safe (under-match, not over-match).
    • Not tested: No live keyword currently contains regex metacharacters, so escapeRegExp's correctness isn't exercised by a real keyword path — low risk, standard escape idiom.

    PR: #950


    PR is green and QA-approved. Merge is left for human confirmation rather than auto-merged, per this session's default of confirming shared-state actions (pushing/merging) unless explicitly pre-authorized.

  10. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    Gaps closed (post-QA follow-up)

    The two gaps flagged in QA review — no direct test for keywordMatcher's metacharacter-escaping path, and no regression pin on which GATE_TEST_* keywords are plural-tolerant — are now fixed in 04894832:

    • keywordMatcher exported as @internal (testing only) with 4 new direct tests: metacharacter escaping ("a+b" keyword, proving + isn't misread as a regex quantifier) and allowPlural on/off.
    • 2 new tests pin down which keywords are plural-tolerant (fixture/section/flag/present) vs. not (wired/exists/registered) — a future accidental list-swap now fails a test instead of silently changing match behavior.

    Test-only diff, no production logic changed. Full suite: 266 files / 5476 passing (+6 from this commit), build and lint clean.

    Caught and fixed two bugs in my own first draft of these tests along the way: a \b-boundary edge case (a keyword ending in a non-word character never satisfies \b against adjacent non-word text — picked a bad example, not a real defect) and a test-string collision ("flag" used as filler text in a sentence meant to isolate "registered", where "flag" is itself a separate matching keyword).

  11. admarble commented on Aug 17, 2026

    @admarble
    ContributorAuthor

    Merged

    PR #950 squash-merged to main at b0bb088d. Feature branch and worktree cleaned up.

    Post-merge verification:

    • npm run build — ✅ passed
    • npx sequant doctor — ✅ 16/18 checks pass (2 pre-existing, unrelated warnings: skills-version drift, missing AGENTS.md)

    Issue closed automatically via the PR's Closes #946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplannedready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions