Commit Graph

17 Commits

Author SHA1 Message Date
0592861edd refactor: 5 architectural improvements (Tasks 2-5 + Task 6 fix)
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m2s
test / unit (pull_request) Successful in 16m19s
test / integration (pull_request) Failing after 17m15s
- feat(domain): Hashtag value object with canonical extract() — unifies two
  divergent private implementations; fields pre-compute raw/normalized/url_slug/ap_name

- feat(presentation): Deps<S: FromAppState> extractor — each handler now
  declares its exact dependency surface; AppState unchanged; handlers
  become unit-testable without mocking all 20 deps

- refactor(feed): replace 5 flat FeedRepository methods with FeedQuery/FeedScope
  — single query() method; SQL shared logic lives once; adding feed types
  no longer requires 5 edits

- refactor(activitypub): ActivityPubRepository + OutboundFederationPort moved
  out of domain::ports into activitypub-base::ap_ports — domain crate no
  longer knows about AP IDs, inboxes, or actor URLs

- fix(outbox): OutboxRelay now opens a per-row transaction so FOR UPDATE
  SKIP LOCKED actually holds the lock during publish + mark_delivered
2026-05-15 18:54:20 +02:00
3f6b91c943 refactor(ports): ActivityPubRepository takes &str instead of url::Url — infra type stays in adapter 2026-05-15 14:06:33 +02:00
711b3ec63b fix(ap): protocol compliance — actor verification, on_unlike, Move, bto/bcc
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m31s
test / unit (pull_request) Successful in 16m12s
test / integration (pull_request) Failing after 16m53s
- Add verify() to Accept/Reject (actor must match Follow target)
- Add verify() to Create/Update (actor must match attributedTo)
- Add verify() to Delete (actor domain must match object domain)
- Fix UpdateActivity passing wrapper id instead of object id to on_update
- Implement on_unlike (was no-op stub) — publishes LikeRemoved event
- BlockActivity now removes remote actor as follower, not just following
- Add MoveActivity (account migration) to InboxActivities enum
- Add bto/bcc fields to CreateActivity for blind DM support
- http_signature_compat(true) restricted to debug mode only
- Announce of non-local object logs debug instead of silent drop
- postgres-federation: get_followers/get_following_page/count_following
  now consistently filter by status='accepted'
2026-05-15 12:52:37 +02:00
314dad5451 Refactor database error handling across repositories to use IntoDbResult for improved error management
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m30s
test / unit (pull_request) Successful in 16m10s
test / integration (pull_request) Failing after 16m44s
- Updated PgNotificationRepository to utilize IntoDbResult for error handling in various methods.
- Refactored PgRemoteActorRepository to replace manual error mapping with IntoDbResult.
- Modified PgRemoteActorConnectionRepository to implement IntoDbResult for error handling.
- Adjusted PgTagRepository to use IntoDbResult for consistent error management.
- Introduced test_helpers module for seeding users and thoughts in tests.
- Enhanced PgThoughtRepository to leverage IntoDbResult for error handling.
- Updated PgTopFriendRepository to utilize IntoDbResult for error management.
- Refactored PgUserRepository to implement IntoDbResult for error handling.
- Added constants for pagination defaults in requests.
- Introduced MAX_TOP_FRIENDS constant for top friends validation.
- Refactored JWT expiration time to use a constant.
- Improved rate limiter configuration with constants for better readability.
- Added utility methods for FollowState and Visibility enums for string conversions.
- Introduced maximum length constants for Username, Email, and Content value objects.
- Cleaned up test modules by removing redundant code and utilizing a shared testing state.
2026-05-15 12:31:25 +02:00
6c83c193ed feat(ap): @mention notification from inbound remote Notes 2026-05-15 05:44:10 +02:00
d360e506db feat(ap): handle Undo(Like) inbound activity 2026-05-15 05:28:52 +02:00
09bebf7dc9 fix: store in_reply_to on remote notes + use full handle in federation component links/actions 2026-05-15 05:09:44 +02:00
a7527c50be feat(activitypub): implement on_like and on_announce_received in ThoughtsObjectHandler 2026-05-15 04:55:50 +02:00
0cf34184d9 feat(activitypub-base): LikeActivity struct + on_like/on_announce_received trait methods 2026-05-15 04:49:20 +02:00
8602614e7c fix(ap): visibility-aware addressing — correct to/cc outbound, parse inbound to/cc
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m25s
test / unit (pull_request) Successful in 16m39s
test / integration (pull_request) Failing after 17m35s
2026-05-14 19:34:43 +02:00
d3b7ecad15 fix(ap): add url field to Note, handle Delete(actor) and Tombstone objects
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m12s
test / unit (pull_request) Successful in 15m52s
test / integration (pull_request) Failing after 17m10s
2026-05-14 16:47:17 +02:00
550865bad4 fix: resolve all clippy warnings — redundant closures, dead code, collapsible_if, needless borrow
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m25s
test / unit (pull_request) Successful in 16m57s
test / integration (pull_request) Failing after 17m29s
2026-05-14 16:33:34 +02:00
004bfb427b feat: implement merge readiness plan to close gaps between v2 and v1
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m8s
test / unit (pull_request) Successful in 16m18s
test / integration (pull_request) Failing after 16m59s
- Task 1: Fix feed response hydration by adding `to_thought_response` helper and updating feed handlers to return full `ThoughtResponse`.
- Task 2: Wire follower/following REST routes for user feeds.
- Task 3: Add user listing and count endpoints, including `GET /users` and `GET /users/count`.
- Task 4: Implement popular tags feature with `GET /tags/popular`.
- Task 5: Enhance configuration with HOST, CORS_ORIGINS, and optional rate limiting using tower-governor.
2026-05-14 16:28:18 +02:00
114d9f9558 fix(activitypub): re-export NoteType from activitypub-base, drop direct activitypub_federation dep 2026-05-14 12:51:47 +02:00
4ae3af8086 refactor(activitypub): ThoughtsObjectHandler uses ActivityPubRepository port, drops postgres dep 2026-05-14 10:58:25 +02:00
2080fec347 feat(activitypub): ThoughtNote AP object and ThoughtsObjectHandler 2026-05-14 10:23:35 +02:00
63a7001165 chore: scaffold v2 workspace 2026-05-14 03:07:45 +02:00