Release v26.04.13.3 #31

Merged
bvandeusen merged 0 commits from dev into main 2026-04-13 23:36:10 -04:00
bvandeusen commented 2026-04-13 23:36:04 -04:00 (Migrated from git.fabledsword.com)

Summary

Rich single-article Discuss (task #106)

The Discuss button on news/RSS cards used to produce one-shot summary replies because the model got the whole raw trafilatura blob dropped into history with a canned "Please summarize and discuss this article." prompt — no length guard, no prep, no invitation to converse. Large articles silently truncated; small articles got tepid replies.

This reworks discuss_article around a three-layer cache on rss_items:

context_prepared  →  content_full  →  fresh trafilatura fetch
  • Small article (≤48k chars): fetch once, pass through unchanged, cache both raw and prepared. Normal chat turn latency.
  • Large article (>48k chars): fetch once, run a parallel map step over paragraph-aware chunks via the background model, concatenate under section headers, cache. Delayed ~5–8s before stream starts; subsequent clicks are instant.
  • Repeat click, any size: zero prep, straight to chat turn.
  • Follow-up turns: zero extra cost — the article context is already in history as the read_article tool result.

The canned summary prompt is replaced with a conversational seed that invites a real discussion rather than a one-shot synopsis, matching the goal of "have a conversation about an article, not just read it."

The map step pins num_ctx=16384 explicitly — same silent-truncation footgun that wrecked the research pipeline in v26.04.13.2. Don't trust generate_completion's default to stick.

discuss_topic (multi-article aggregation) is intentionally untouched — follow-up task filed to decide whether to retire it or rework it on the same cached-context approach.

Changes

  • Migration 0038_add_rss_item_full_content.py — adds nullable content_full, context_prepared, content_fetched_at to rss_items (additive, no backfill)
  • services/rss.py — new get_or_fetch_full_article(item) with write-through caching; _enrich_and_embed now persists full text it already fetches
  • services/article_context.py — new module: prepare_article_context, paragraph-aware chunker, background-model map step
  • routes/briefing.py discuss_article — three-layer cache flow + conversational seed prompt
  • tests/test_article_reading.py — small pass-through, large map-reduce, chunker boundary tests

Verification

Tested end-to-end on dev instance after push — user confirmed: "it was awesome, this response was great and exactly the kind of summary I wanted."

## Summary **Rich single-article Discuss (task #106)** The Discuss button on news/RSS cards used to produce one-shot summary replies because the model got the whole raw trafilatura blob dropped into history with a canned `"Please summarize and discuss this article."` prompt — no length guard, no prep, no invitation to converse. Large articles silently truncated; small articles got tepid replies. This reworks `discuss_article` around a three-layer cache on `rss_items`: ``` context_prepared → content_full → fresh trafilatura fetch ``` - **Small article** (≤48k chars): fetch once, pass through unchanged, cache both raw and prepared. Normal chat turn latency. - **Large article** (>48k chars): fetch once, run a parallel map step over paragraph-aware chunks via the background model, concatenate under section headers, cache. Delayed ~5–8s before stream starts; subsequent clicks are instant. - **Repeat click, any size**: zero prep, straight to chat turn. - **Follow-up turns**: zero extra cost — the article context is already in history as the `read_article` tool result. The canned summary prompt is replaced with a conversational seed that invites a real discussion rather than a one-shot synopsis, matching the goal of "have a conversation about an article, not just read it." The map step pins `num_ctx=16384` explicitly — same silent-truncation footgun that wrecked the research pipeline in v26.04.13.2. Don't trust `generate_completion`'s default to stick. `discuss_topic` (multi-article aggregation) is intentionally untouched — follow-up task filed to decide whether to retire it or rework it on the same cached-context approach. ## Changes - Migration `0038_add_rss_item_full_content.py` — adds nullable `content_full`, `context_prepared`, `content_fetched_at` to `rss_items` (additive, no backfill) - `services/rss.py` — new `get_or_fetch_full_article(item)` with write-through caching; `_enrich_and_embed` now persists full text it already fetches - `services/article_context.py` — new module: `prepare_article_context`, paragraph-aware chunker, background-model map step - `routes/briefing.py discuss_article` — three-layer cache flow + conversational seed prompt - `tests/test_article_reading.py` — small pass-through, large map-reduce, chunker boundary tests ## Verification Tested end-to-end on dev instance after push — user confirmed: "it was awesome, this response was great and exactly the kind of summary I wanted."
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#31