Repository navigation
Conversation
…ill (#91) Rule conditions accept a category id or a legacy enum name; skip checks compare ids. Import takes defaultCategoryId. Analytics group by category id and count custom categories by Kind, with legacy string fields kept. POST /api/maintenance/backfill-rule-categories converts stored condition names to ids (Backfill:Key header, idempotent).
…Dev/KeepItSimple into feature/91-rules-analytics # Conflicts: # backend/KeepItSimple.Api/models/analytics/Analytics.cs # backend/README.md
…Dev/KeepItSimple into feature/91-rules-analytics
…Dev/KeepItSimple into feature/91-rules-analytics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of 5 for #91, stacked on #227.
What
oldCategoryId/newCategoryId.defaultCategoryId(it wins over the legacydefaultCategory; a foreign id gives 400). Rule targets are applied as ids.categoryId.Kind; system categories keep the existing enum logic."Other"for custom ids). Monthly income adds acategoryIdsmap.POST /api/maintenance/backfill-rule-categories: one-time job that converts stored condition names to ids.X-Backfill-Keyis checked againstBackfill:Key(envBackfill__Key) with a constant-time compare. 404 when no key is configured, 401 when the key is wrong.{ scanned, updated }.Why
category = 2). This is noted in the backend README.Tested
dotnet test: 183/183 (8 new: matcher by id/name/custom, foreign id rejected, apply to a custom target, import default, analytics by Kind, backfill 404/401/convert/idempotent).categoryId1000,category"Other");"Food"→"2"in the jsonb, and a second run updated 0;Out of scope
🤖 Generated with Claude Code