Repository navigation
feat(automations): feed_post.received activities for news feed posts - #527
Merged
Merged
Conversation
Each post a news feed brings in is now a feed_post.received activity (a child of asset.added) instead of a generic file.added. Its object carries the post's address, site, feed title, author, published date and categories, read from what the feed listed and kept on the resource as `post`; all of the feed's own text is marked as outside text, so automations wrap it before a model sees it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWH8a26M9wkAPq2eRrfWZK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: a news feed's new post (#453) came into Lens as a generic new asset, so an automation couldn't tell it was a feed post or start on posts from one feed, author or category.
After: each new post of a news feed is a
feed_post.receivedactivity (W3C Activity Streams), its actor the source, with the post's address, site, feed, author, date and categories on its object. The feed's own words (title, author, feed name, address) are marked untrusted. The Timeline names it "feed post", and the automations docs list the kind.How:
events_content.pygains thefeed_post.receivedchild kind and apostfield read from the recording;rss.pyexposes the listed post's fields andsources.pystores them on the recording it imports. No M3 files are touched. The CHANGELOG also moves #453's "News feeds" entry from 0.14.0 to Unreleased: v0.14.0 was cut before #453 merged.Motivation and Context
The coordinator's brief for news feeds: feed items emit content-source events so automations can act on them.
Steps to reproduce (if appropriate):
pytest tests/api/test_news_feed_source.py::test_a_news_feed_as_a_source: a watched feed's post emitsfeed_post.received, valid byevents.check_activity, with the feed's fields and untrusted paths.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
docs/automations.mdanddocs/processing.mdupdated; nothing generated changed.events.check_activity.Local CI (
ci/local-ci.sh) on c65c3eb: FastAPI (embedded SurrealDB) pass, Next.js pass, pre-commit pass, title pass.Generated by Claude Code