3.4 KiB
3.4 KiB
Orchestrator Admin Quota Controls (orch:quota, orch:backfill)
Module
Orchestrator
Status
IMPLEMENTED
Description
New orch:quota and orch:backfill scopes with mandatory reason/ticket fields. Token requests must include quota_reason/backfill_reason and optionally quota_ticket/backfill_ticket. Authority persists these as claims and audit properties for traceability of capacity-affecting operations.
Implementation Details
- Modules:
src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Domain/,src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Backfill/,src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.WebService/ - Key Classes:
Quota(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Domain/Quota.cs) - quota entity with limits, current usage, and allocation metadataBackfillRequest(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Domain/BackfillRequest.cs) - backfill request model with reason, ticket, and scopeBackfillManager(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Backfill/BackfillManager.cs) - manages backfill operations with duplicate suppression and event time window trackingDuplicateSuppressor(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Backfill/DuplicateSuppressor.cs) - prevents duplicate backfill requests within a time windowEventTimeWindow(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Backfill/EventTimeWindow.cs) - time window for backfill event deduplicationQuotaEndpoints(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.WebService/Endpoints/QuotaEndpoints.cs) - REST API for quota management (view, adjust, allocate)QuotaContracts(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.WebService/Contracts/QuotaContracts.cs) - API contracts for quota operationsAuditEntry(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Core/Domain/AuditEntry.cs) - audit entry capturing quota/backfill actions with reason and ticketTenantResolver(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.WebService/Services/TenantResolver.cs) - resolves tenant context for quota scoping
- Interfaces:
IQuotaRepository(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Infrastructure/Repositories/IQuotaRepository.cs),IBackfillRepository(src/JobEngine/StellaOps.JobEngine/StellaOps.JobEngine.Infrastructure/Repositories/IBackfillRepository.cs) - Source: Feature matrix scan
E2E Test Plan
- Request a quota adjustment via
QuotaEndpointswithquota_reasonandquota_ticket; verify the adjustment is applied and audited inAuditEntry - Attempt a quota adjustment without
quota_reasonand verify it is rejected with a 400 error - Request a backfill via
BackfillManagerwithbackfill_reasonand verify the backfill is initiated - Submit a duplicate backfill request within the
EventTimeWindowand verifyDuplicateSuppressorrejects it - Verify audit trail: check the
AuditEntryfor the quota adjustment and confirm reason and ticket are captured - Query current quota usage via
QuotaEndpointsand verify limits and current usage are returned - Adjust quota beyond the maximum limit and verify the operation is rejected by policy
- Verify tenant scoping via
TenantResolver: adjust quota for tenant A and verify tenant B's quota is unchanged