Skip to content

Fix same-day badge progress inflation on re-evaluation#61

Merged
ccpk1 merged 2 commits intomainfrom
ccpk1/issue60
Mar 18, 2026
Merged

Fix same-day badge progress inflation on re-evaluation#61
ccpk1 merged 2 commits intomainfrom
ccpk1/issue60

Conversation

@ccpk1
Copy link
Copy Markdown
Owner

@ccpk1 ccpk1 commented Mar 18, 2026

Summary

  • use canonical active-window totals for badge points and chore-count evaluation
  • requeue gamification after post-statistics writes so badge checks see settled period buckets
  • add engine and integration regressions to prove unrelated same-day events do not inflate badge progress

Validation

  • ./utils/quick_lint.sh --fix
  • python -m pytest tests/test_gamification_engine.py tests/test_badge_target_types.py -v --tb=line
  • python -m pytest tests/test_badge_target_types.py tests/test_badge_periods_initialization.py tests/test_badge_helpers.py tests/test_badge_cumulative.py tests/test_gamification_engine.py tests/test_gamification_shadow_comparison.py tests/test_workflow_gamification_pending_queue.py -v --tb=line

Closes #60

ccpk1 added 2 commits March 18, 2026 16:29
What changed:
- use canonical cycle window totals for badge points and chore-count evaluation
- requeue gamification after statistics writes settle
- add engine and integration regressions for unrelated same-day events

Why:
- daily and periodic badge progress could inflate when unrelated reward or points events triggered re-evaluation
- this fixes issue #60 without weakening badge coverage

Refs #60
@ccpk1 ccpk1 added the bug Something is not working label Mar 18, 2026
@ccpk1 ccpk1 merged commit b9a6b17 into main Mar 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ISSUE] reward approvals count for reward in daily task badge

1 participant