Skip to content

fix(#461): use exact label matching instead of substring includes() - #463

Merged
admarble merged 2 commits into
mainfrom
feature/461-use-exact-label-matching-instead-of-substring-incl
Mar 26, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/461-use-exact-label-matching-instead-of-substring-incl

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Replace label.includes(targetLabel) with label === targetLabel across all 9 call sites in phase-mapper.ts (6 sites) and batch-executor.ts (3 sites)
  • Add 6 regression tests verifying substring labels like "docstring", "debugging", "patchwork", "webinar", "complexity", and "insecurity" do NOT trigger pipelines
  • Add hasUILabels() exact matching tests (derived AC-5 from spec)

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Replace includes() with === in phase-mapper.ts ✅ 6 sites at L62-84, L175
AC-2 Update batch-executor.ts inline checks ✅ 3 sites at L468-474, L693
AC-3 Existing tests pass unchanged ✅ 16 existing tests pass
AC-4 Regression tests for substring non-matching ✅ 6 new tests added
AC-5 Fix hasUILabels() exact matching ✅ L175 + 2 new tests

Test plan

  • All 22 phase-mapper tests pass (16 existing + 6 new)
  • Build passes (npm run build)
  • Lint passes (npm run lint)

Closes #461

🤖 Generated with Claude Code

Replace label.includes() with exact equality (===) across all 9 call
sites in phase-mapper.ts and batch-executor.ts to prevent substring
collisions (e.g. "docstring" matching "docs", "debugging" matching "bug").
Add regression tests for substring non-matching.
@admarble
admarble merged commit 0fb1b89 into main Mar 26, 2026
5 checks passed
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.

Use exact label matching instead of substring includes() for phase detection

1 participant