feat(v1.1.9): QueueService trait + Postgres impl + Services bundle wiring
- shared/services.rs: Services::new gains queue: Arc<dyn QueueService> positionally after users (mirrors v1.1.8's append of users). with_noop_services adds NoopQueueService. - manager-core/queue_service.rs: QueueServiceImpl wraps QueueRepo with script-as-gate authz on AppQueueEnqueue. enqueue clamps max_attempts to [1,20] and delay_ms to [0, 86_400_000ms]. depth/depth_pending are read-only — no authz check (scripts in the app can see their own queue depths). cx.principal threads through as enqueued_by_principal (forensic only). - manager-core/authz.rs: AppQueueEnqueue(AppId) capability — script:write scope, granted to editor+ (same trust shape as AppPubsubPublish). - picloud/lib.rs: wires PostgresQueueRepo + QueueServiceImpl into Services::new alongside the existing v1.1.7+ services. - 11 sdk test binaries + manager-core/realtime_authority.rs updated to pass NoopQueueService to Services::new. Unit tests cover empty queue_name reject, max_attempts clamping (0/21 → invalid), delay_ms negative-reject, anonymous principal skips authz, depth/depth_pending pass-through. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,7 @@ pub mod principal_resolver;
|
||||
pub mod pubsub_repo;
|
||||
pub mod pubsub_service;
|
||||
pub mod queue_repo;
|
||||
pub mod queue_service;
|
||||
pub mod realtime_authority;
|
||||
pub mod repo;
|
||||
pub mod route_admin;
|
||||
|
||||
Reference in New Issue
Block a user