Skip to content

fix: match labels the same way on every path (MCP 2.1.1) - #13

Merged
SebHenn merged 2 commits into
masterfrom
fix/label-normalization
Dec 3, 2026
Merged

SebHenn merged 2 commits into
masterfrom
fix/label-normalization

Conversation

@SebHenn

@SebHenn SebHenn commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Problem

A label typed with a stray space could never be found. The MCP tools (create_task, update_task, create_tasks) stored labels exactly as given, so "cartographer " sat on a task while:

  • weekly_review trimmed the label it was asked for, but compared it against the untrimmed stored one;
  • the board filter and search compared raw strings;
  • only the app's own text boxes trimmed and de-duplicated.

Fix

LabelParser now owns the rule:

  • Normalize (trim, drop blanks, distinct ignoring case) is used by all three MCP write paths and by ProjectStore.NormalizeTasks, so labels already saved with spaces are cleaned on the next load.
  • Has (case- and whitespace-insensitive) is used by BoardFilter, TaskSearch and ReviewReport.

MCP version bumped to 2.1.1 (patch: a fix, no response-shape change).

Also

  • CHANGELOG entry for the weekly_review label/days parameters from Let weekly_review answer for one effort instead of everything #4, which was missing.
  • Dropped two tests that only asserted days: 0 is rejected; the clamping test beside them covers the window logic.
  • CLAUDE.md and README no longer pin an exact test count (they said 419; the suite had 430).

Tests

  • CreateTask_StoresLabelsTheWayTheAppDoes_SoTheReviewFindsThem: the reported bug end to end through the MCP surface.
  • Load_CleansLabelsSavedBeforeEveryPathNormalizedThem: existing dirty data.

Both fail on master and pass here. Release build: 0 warnings; 430 tests passing; dotnet format --verify-no-changes clean.

🤖 Generated with Claude Code

SebHenn and others added 2 commits November 29, 2026 21:01
The MCP tools stored labels exactly as typed, so "cartographer " sat on
a task where neither weekly_review, list_tasks nor search would match it:
weekly_review trimmed the label it was asked for, the board filter and
search compared raw strings, and the app's own text boxes trimmed and
de-duplicated. LabelParser now owns one rule for storing a label and one
for matching it; every write path, filter and the load path use it, so
labels already saved with stray spaces are cleaned on the next load.

Also records the weekly_review label/days parameters in the changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both tests only asserted that days: 0 is rejected, which a rewrite of
ReviewReport would keep or drop for its own reasons. The clamping test
next to them still covers the window logic that can actually regress.

The exact count in CLAUDE.md and README went stale within a few PRs
(419 documented, 430 real); the suite passing is the baseline that matters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SebHenn
SebHenn merged commit 06344f8 into master Dec 3, 2026
4 checks passed
@SebHenn
SebHenn deleted the fix/label-normalization branch December 3, 2026 17:13
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.

1 participant