Feature/gamification feature flag#509
Merged
xXPinkmagicXx merged 17 commits intogamificationfrom Apr 2, 2026
Merged
Conversation
xXPinkmagicXx
commented
Mar 31, 2026
| # Gamification feature flag logic | ||
| from .model.user import User | ||
| from datetime import datetime, date | ||
| GAMIFICATION_START_DATE = date(2026, 4, 1) |
Member
Author
There was a problem hiding this comment.
What should be the start date?
Member
Author
There was a problem hiding this comment.
For now we do not have a start date. That logic is not needed. The experiment will have two groups one with gamification and one without from day one.
xXPinkmagicXx
commented
Mar 31, 2026
zeeguu/core/user_feature_toggles.py
Outdated
| Enable general gamification features for users whose invitation code is exactly 'gamification'. | ||
| """ | ||
|
|
||
| GAMIFICATION_INVITE_CODE = "gamification" |
Member
Author
There was a problem hiding this comment.
What should be the invite code?
Member
Author
There was a problem hiding this comment.
We should probably have an invite code for both the gamification and not gamification. So people do not know what group they are in.
Member
Author
There was a problem hiding this comment.
Suggestion for invite codes (randomly generated):
- L2HPF8XK
- CD8HGKKJ
This was referenced Apr 2, 2026
Member
Author
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Article.find_or_create() was using np_article.html (raw newspaper HTML) instead of np_article.htmlContent (readability server output). This caused navigation menus, headers, and footers to appear as bullet-point lists in shared articles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The LLM returns JSON with literal newlines inside string values (instead of escaped \n), which json.loads rejects in strict mode. This caused fallback to DeepSeek (~90s vs ~3s for Anthropic). Using json.loads(strict=False) accepts these control characters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip expensive tokenization when caller only needs article metadata (id, language, title). Used by SharedArticleHandler to show the language choice modal immediately without waiting for NLP processing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Downloads and detects language + title without creating the article in the DB. Returns instantly for already-existing articles. Reverts the withContent flag — no longer needed since the share flow now uses this lightweight endpoint instead of find_or_create_article. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.




A draft the the gamification feature flag.
If we want to have multiple test groups i guess we will have different invite codes and more feature flags.