Commit Graph

12 Commits

Author SHA1 Message Date
b569efe715 v0.5.0 — codebase refinement, flexible API, architecture cleanup
All checks were successful
CI / fmt (push) Successful in 31s
CI / clippy (push) Successful in 4m0s
CI / test (push) Successful in 5m44s
Error handling:
  thiserror enum (NotFound/BadRequest/Unauthorized/Forbidden/Internal)
  eliminates 41 boilerplate .map_err() calls
  signature failures return 401, not 500

Named types:
  Keypair, LocalObject (with to/cc/bto/bcc addressing), Addressing

Readability:
  descriptive names everywhere, small functions, breathing room
  noisy comments removed, intent-explicit error handling (no let _ =)
  types.rs per module separating data from behavior

File organization:
  handlers/ module (actor, featured, followers, inbox, nodeinfo, outbox, webfinger)
  actors/ split (mod.rs + person.rs + types.rs)
  service/ split (builder, broadcast, collections, delivery, fetch, follow, lookup, types)
  tests next to modules

Repository traits:
  FollowRepository → 5 sub-traits (FollowerWriter/Reader, FollowingWriter/Reader, FollowMigration)
  ActorRepository → 3 sub-traits (KeypairRepository, RemoteActorCache, AnnounceRepository)
  BlocklistRepository → 2 sub-traits (DomainBlocklist, ActorBlocklist)
  supertraits with blanket impls — existing consumers unchanged
  FollowMigration has default no-op
  delete dead get_following_outbox_url

Testing:
  mock_repo! macro generates mock builders from compact specs
  MockFollowRepo, MockActorRepo, MockBlocklistRepo, MockActivityRepo,
  MockUserRepo, MockContentReader, MockObjectHandler, MockEventPublisher
  all hand-written test stubs replaced

Flexibility:
  UrlScheme trait — configurable URL patterns (DefaultUrlScheme = /users/{uuid})
  on_unknown_activity hook for custom AP extensions
  broadcast_raw_to_followers for arbitrary activity JSON
  broadcast_create/broadcast_update (renamed from Note-centric names)
  internal modules locked to pub(crate), clean public re-exports
  actor_handler, followers_handler, following_handler re-exported for custom routers

Security:
  SSRF: block IPv6-mapped private IPv4, TEST-NET, benchmarking, reserved ranges
  verify_attributed_to rejects missing/array attributedTo
  remove .expect() from outbox handler

Architecture:
  handlers/followers.rs delegates to serialize_ordered_collection (no more UrlScheme bypass)
  extract dispatch_sends, prepare_addressed_broadcast (eliminate duplication)
  DbActor::object_id(), RemoteActor::from/from_ap_person/placeholder
  send_activity unifies prepare+dispatch, deterministic_activity_id helper
  pass-through wrappers grouped in lookup.rs
2026-07-25 17:06:53 +02:00
17b57fb9b5 v.0.4.6
All checks were successful
CI / fmt (push) Successful in 1m1s
CI / clippy (push) Successful in 4m41s
CI / test (push) Successful in 5m34s
2026-07-16 09:54:02 +02:00
4d7117b123 fix: NodeInfo 2.0 schema compliance, bump 0.4.5
Some checks failed
CI / fmt (push) Successful in 42s
CI / test (push) Has been cancelled
CI / clippy (push) Has been cancelled
Remove invalid $schema, add required services/metadata fields.
Configurable via with_nodeinfo_services/with_nodeinfo_metadata.

Closes GKaszewski/movies-diary#2
2026-07-16 09:44:05 +02:00
bb7db58848 chore: add tracing to inbox, delivery, actor cache
All checks were successful
CI / fmt (push) Successful in 31s
CI / clippy (push) Successful in 4m0s
CI / test (push) Successful in 5m55s
2026-07-11 10:39:43 +02:00
6e1e1357fb fix: treat fetched_at=None as stale, bump 0.4.4 2026-07-11 10:37:11 +02:00
997047fdbd feat: update NodeInfo 2.0 response to include $schema field and bump version to 0.4.3
Some checks failed
CI / fmt (push) Successful in 31s
CI / test (push) Has been cancelled
CI / clippy (push) Has been cancelled
2026-07-11 10:18:18 +02:00
f461f633b3 feat: emit OutboundFollowAccepted when remote accepts our follow
v0.4.2 — consumers can now react to outbound follow acceptance
(e.g. import_remote_outbox to backfill). Previously the accept
handler silently updated the DB with no event for consumers.
2026-07-10 16:59:46 +02:00
9355f20616 fix: send Undo(Block) on unblock_actor
All checks were successful
CI / fmt (push) Successful in 20s
CI / clippy (push) Successful in 2m33s
CI / test (push) Successful in 3m31s
2026-06-30 01:49:30 +02:00
d1ce277ff5 chore: bump to 0.4.0, update changelog
All checks were successful
CI / fmt (push) Successful in 21s
CI / clippy (push) Successful in 2m51s
CI / test (push) Successful in 3m49s
2026-05-30 02:50:46 +02:00
485c407edb feat(RemoteActor): add bio, banner_url, followers_url, following_url, also_known_as fields
Bump to 0.3.1. These fields are available on DbActor at follow/ingest
time but were discarded when constructing RemoteActor. Now populated
in from_json and follow(), so consuming repos can store and return
rich actor profiles without extra queries.
2026-05-29 04:03:23 +02:00
c1c8a37d0d fix: remove actor/followers/following routes from router()
These paths need content negotiation in real apps (AP JSON vs UI JSON).
k-ap can't serve the UI half, so the consuming app owns the route and
calls actor_json/followers_collection_json/following_collection_json
to produce the AP response.

The route conflict caused a panic when thoughts mounted its own
/users/{username}/... routes alongside service.router().

router() now registers only what k-ap fully owns:
- POST /inbox, POST /users/{id}/inbox (signature verification)
- GET /users/{id}/outbox
- GET /users/{id}/featured
- GET /.well-known/webfinger, nodeinfo, /nodeinfo/2.0
2026-05-29 03:28:17 +02:00
88fd1bfbdc docs: add CHANGELOG for v0.3.0 2026-05-29 02:49:23 +02:00