feat(projects): projects repo + group owner reads; wire into ApplyService
Read side of §7 ownership, ahead of the claim logic. - project_repo: `ProjectRepository` trait + `PostgresProjectRepository` (list / get_by_id / get_by_slug). Writes are NOT here — a claim registers its project via an in-tx upsert (next commit). - group_repo: `list_with_owner()` LEFT-JOINs projects for each group's owner slug (backs `pic groups ls`); columns qualified since id/slug/name exist on both tables. - ApplyService gains a `projects` handle; constructed in the picloud binary. - tests/projects_repo: round-trip pinning list_with_owner (claimed→slug, unclaimed→None) and that ancestors() surfaces owner_project nearest-first — the fold input the claim path walks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,7 @@ pub mod module_source;
|
||||
pub mod outbox_event_emitter;
|
||||
pub mod outbox_repo;
|
||||
pub mod principal_resolver;
|
||||
pub mod project_repo;
|
||||
pub mod pubsub_repo;
|
||||
pub mod pubsub_service;
|
||||
pub mod queue_repo;
|
||||
@@ -223,6 +224,7 @@ pub use outbox_repo::{
|
||||
NewOutboxRow, OutboxRepo, OutboxRepoError, OutboxRow, OutboxSourceKind, PostgresOutboxRepo,
|
||||
};
|
||||
pub use principal_resolver::{AdminPrincipalResolver, PrincipalResolver, PrincipalResolverError};
|
||||
pub use project_repo::{PostgresProjectRepository, ProjectRepository, ProjectRepositoryError};
|
||||
pub use pubsub_repo::{PostgresPubsubRepo, PublishCtx, PubsubRepo, PubsubRepoError};
|
||||
pub use pubsub_service::{PubsubServiceImpl, SubscriberTokenConfig};
|
||||
pub use realtime_authority::RealtimeAuthorityImpl;
|
||||
|
||||
Reference in New Issue
Block a user