Feed-health review fixes (follow-up to #700) - #703
Merged
Conversation
- Batch the CEFR lookup in active_users_by_segment (one UserLanguage query instead of one per active user). - Canary picks a MEDIAN-activity user, not the most-recently-seen (heaviest reader, whose feed is legitimately empty most days -> useless corroboration). - Distinguish infra failure from emptiness: inventory-probe exceptions now yield STATUS_ERROR, not STATUS_EMPTY, so an ES hiccup isn't reported as 'no content'. - _hit_published_time converts tz-aware timestamps to local before comparing against datetime.now(), instead of blindly stripping tzinfo. - Document that the inventory signal models CEFR but not per-user feature-flag filtering (moot post-#698). - Tests for _to_local_naive + _hit_published_time. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
ArchLens - No architecturally relevant changes to the existing views |
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.
Follow-up to #700, applying the code-review findings that landed after it was merged.
active_users_by_segmentbatches the CEFR lookup into oneUserLanguagequery instead of callingcefr_level_for_learned_language()per active user.STATUS_ERROR, notSTATUS_EMPTY, so a transient ES outage isn't reported as "the segment has no content" (subject reflects empty/stale/error)._hit_published_timeconverts tz-aware timestamps to local before comparison withdatetime.now(), instead of strippingtzinfo(which mis-ages UTC values by the server offset)._to_local_naiveand_hit_published_time(19 passing).🤖 Generated with Claude Code