feat: replace per-author cap with interleaving to avoid dropping posts in feed and home

The old `diversify_by_author` capped each author to 2 posts per page, silently dropping excess rows. The new `interleave_by_author` reorders the full result set so no two consecutive posts share an author, preserving every post while breaking up same-author runs. `paginate_diverse` loses its `max_per_author` and `pool` parameters; the home route now fetches exactly 6 rows and interleaves them instead of over-fetching 50 and capping. Tests are rewritten to verify interleaving behavior and per-author chronological order preservation.
This commit is contained in:
2026-06-14 16:50:30 +00:00
parent 9ed611097d
commit aeea551e4b
9 changed files with 81 additions and 59 deletions
+6
View File
@@ -51,6 +51,12 @@ DOCS_PAGES = [
"kind": "prose",
"section": SECTION_GENERAL,
},
{
"slug": "feed",
"title": "The feed",
"kind": "prose",
"section": SECTION_GENERAL,
},
{
"slug": "devii",
"title": "Devii Assistant",