Hacker News comments never attached: enrich_top_stories has no caller

Author: KindFellowParkCreated Sep 23, 2026Updated Sep 23, 2026

Hacker News items never get comments: hackernews.enrich_top_stories has no caller in the pipeline.

What happens

lib/hackernews.py defines enrich_top_stories() (and _fetch_item_comments()), but nothing in the engine calls it. The HN path in pipeline.py is search_hackernews() then parse_hackernews_response() (around line 5167 on main 084662b), and neither attaches comments. Every HN item therefore reaches normalization with top_comments empty, whatever the query or depth.

This is upstream of #889 / #890. #890 fixed how HN comments are shaped and filtered once they exist, and its offline repro builds an item with top_comments already filled in. In a real run the list is empty before #890's code sees it.

Repro on main 084662b

python
from lib import hackernews
r = hackernews.search_hackernews("Gemini 3.8 Flash", "2026-08-24", "2026-09-23", depth="default")
items = hackernews.parse_hackernews_response(r, query="Gemini 3.8 Flash")
[(i["engagement"]["comments"], len(i.get("top_comments") or [])) for i in items[:3]]
# [(669, 0), (0, 0), (2, 0)]   <- a 669-comment story, zero comments attached

The function itself works when called directly: hackernews._fetch_item_comments("49570545", max_comments=5) returns 5 comments.

Also seen on an installed v3.18.4. A full run on 2026-09-20 reported hackernews as ok with 12 stories and zero comments across all of them. doctor --postmortem lists HN under Succeeded, and doctor --probe doesn't test the comment lane, so nothing flags it.

Suggested fix

Call hackernews.enrich_top_stories(items, depth=depth) after parse_hackernews_response in the HN branch of pipeline.py, the way Reddit, YouTube, TikTok and Instagram enrich their items. It could also help to report comment coverage (comments attached vs. comments claimed) in source_status, so a silent comment-lane failure shows up in doctor --postmortem.

Source: mvanhorn/last30days-skill