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
@@ -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