more features checks. setup improvements
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "source-verification",
|
||||
"capturedAtUtc": "2026-02-12T21:50:00Z",
|
||||
"feature": "ai-code-guard",
|
||||
"module": "integrations",
|
||||
"sourceFilesExpected": [
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Contracts/AiCodeGuardAnnotationContracts.cs",
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Contracts/AiCodeGuardRunContracts.cs",
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Services/AiCodeGuard/AiCodeGuardAnnotationService.cs",
|
||||
"src/Integrations/StellaOps.Integrations.WebService/AiCodeGuard/AiCodeGuardRunService.cs",
|
||||
"src/Integrations/StellaOps.Integrations.WebService/AiCodeGuard/AiCodeGuardPipelineConfigLoader.cs"
|
||||
],
|
||||
"sourceFilesFound": [
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Contracts/AiCodeGuardAnnotationContracts.cs",
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Contracts/AiCodeGuardRunContracts.cs",
|
||||
"src/Integrations/__Libraries/StellaOps.Integrations.Services/AiCodeGuard/AiCodeGuardAnnotationService.cs",
|
||||
"src/Integrations/StellaOps.Integrations.WebService/AiCodeGuard/AiCodeGuardRunService.cs",
|
||||
"src/Integrations/StellaOps.Integrations.WebService/AiCodeGuard/AiCodeGuardPipelineConfigLoader.cs"
|
||||
],
|
||||
"sourceFilesPercent": 100,
|
||||
"verdict": "pass"
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"type": "code-review",
|
||||
"capturedAtUtc": "2026-02-12T21:50:00Z",
|
||||
"feature": "ai-code-guard",
|
||||
"module": "integrations",
|
||||
"checklist": {
|
||||
"mainClassExistsWithNonTrivialImplementation": true,
|
||||
"logicMatchesFeatureDescription": true,
|
||||
"unitTestsExerciseCoreBehavior": true,
|
||||
"testsAssertMeaningfulOutcomes": true
|
||||
},
|
||||
"sourceReview": {
|
||||
"AiCodeGuardAnnotationContracts.cs": "456 lines. Non-trivial DTOs: AiCodeGuardStatusRequest, AiCodeGuardSummary (with ToDescription), AiCodeGuardAnnotationRequest, AiCodeGuardFindingAnnotation, AiCodeGuardAnnotationResponse, AiCodeGuardCommentBuilder (BuildSummaryComment). Rich domain model with JSON serialization.",
|
||||
"AiCodeGuardRunContracts.cs": "131 lines. AiCodeGuardRunRequest, AiCodeGuardSourceFile, AiCodeGuardRunConfiguration (secrets/attribution/license flags, max findings, SPDX allow list, custom secret patterns), AiCodeGuardRunResponse.",
|
||||
"AiCodeGuardAnnotationService.cs": "551 lines. IAiCodeGuardAnnotationService interface with PostStatusAsync, PostAnnotationsAsync, PostSummaryCommentAsync. Two implementations: GitHubAiCodeGuardAnnotationService (check run API, deterministic annotation ordering) and GitLabAiCodeGuardAnnotationService (MR discussion comments).",
|
||||
"AiCodeGuardRunService.cs": "397 lines. Full standalone runner: 3 built-in secret regex rules (AWS, GitHub token, private key), attribution marker scanning, SPDX license header validation. Deterministic ordering, SHA256-based finding IDs.",
|
||||
"AiCodeGuardPipelineConfigLoader.cs": "194 lines. YAML config parser supporting secrets/attribution/license toggles, maxFindings, allowedSpdxLicenses, customSecretPatterns with regex validation."
|
||||
},
|
||||
"testReview": {
|
||||
"AiCodeGuardRunServiceTests": "3 tests: deterministic findings+summary, YAML config application with maxFindings, invalid YAML throws FormatException.",
|
||||
"AiCodeGuardAnnotationServiceTests": "14 tests: status mapping (5 cases), description truncation, annotation ordering, max annotations limit, summary description, comment builder (ASCII-only, all sections, deterministic), error handling, GitLab-specific tests."
|
||||
},
|
||||
"verdict": "pass"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"type": "integration",
|
||||
"capturedAtUtc": "2026-02-12T21:50:00Z",
|
||||
"feature": "ai-code-guard",
|
||||
"module": "integrations",
|
||||
"testProject": "src/Integrations/__Tests/StellaOps.Integrations.Tests/StellaOps.Integrations.Tests.csproj",
|
||||
"testFilter": "AiCodeGuardRunServiceTests + AiCodeGuardAnnotationServiceTests",
|
||||
"testsRun": 17,
|
||||
"testsPassed": 17,
|
||||
"testsFailed": 0,
|
||||
"behaviorVerified": [
|
||||
"Secrets scanning: detects AWS access keys, GitHub PATs, private key material via built-in regex rules",
|
||||
"Custom secret patterns: supports user-defined regex via YAML config",
|
||||
"Attribution detection: scans for AI attribution markers (ChatGPT, Copilot, ai-generated)",
|
||||
"License hygiene: checks SPDX-License-Identifier headers, validates against allow list",
|
||||
"YAML pipeline config: parses secrets/attribution/license toggles, maxFindings, custom patterns",
|
||||
"Deterministic output: findings ordered by severity/path/line/ruleId, SHA256-based finding IDs",
|
||||
"GitHub annotation service: maps status to SCM states, posts check runs with annotations",
|
||||
"GitLab annotation service: posts MR discussion comments per finding",
|
||||
"Annotation ordering: sorts by severity descending then path then line",
|
||||
"Max annotations limit: respects MaxAnnotations cap with correct posted/skipped counts",
|
||||
"Comment builder: produces ASCII-only markdown, includes severity table and top findings",
|
||||
"Error handling: graceful degradation on API failures, null argument validation"
|
||||
],
|
||||
"verdict": "pass"
|
||||
}
|
||||
Reference in New Issue
Block a user