feat: Implement Scheduler Worker Options and Planner Loop
- Added `SchedulerWorkerOptions` class to encapsulate configuration for the scheduler worker. - Introduced `PlannerBackgroundService` to manage the planner loop, fetching and processing planning runs. - Created `PlannerExecutionService` to handle the execution logic for planning runs, including impact targeting and run persistence. - Developed `PlannerExecutionResult` and `PlannerExecutionStatus` to standardize execution outcomes. - Implemented validation logic within `SchedulerWorkerOptions` to ensure proper configuration. - Added documentation for the planner loop and impact targeting features. - Established health check endpoints and authentication mechanisms for the Signals service. - Created unit tests for the Signals API to ensure proper functionality and response handling. - Configured options for authority integration and fallback authentication methods.
This commit is contained in:
		@@ -0,0 +1,29 @@
 | 
			
		||||
using System.Security.Claims;
 | 
			
		||||
using System.Text.Encodings.Web;
 | 
			
		||||
using Microsoft.AspNetCore.Authentication;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using Microsoft.Extensions.Options;
 | 
			
		||||
 | 
			
		||||
namespace StellaOps.Signals.Authentication;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Authentication handler used during development fallback.
 | 
			
		||||
/// </summary>
 | 
			
		||||
internal sealed class AnonymousAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions>
 | 
			
		||||
{
 | 
			
		||||
    public AnonymousAuthenticationHandler(
 | 
			
		||||
        IOptionsMonitor<AuthenticationSchemeOptions> options,
 | 
			
		||||
        ILoggerFactory logger,
 | 
			
		||||
        UrlEncoder encoder)
 | 
			
		||||
        : base(options, logger, encoder)
 | 
			
		||||
    {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected override Task<AuthenticateResult> HandleAuthenticateAsync()
 | 
			
		||||
    {
 | 
			
		||||
        var identity = new ClaimsIdentity();
 | 
			
		||||
        var principal = new ClaimsPrincipal(identity);
 | 
			
		||||
        var ticket = new AuthenticationTicket(principal, Scheme.Name);
 | 
			
		||||
        return Task.FromResult(AuthenticateResult.Success(ticket));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user