I expected a streak counter to remember which weeks had qualified. Reading Forem's Community Wellness code showed me a different design: it rebuilds the active streak from the comment and reaction rows that exist when the calculation runs.
That means an old week can stop qualifying after the activity in that week is over.
This is a source-code finding, not a claim that I have watched DEV revoke a badge. I checked the public Forem implementation on October 19. DEV's deployed version and operational settings are not exposed by those files.
The qualifying week is a live query
In Comments::CommunityWellnessQuery, comments join a set of comment IDs with surviving reaction rows. IDs with a thumbsdown or vomit reaction in the query's lookback are excluded.
Comment age is divided by 604,800 seconds and truncated to form rolling seven-day buckets. Both comments and reactions are bounded by a 231-day lookback. There is also an eligibility check for more than one comment in the seven-to-fourteen-day interval.
There is no saved record here saying that a particular historical week passed forever.
The award service walks the result again
Badges::AwardCommunityWellness skips bucket zero, requires at least two qualifying comments in a bucket, and advances only through consecutive buckets starting at one. It creates an award when the resulting length matches 1, 2, 4, 8, 16, 24, or 32 weeks.
Consider a hypothetical old bucket with exactly two qualifying comments. If one loses its only qualifying reaction, that bucket can fall below the threshold on a later calculation. The consecutive sequence can then stop before the next milestone.
That affects the calculation of future awards. The service shown here does not remove previously awarded badges when the sequence becomes shorter.
A reaction can disappear without the commenter doing anything
The profile-cleanup path in Users::DeleteActivity deletes the departing user's reactions in batches. Those include reactions they gave to other people's comments.
Following that deletion into the query gives the failure path: a comment can lose the reaction that qualified it, changing an older bucket. Multiple surviving reactions or extra qualifying comments can prevent that particular deletion from changing the result.
I did not delete a test account to reproduce this on DEV. The mechanism follows from these public source paths; its occurrence on a particular account would need separate evidence.
What I can actually verify
My profile currently shows the 1-, 2-, and 4-week Community Wellness badges. My local reconstruction has disagreed with the profile before, so I use the profile as the record of awards received.
I also cannot infer exactly which reactions the live badge job counts from a displayed reaction total. A new comment showing one reaction is not sufficient evidence that an outside reader liked it or that it will qualify.
My practical adjustment is modest: participate across the week, respond when someone adds something specific, and avoid treating exactly two comments as a guaranteed milestone. Additional useful conversations leave some room for changes in old data. They still do not make an award certain.
If you were building this feature, would you preserve each week's qualification once calculated, or deliberately let later deletions change the active streak?
Top comments (0)