- Drop malformed #+BIRTHDAY values (not YYYY-MM-DD) instead of letting
them reach the Profile DateField and abort the whole feed scan
- Use a (connect, read) timeout of (3.05, 5) when fetching feeds so dead
hosts are dropped faster without penalizing slow-but-alive servers
- Add parser and scan_feeds regression tests
The feed redirect merge logic was attempting a bulk update of mentions,
which failed when duplicate (post, mentioned_profile) combinations existed.
This caused feeds with 301 redirects to fail merging properly.
Now mentions are migrated individually, checking for existing duplicates
before updating, similar to how Follow and PollVote relationships are handled.
This fixes the UNIQUE constraint errors seen in production for feeds like:
- thesolarprincess.github.io -> thesolarprincess.site
- haiverin.scot -> www.haiverin.scot
- teoten.com -> www.teoten.com
New features from Org Social v1.6:
- Add LOCATION, BIRTHDAY, LANGUAGE, PINNED fields to Profile model
- Support post ID in header (** 2025-05-01T12:00:00+0100)
- Header ID takes priority over property drawer ID
- Parse and store all new v1.6 metadata fields
Changes:
- Updated Profile model with 4 new fields
- Updated parser to extract new metadata fields
- Updated parser to support ID in post headers
- Updated tasks.py to save new profile fields
- Added database migration 0010
- Added 3 new tests for v1.6 features
- Renamed SKILL.md to CLAUDE.MD
All tests passing (58/58)
When merging duplicate feeds with redirects, Follow relationships
can generate UNIQUE constraint errors if the relationship already
exists between the same profiles.
This fix:
- Iterates Follow relationships individually
- Checks for existing relationships before updating
- Deletes duplicates safely
- Adds comprehensive error handling
Similar approach to PollVote fix.
Resolves issue with feeds like haiverin.scot redirect.
Signed-off-by: Andros Fenollosa <hi@andros.dev>
This commit implements automatic cleanup of feeds that haven't been successfully fetched in 3 days.
Changes:
- Add last_successful_fetch field to Feed model to track when feeds are successfully fetched (HTTP 200)
- Update parse_org_social() and validate_org_social_feed() to record successful fetches
- Add new periodic task cleanup_stale_feeds() that runs every 3 days and deletes inactive feeds
- Add comprehensive test suite (9 tests, all passing)
- Migration safely handles existing feeds by setting initial last_successful_fetch to protect them
Safety features:
- Feeds with last_successful_fetch = NULL are never deleted (protects legacy feeds)
- Only feeds older than 3 days are deleted
- Extensive logging of cleanup operations
- Initial migration sets timestamp for all existing feeds to prevent accidental deletion
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Updated parser to accept #+title:, #+nick:, #+description: (lowercase)
- Added re.IGNORECASE flag to all metadata parsing regex patterns
- Fixes validation issues with feeds using lowercase keywords
- Enables registration of feeds like codeberg.org that use lowercase format