Skip to content

fix(#610): broaden /qa §10a user_facing regex to scoped conventional commits - #613

Merged
admarble merged 2 commits into
mainfrom
feature/610-fix-qa-broaden-10a-user-facing-regex-to-match-scop
May 9, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/610-fix-qa-broaden-10a-user-facing-regex-to-match-scop

Conversation

@admarble

@admarble admarble commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Broaden /qa §10a user_facing detection regex to match scoped conventional commits (feat(#NNN):, fix(area)!:).
  • Closes the dogfood gap from PR feat(#585): wire CHANGELOG gate into /qa §7 verdict algorithm #601 QA: §7 wiring was correct but the upstream §10a regex matched only unscoped form, so the gate silently no-op'd on sequant's own commits.

Why

/qa §10a's regex was ^[a-f0-9]+ (feat|fix|perf|refactor|docs):. Sequant uses scoped form on 26/26 audited recent commits (per QA review of #601). Result: user_facing=0 → changelog_required=false → §7 branch short-circuits → gate doesn't fire on the very /fullsolve 575 regression case the original issue (#585) cited.

New regex: ^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?: — accepts unscoped, scoped, breaking, scoped-breaking forms. Still rejects chore:, test:, ci:, build:, style: per conventional-commit semantics.

Changes

  • 3 SKILL.md mirrors — templates/skills/qa/SKILL.md + .claude/skills/qa/SKILL.md + skills/qa/SKILL.md:
    • Line 2328: regex broadened
    • Line 2312: caveat paragraph rewritten to enumerate prefix list with optional scope/!
  • CHANGELOG.md — entry under [Unreleased] / ### Changed documenting the broadening and dogfood gap closure

Diff: 4 files, +7/-6.

AC Coverage

AC Status Evidence
AC-1: Regex accepts unscoped/scoped/breaking/scoped-breaking ✅ MET 8/8 positive cases match (shell test)
AC-2: Still rejects non-user-facing prefixes ✅ MET 6/6 negative cases reject (chore:, test:, ci:, build(deps):, style:, wip:)
AC-3: §10a Caveat paragraph rewritten ✅ MET Enumerates feat/fix/perf/refactor/docs + optional scope (...) + breaking !
AC-4: All 3 SKILL.md mirrors byte-identical ✅ MET diff exit 0 on each pair
AC-5: Regression — unscoped still works; merged #585 detected ✅ MET OLD regex returns 0 hits against origin/main~5..origin/main; NEW finds dd6027b feat(#585):

Test plan

REGEX='^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?:'

# Positives (must ALL match)
for s in "feat(#585): x" "fix(area)!: x" "feat: x" "docs(#574): x" \
         "perf(api)!: x" "refactor: x" "docs!: x" "fix(#592): x"; do
  echo "abc1234 $s" | grep -qiE "$REGEX" && echo "✓ $s" || echo "✗ $s"
done

# Negatives (must ALL reject)
for s in "chore: x" "test: x" "ci: x" "build(deps): x" "style: x" "wip: x"; do
  echo "abc1234 $s" | grep -qiE "$REGEX" && echo "✗ leaked: $s" || echo "✓ rejected: $s"
done

# Dogfood: must detect the merged #585 commit
git log origin/main~5..origin/main --oneline | grep -iE "$REGEX"
# expected: contains "dd6027b feat(#585): wire CHANGELOG gate..."

# Mirror sync
diff .claude/skills/qa/SKILL.md skills/qa/SKILL.md \
  && diff .claude/skills/qa/SKILL.md templates/skills/qa/SKILL.md \
  && echo "All 3 mirrors byte-identical"

All commands above pass locally.

Closes #610

…ional commits

The §7 CHANGELOG gate wired by #585/PR #601 cannot fire on scoped
conventional-commit projects — including sequant itself. The §10a
detection regex matched only unscoped form (feat:, fix:), but sequant
uses scoped form (feat(#NNN):) on 26/26 audited recent commits, so
user_facing=0 → changelog_required=false → §7 branch short-circuits
→ gate effectively no-op'd on sequant's own dogfood (the very
/fullsolve 575 regression case the original issue cited).

Update regex from `(feat|fix|perf|refactor|docs):` to
`(feat|fix|perf|refactor|docs)(\([^)]*\))?!?:` across all three
qa/SKILL.md mirrors. The new pattern accepts unscoped, scoped,
breaking, and scoped-breaking forms; still rejects
chore:/test:/ci:/build:/style: per conventional-commit semantics.
Rewrite §10a "Caveat" paragraph to enumerate the prefix list with
optional scope and ! marker, so readers can predict gate triggering
without reading the regex.

Verified:
- 8/8 positive cases match (feat:, feat(#585):, feat!:, feat(scope)!:,
  fix(area)!:, docs!:, refactor:, fix(#592):)
- 6/6 negative cases reject (chore:, test:, ci:, build(deps):,
  style:, wip:)
- Dogfood: NEW regex detects merged dd6027b feat(#585):; OLD returns 0
- All 3 SKILL.md mirrors byte-identical post-edit
… of truth

Adversarial re-read after first-pass QA surfaced a missed sibling-site:
§7's verdict-algorithm prose at line 2056 was a duplicate spec of §10a's
detection regex, still describing the OLD unscoped prefix list
(feat:|fix:|perf:|refactor:|docs:). After fc5d5c2 broadened §10a's
regex to accept scoped/breaking variants, §7's prose became stale —
a reader following §7 to the letter would conclude scoped commits
don't trigger changelog_required, contradicting §10a's actual code.

Replace the inline prefix list in §7 with a pointer to §10a:
"changelog_required = true IFF §10a's user_facing count > 0 (single
source of truth — see §10a for the regex)". Eliminates the drift
surface; future regex changes only need to update §10a.

Sibling-site scan in /spec missed this because it grep'd for the
regex literal, not for prose descriptions of the prefix list.

Mirrored across all 3 qa/SKILL.md copies. Verified byte-identical.
@admarble
admarble merged commit 05496d7 into main May 9, 2026
8 checks passed
@admarble
admarble deleted the feature/610-fix-qa-broaden-10a-user-facing-regex-to-match-scop branch May 9, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(qa): broaden §10a user_facing regex to match scoped conventional commits

1 participant