< Summary

Information
Class: Orchestrator.Commands.Observability.ReconstructPrompt.ReconstructPromptSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ReconstructPrompt/ReconstructPromptSettings.cs
Line coverage
63%
Covered lines: 14
Uncovered lines: 8
Coverable lines: 22
Total lines: 89
Line coverage: 63.6%
Branch coverage
57%
Covered branches: 8
Total branches: 14
Branch coverage: 57.1%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
Validate()57.14%311455.56%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ReconstructPrompt/ReconstructPromptSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using EHonda.KicktippAi.Core;
 3using Spectre.Console;
 4using Spectre.Console.Cli;
 5
 6namespace Orchestrator.Commands.Observability.ReconstructPrompt;
 7
 8public class ReconstructPromptSettings : CommandSettings
 9{
 10    [CommandArgument(0, "<MODEL>")]
 11    [Description("The model used for the stored prediction")]
 112    public string Model { get; set; } = string.Empty;
 13
 14    [CommandOption("--community-context")]
 15    [Description("Community context used for the stored prediction")]
 116    public string CommunityContext { get; set; } = string.Empty;
 17
 18    [CommandOption("--home")]
 19    [Description("Home team name")]
 120    public string HomeTeam { get; set; } = string.Empty;
 21
 22    [CommandOption("--away")]
 23    [Description("Away team name")]
 124    public string AwayTeam { get; set; } = string.Empty;
 25
 26    [CommandOption("--matchday")]
 27    [Description("Matchday number for the selected match")]
 28    public int? Matchday { get; set; }
 29
 30    [CommandOption("--with-justification")]
 31    [Description("Reconstruct the justification prompt variant")]
 32    [DefaultValue(false)]
 33    public bool WithJustification { get; set; }
 34
 35    [CommandOption("--reasoning-effort")]
 36    [Description("Optional OpenAI reasoning effort used for the stored prediction (none, minimal, low, medium, high, xhi
 37    public string? ReasoningEffort { get; set; }
 38
 39    [CommandOption("--evaluation-time")]
 40    [Description("Optional explicit evaluation time in NodaTime invariant ZonedDateTime 'G' format, for example '2026-03
 41    public string? EvaluationTime { get; set; }
 42
 43    public override ValidationResult Validate()
 44    {
 145        if (string.IsNullOrWhiteSpace(Model))
 46        {
 047            return ValidationResult.Error("Model is required");
 48        }
 49
 150        if (string.IsNullOrWhiteSpace(CommunityContext))
 51        {
 052            return ValidationResult.Error("--community-context is required");
 53        }
 54
 155        if (string.IsNullOrWhiteSpace(HomeTeam))
 56        {
 057            return ValidationResult.Error("--home must be provided");
 58        }
 59
 160        if (string.IsNullOrWhiteSpace(AwayTeam))
 61        {
 062            return ValidationResult.Error("--away must be provided");
 63        }
 64
 165        if (!Matchday.HasValue)
 66        {
 067            return ValidationResult.Error("--matchday must be provided");
 68        }
 69
 170        if (!string.IsNullOrWhiteSpace(EvaluationTime))
 71        {
 72            try
 73            {
 174                _ = Commands.Observability.EvaluationTimeParser.Parse(EvaluationTime);
 175            }
 76            catch (ArgumentException ex)
 77            {
 078                return ValidationResult.Error(ex.Message);
 79            }
 80        }
 81
 182        if (!PredictionModelConfig.IsValidReasoningEffort(ReasoningEffort))
 83        {
 084            return ValidationResult.Error("--reasoning-effort must be one of: none, minimal, low, medium, high, xhigh");
 85        }
 86
 187        return ValidationResult.Success();
 088    }
 89}

Methods/Properties

.ctor()
Validate()