You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use exact label matching instead of substring includes() for phase detection #461
Replace label.includes() with === in phase-mapper.ts
detectPhasesFromLabels(["docstring"]) → standard phases
Unit Test
AC-2
Update batch-executor.ts inline checks
3 call sites at L469, L474, L694
Unit Test
AC-3
Update existing tests for exact matching
All existing tests pass unchanged
Unit Test
AC-4
Regression tests for substring non-matching
"docstring" ≠ docs, "debugging" ≠ bug
Unit Test
AC-5 (derived)
Fix hasUILabels() at L175
hasUILabels(["webinar"]) → false
Unit Test
Implementation Plan
Phase 1: Fix phase-mapper.ts (AC-1, AC-5)
Replace 5 .includes() → === in detectPhasesFromLabels() (L62-84)
Replace 1 .includes() → === in hasUILabels() (L175)
Phase 2: Fix batch-executor.ts (AC-2)
Replace 3 .includes() → === at L469, L474, L694
Phase 3: Tests (AC-3, AC-4)
Verify existing tests pass (they use exact label names)
Add regression tests: "docstring", "debugging", "patchwork", "webinar" must NOT trigger any pipeline shortcut
Conflict Note
Issue #460 (batch-executor tests) has an open worktree but no changes yet. Recommend merging #461 first, then #460 adjusts tests to assert exact matching.
Comprehensive regression tests covering all 5 label arrays plus hasUILabels
Tests verify both positive matches (exact labels) and negative matches (substring collisions)
Exports DOCS_LABELS and BUG_LABELS for test access — clean approach
Issues: None
Note:doctor.ts:87 retains .includes() for SKIP_ISSUE_LABELS — this is correctly out of scope (different feature, different matching semantics for user-defined skip labels).
Anti-Pattern Detection
No anti-patterns detected. Change is a simple equality substitution.
Test efficacy: High — tests directly verify the fix by asserting substring labels DON'T match
Likely failure mode: A new label array added in future using .includes() by copy-paste from old pattern — mitigated by test precedent
Verdict confidence: High — mechanical fix, thorough tests, all CI green
CHANGELOG Verification
Result: Missing entry for bug fix. This is a correctness fix for label matching. Recommend adding:
- Fix label matching to use exact equality instead of substring includes (#461)
Verdict: READY_FOR_MERGE
Clean, focused bug fix. All 4 ACs met. All 9 .includes() → === substitutions verified. 22 regression tests cover every label array. CI passes. Only recommendation is adding a CHANGELOG entry.
Activity
admarble commentedon Mar 26, 2026
→ PROCEED — Clear ACs, all referenced files exist, straightforward fix
exec → qa · 4 ACs · -q · --skip-spec
admarble commentedon Mar 26, 2026
Spec Plan — #461: Exact Label Matching
AC Checklist with Verification Criteria
label.includes()with===inphase-mapper.tsdetectPhasesFromLabels(["docstring"])→ standard phasesbatch-executor.tsinline checks"docstring"≠ docs,"debugging"≠ bughasUILabels()at L175hasUILabels(["webinar"])→ falseImplementation Plan
Phase 1: Fix
phase-mapper.ts(AC-1, AC-5).includes()→===indetectPhasesFromLabels()(L62-84).includes()→===inhasUILabels()(L175)Phase 2: Fix
batch-executor.ts(AC-2).includes()→===at L469, L474, L694Phase 3: Tests (AC-3, AC-4)
"docstring","debugging","patchwork","webinar"must NOT trigger any pipeline shortcutConflict Note
Issue #460 (batch-executor tests) has an open worktree but no changes yet. Recommend merging #461 first, then #460 adjusts tests to assert exact matching.
Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Mechanical find-and-replace fix, clear AC, no ambiguity.
Total: 9 call sites across 2 files. All changes are
label.includes(x)→label === x.fix(#461): use exact label matching instead of substring includes()
admarble commentedon Mar 26, 2026
Exec Progress Update
AC Coverage
includes()with===inphase-mapper.tsbatch-executor.tsinline checkshasUILabels()exact matchingKey Files Changed
src/lib/workflow/phase-mapper.ts— 6.includes()→===src/lib/workflow/batch-executor.ts— 3.includes()→===src/lib/workflow/phase-mapper.test.ts— 6 regression tests + 2hasUILabelstestsChecks
npm run buildnpm run lintnpm test(phase-mapper)PR
Created: #463
Quality Plan Alignment
N/A — No quality plan in issue
admarble commentedon Mar 26, 2026
QA Review for Issue #461
AC Coverage
label.includes()with===inphase-mapper.tsisBugFix,isDocs,isUI,isComplex,isSecurity,hasUILabelsbatch-executor.tsinline checksdocstring,debugging,patchwork,webinar,complexity,insecurityhasUILabels()exact matchingCoverage: 5/5 AC items fully met
CI Status
build (20.x)build (22.x)typecheckvalidate-skillsvalidate-pluginCI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
any)Test Coverage Analysis
src/lib/workflow/phase-mapper.tsphase-mapper.test.ts(22 tests)src/lib/workflow/batch-executor.tssrc/lib/workflow/phase-mapper.test.tsCoverage: 2/2 changed source files have corresponding tests
Code Review
Strengths:
.includes()→===with no extraneous changeshasUILabels()which the original ACs missedIssues: None
Suggestions: None — this is a minimal, focused fix
Anti-Pattern Detection
Code Patterns
No anti-patterns detected. All changes are
label.includes(x)→label === x.Zero remaining
label.includes()calls in the workflow directory (verified via grep).Test Quality Review
CHANGELOG Verification
Result: Add entry under
### Fixedbefore merging: "Fix substring label matching in phase detection — use exact equality (#461)"Self-Evaluation
label.includes()remain.docstring≠ docs, etc.)Verdict: READY_FOR_MERGE
Clean, focused fix. All 5 ACs met. 22/22 tests pass. CI green. No remaining
label.includes()calls.Documentation
### FixedNext Steps
Fix substring label matching in phase detection — use exact equality (#461)under### Fixedin[Unreleased]admarble commentedon Mar 26, 2026
QA Review for Issue #461
AC Coverage
.includes()with===inphase-mapper.tsdetectPhasesFromLabels(BUG, DOCS, UI, COMPLEX, SECURITY) +hasUILabelsbatch-executor.tsinline checks.includes()→===(BUG_LABELS, DOCS_LABELS ×2)phase-mapper.test.tswith 22 tests covering all label categoriesdocstring,debugging,patchwork,webinar,complexity,insecurityCoverage: 4/4 AC items fully met
CI Status
build (20.x)build (22.x)typecheckvalidate-skillsvalidate-pluginCI Summary: 5/5 passed
Quality Metrics
any)Test Coverage Analysis
phase-mapper.tsphase-mapper.test.ts(new, 22 tests)batch-executor.tsCoverage: 2/2 changed source files have corresponding tests
Code Review
Strengths:
.includes()→===, nothing else changedhasUILabelsDOCS_LABELSandBUG_LABELSfor test access — clean approachIssues: None
Note:
doctor.ts:87retains.includes()forSKIP_ISSUE_LABELS— this is correctly out of scope (different feature, different matching semantics for user-defined skip labels).Anti-Pattern Detection
No anti-patterns detected. Change is a simple equality substitution.
Self-Evaluation
.includes()by copy-paste from old pattern — mitigated by test precedentCHANGELOG Verification
Result: Missing entry for bug fix. This is a correctness fix for label matching. Recommend adding:
Verdict: READY_FOR_MERGE
Clean, focused bug fix. All 4 ACs met. All 9
.includes()→===substitutions verified. 22 regression tests cover every label array. CI passes. Only recommendation is adding a CHANGELOG entry.Next Steps
[Unreleased] > Fixeddocs: add CHANGELOG entry for exact label matching fix (#461)
fix(#461): use exact label matching instead of substring includes() (#…
admarble commentedon Mar 26, 2026
Documentation Generated
File:
docs/features/exact-label-matching.mdSections Included:
Next Steps:
Ready to merge!
test(#460): close QA gaps — patch label, readme phases, substring fal…
docs(#461): add documentation for exact label matching in phase detec…
test(#460): update substring tests for #461 exact-match behavior
test(#460): add batch-executor unit tests for label-based phase short…
fix(#461): use exact label matching instead of substring includes()
docs: add CHANGELOG entry for exact label matching fix (#461)