fix tests. new product advisories enhancements

This commit is contained in:
master
2026-01-25 19:11:36 +02:00
parent c70e83719e
commit 6e687b523a
504 changed files with 40610 additions and 3785 deletions

View File

@@ -45,7 +45,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
CancellationToken cancellationToken)
{
var groundtruth = new Command("groundtruth", "Ground-truth corpus management for function-matching validation.");
groundtruth.AddAlias("gt");
groundtruth.Aliases.Add("gt");
// Add subcommand groups
groundtruth.Add(BuildSourcesCommand(services, verboseOption, cancellationToken));
@@ -605,7 +605,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
CancellationToken cancellationToken)
{
var validate = new Command("validate", "Run validation harness against ground-truth corpus.");
validate.AddAlias("val");
validate.Aliases.Add("val");
// Common options
var postgresOption = new Option<string>("--postgres", "-p")
@@ -623,13 +623,11 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
};
var matcherOption = new Option<string>("--matcher", "-m")
{
Description = "Matcher type (semantic-diff, instruction-hash, ensemble)",
DefaultValue = "semantic-diff"
Description = "Matcher type (semantic-diff, instruction-hash, ensemble)"
};
var thresholdOption = new Option<double>("--threshold", "-t")
{
Description = "Minimum match score threshold (0.0-1.0)",
DefaultValue = 0.5
Description = "Minimum match score threshold (0.0-1.0)"
};
var pairFilterOption = new Option<string?>("--pairs")
{
@@ -645,8 +643,8 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
var verbose = parseResult.GetValue(verboseOption);
var postgres = parseResult.GetValue(postgresOption)!;
var name = parseResult.GetValue(nameOption)!;
var matcher = parseResult.GetValue(matcherOption)!;
var threshold = parseResult.GetValue(thresholdOption);
var matcher = parseResult.GetValue(matcherOption) ?? "semantic-diff";
var threshold = parseResult.GetValue(thresholdOption) == 0 ? 0.5 : parseResult.GetValue(thresholdOption);
var pairFilter = parseResult.GetValue(pairFilterOption);
return await ExecuteValidateRunAsync(services, postgres, name, matcher, threshold, pairFilter, verbose, ct);
});
@@ -655,8 +653,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
var list = new Command("list", "List validation runs.");
var limitOption = new Option<int>("--limit", "-l")
{
Description = "Maximum number of runs to list",
DefaultValue = 20
Description = "Maximum number of runs to list"
};
list.Add(limitOption);
list.Add(postgresOption);
@@ -664,7 +661,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
{
var verbose = parseResult.GetValue(verboseOption);
var postgres = parseResult.GetValue(postgresOption)!;
var limit = parseResult.GetValue(limitOption);
var limit = parseResult.GetValue(limitOption) == 0 ? 20 : parseResult.GetValue(limitOption);
return await ExecuteValidateListAsync(services, postgres, limit, verbose, ct);
});
@@ -689,8 +686,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
var export = new Command("export", "Export validation report.");
var formatOption = new Option<string>("--format", "-f")
{
Description = "Report format (markdown, html, json)",
DefaultValue = "markdown"
Description = "Report format (markdown, html, json)"
};
var outputOption = new Option<string?>("--output", "-o")
{
@@ -705,7 +701,7 @@ public sealed class GroundTruthCliCommandModule : ICliCommandModule
var verbose = parseResult.GetValue(verboseOption);
var postgres = parseResult.GetValue(postgresOption)!;
var runId = parseResult.GetValue(runIdOption)!;
var format = parseResult.GetValue(formatOption)!;
var format = parseResult.GetValue(formatOption) ?? "markdown";
var output = parseResult.GetValue(outputOption);
return await ExecuteValidateExportAsync(services, postgres, runId, format, output, verbose, ct);
});