partly or unimplemented features - now implemented

This commit is contained in:
master
2026-02-09 08:53:51 +02:00
parent 1bf6bbf395
commit 4bdc298ec1
674 changed files with 90194 additions and 2271 deletions

View File

@@ -0,0 +1,130 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization;
namespace StellaOps.Integrations.Contracts.AiCodeGuard;
/// <summary>
/// Standalone AI Code Guard execution request.
/// </summary>
public sealed record AiCodeGuardRunRequest
{
/// <summary>
/// Repository owner (organization or user).
/// </summary>
[JsonPropertyName("owner")]
public required string Owner { get; init; }
/// <summary>
/// Repository name.
/// </summary>
[JsonPropertyName("repo")]
public required string Repo { get; init; }
/// <summary>
/// Commit SHA associated with this run.
/// </summary>
[JsonPropertyName("commitSha")]
public required string CommitSha { get; init; }
/// <summary>
/// Optional YAML pipeline configuration.
/// </summary>
[JsonPropertyName("configYaml")]
public string? ConfigYaml { get; init; }
/// <summary>
/// Files to analyze.
/// </summary>
[JsonPropertyName("files")]
public ImmutableArray<AiCodeGuardSourceFile> Files { get; init; } = [];
}
/// <summary>
/// Source file payload for AI Code Guard analysis.
/// </summary>
public sealed record AiCodeGuardSourceFile
{
/// <summary>
/// File path relative to repository root.
/// </summary>
[JsonPropertyName("path")]
public required string Path { get; init; }
/// <summary>
/// File content.
/// </summary>
[JsonPropertyName("content")]
public required string Content { get; init; }
}
/// <summary>
/// Effective runtime configuration for AI Code Guard checks.
/// </summary>
public sealed record AiCodeGuardRunConfiguration
{
/// <summary>
/// Whether secret scanning is enabled.
/// </summary>
[JsonPropertyName("enableSecretsScan")]
public bool EnableSecretsScan { get; init; } = true;
/// <summary>
/// Whether attribution checks are enabled.
/// </summary>
[JsonPropertyName("enableAttributionCheck")]
public bool EnableAttributionCheck { get; init; } = true;
/// <summary>
/// Whether license hygiene checks are enabled.
/// </summary>
[JsonPropertyName("enableLicenseHygiene")]
public bool EnableLicenseHygiene { get; init; } = true;
/// <summary>
/// Maximum number of findings to include in output.
/// </summary>
[JsonPropertyName("maxFindings")]
public int MaxFindings { get; init; } = 200;
/// <summary>
/// Optional SPDX allow list. If empty, only missing-license checks are applied.
/// </summary>
[JsonPropertyName("allowedSpdxLicenses")]
public ImmutableArray<string> AllowedSpdxLicenses { get; init; } = [];
/// <summary>
/// Additional custom secret regex patterns.
/// </summary>
[JsonPropertyName("customSecretPatterns")]
public ImmutableArray<string> CustomSecretPatterns { get; init; } = [];
}
/// <summary>
/// Standalone AI Code Guard execution response.
/// </summary>
public sealed record AiCodeGuardRunResponse
{
/// <summary>
/// Overall status derived from detected findings.
/// </summary>
[JsonPropertyName("status")]
public required AiCodeGuardAnalysisStatus Status { get; init; }
/// <summary>
/// Finding severity summary.
/// </summary>
[JsonPropertyName("summary")]
public required AiCodeGuardSummary Summary { get; init; }
/// <summary>
/// Deterministically ordered findings.
/// </summary>
[JsonPropertyName("findings")]
public ImmutableArray<AiCodeGuardFindingAnnotation> Findings { get; init; } = [];
/// <summary>
/// Effective configuration after YAML parsing and defaults.
/// </summary>
[JsonPropertyName("configuration")]
public required AiCodeGuardRunConfiguration Configuration { get; init; }
}

View File

@@ -1,4 +1,4 @@
# StellaOps.Integrations.Contracts Task Board
# StellaOps.Integrations.Contracts Task Board
This board mirrors active sprint tasks for this module.
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
@@ -6,3 +6,7 @@ Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_sol
| --- | --- | --- |
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Integrations/__Libraries/StellaOps.Integrations.Contracts/StellaOps.Integrations.Contracts.md. |
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |
| SPRINT_20260208_040-CONTRACTS | DONE | AI Code Guard run/request/config contracts for deterministic standalone execution. |