Commit Graph

10 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
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
c072ee95cd refactor(presentation): pure HTTP library — remove concrete adapter deps and binary 2026-05-14 12:07:18 +02:00
1866eef770 feat(presentation): OpenAPI docs at /docs (Swagger) and /scalar 2026-05-14 11:41:12 +02:00
ea14035062 fix: wire PgActivityPubRepository into ThoughtsObjectHandler — closes activitypub→postgres violation 2026-05-14 10:59:43 +02:00
e0a27c99a4 feat(presentation): ActivityPub routes — WebFinger, NodeInfo, inbox, outbox 2026-05-14 10:28:22 +02:00
3318635da6 feat(presentation): NatsEventPublisher with no-op fallback when NATS_URL unset 2026-05-14 10:00:39 +02:00
b599047d98 feat(presentation): wire SearchPort, /search returns thoughts + users 2026-05-14 09:38:02 +02:00
c5d262c68f feat(presentation): routes and main — Plan 1 complete 2026-05-14 04:06:17 +02:00
fb39ea2469 feat(presentation): state, errors, extractors, auth and user handlers 2026-05-14 03:56:42 +02:00