fix: Fetch reply contexts again (v2.10.2)
fetch_source returns (content, content_type, final_url) since v2.7.0, but fetch_reply_context unpacked two values, so every new reply/like/repost context was stored as an error. Parse with the final URL so relative links resolve. Adds a test that runs the real fetch path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f85be50072
commit
d73dd0a5b0
8 files changed
+103
-5
No files matched your search
@@ -21,7 +21,7 @@ is in `../architecture/`; decisions are in `../decisions/` (ADRs).
|
||||
|
||||
## Contents
|
||||
|
||||
[v1.0.0](#v100) · [v1.1.1](#v111) · [v1.1.2](#v112) · [v1.2.0](#v120) · [v1.3.0](#v130) · [v1.3.1](#v131) · [v1.4.0](#v140) · [v1.4.1](#v141) · [v1.4.2](#v142) · [v1.5.0](#v150) · [v1.6.0](#v160) · [v2.0.0](#v200) · [v2.0.1](#v201) · [v2.0.2](#v202) · [v2.1.0](#v210) · [v2.2.0](#v220) · [v2.3.0](#v230) · [v2.3.1](#v231) · [v2.3.2](#v232) · [v2.3.3](#v233) · [v2.4.0](#v240) · [v2.5.0](#v250) · [v2.6.0](#v260) · [v2.6.1](#v261) · [v2.6.2](#v262) · [v2.6.3](#v263) · [v2.6.4](#v264) · [v2.6.5](#v265) · [v2.6.6](#v266) · [v2.6.7](#v267) · [v2.6.8](#v268) · [v2.6.9](#v269) · [v2.7.0](#v270) · [v2.7.1](#v271) · [v2.7.2](#v272) · [v2.8.0](#v280) · [v2.8.1](#v281) · [v2.9.0](#v290) · [v2.10.0](#v2100) · [v2.10.1](#v2101) · [hotfix](#hotfix)
|
||||
[v1.0.0](#v100) · [v1.1.1](#v111) · [v1.1.2](#v112) · [v1.2.0](#v120) · [v1.3.0](#v130) · [v1.3.1](#v131) · [v1.4.0](#v140) · [v1.4.1](#v141) · [v1.4.2](#v142) · [v1.5.0](#v150) · [v1.6.0](#v160) · [v2.0.0](#v200) · [v2.0.1](#v201) · [v2.0.2](#v202) · [v2.1.0](#v210) · [v2.2.0](#v220) · [v2.3.0](#v230) · [v2.3.1](#v231) · [v2.3.2](#v232) · [v2.3.3](#v233) · [v2.4.0](#v240) · [v2.5.0](#v250) · [v2.6.0](#v260) · [v2.6.1](#v261) · [v2.6.2](#v262) · [v2.6.3](#v263) · [v2.6.4](#v264) · [v2.6.5](#v265) · [v2.6.6](#v266) · [v2.6.7](#v267) · [v2.6.8](#v268) · [v2.6.9](#v269) · [v2.7.0](#v270) · [v2.7.1](#v271) · [v2.7.2](#v272) · [v2.8.0](#v280) · [v2.8.1](#v281) · [v2.9.0](#v290) · [v2.10.0](#v2100) · [v2.10.1](#v2101) · [v2.10.2](#v2102) · [hotfix](#hotfix)
|
||||
|
||||
## v1.0.0
|
||||
|
||||
@@ -406,6 +406,10 @@ OIDC admin login and built-in IndieAuth server.
|
||||
|
||||
- [2026-11-03-websub-hardening.md](v2.10.1/2026-11-03-websub-hardening.md) — WebSub hardening (implementation report) *(reconstructed)*
|
||||
|
||||
## v2.10.2
|
||||
|
||||
- [2026-11-03-reply-context-fetch.md](v2.10.2/2026-11-03-reply-context-fetch.md) - Reply contexts fetched again (fetch_source returns three values since v2.7.0)
|
||||
|
||||
## hotfix
|
||||
|
||||
Not a release folder.
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# v2.10.2: Reply context fetch
|
||||
|
||||
## Summary
|
||||
|
||||
`webmention_processor.fetch_source()` has returned
|
||||
`(content, content_type, final_url)` since v2.7.0, but
|
||||
`reply_context.fetch_reply_context()` still unpacked two values. The
|
||||
`ValueError` was caught by its generic handler, so every new reply, like and
|
||||
repost context was stored with `fetch_status='error'`. Found during the
|
||||
documentation refresh (docs/design/v1.6.0/database-schema.md). Production had
|
||||
no reply-context rows yet, so nothing needed repairing.
|
||||
|
||||
## Changes
|
||||
|
||||
- `starpunk/reply_context.py`: unpack three values; parse microformats with
|
||||
the final URL so relative links (author URL, photos) resolve correctly.
|
||||
|
||||
## Tests
|
||||
|
||||
`tests/test_reply_context_fetch.py` runs `fetch_reply_context` through the
|
||||
mocked network (other tests stub it out, which is why this went unnoticed).
|
||||
It fails on v2.10.1.
|
||||
Reference in new issue
Block a user