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

@@ -258,3 +258,67 @@ All operations log with:
- [CI/CD Gate Flow](../../flows/10-cicd-gate-flow.md)
- [Authority Architecture](../authority/architecture.md)
- [Scanner Architecture](../scanner/architecture.md)
## AI Code Guard Standalone Run (Sprint 20260208_040)
This sprint adds deterministic standalone execution for AI Code Guard checks in the Integrations WebService.
### API Surface
- Endpoint: `POST /api/v1/integrations/ai-code-guard/run`
- Mapped in: `src/Integrations/StellaOps.Integrations.WebService/IntegrationEndpoints.cs`
- Service contract: `IAiCodeGuardRunService` in `src/Integrations/StellaOps.Integrations.WebService/AiCodeGuard/AiCodeGuardRunService.cs`
The endpoint executes the equivalent of `stella guard run` behavior through an offline-safe API surface inside the Integrations module.
### YAML-Driven Configuration
Configuration is parsed by `AiCodeGuardPipelineConfigLoader`:
- `secrets` / `enableSecretsScan`
- `attribution` / `enableAttributionCheck`
- `license` / `enableLicenseHygiene`
- `maxFindings`
- `allowedSpdxLicenses` / `licenseAllowList`
- `customSecretPatterns` / `secretPatterns`
The loader is deterministic and rejects unsupported keys or invalid values with explicit `FormatException` errors.
### Scanning Behavior
`AiCodeGuardRunService` adds deterministic checks for:
- Secrets (built-in + optional custom regex patterns)
- Attribution markers
- SPDX license presence / allow-list validation
Output ordering is stable:
1. Severity descending
2. Path ordinal
3. Line number
4. Rule ID
5. Finding ID
### Contracts
New contracts in `src/Integrations/__Libraries/StellaOps.Integrations.Contracts/AiCodeGuardRunContracts.cs`:
- `AiCodeGuardRunRequest`
- `AiCodeGuardSourceFile`
- `AiCodeGuardRunConfiguration`
- `AiCodeGuardRunResponse`
### Test Evidence
Validated in `src/Integrations/__Tests/StellaOps.Integrations.Tests/AiCodeGuardRunServiceTests.cs`:
- Deterministic repeated output
- YAML configuration application and max-finding truncation
- Invalid YAML validation failure
Execution command:
- `dotnet test src/Integrations/__Tests/StellaOps.Integrations.Tests/StellaOps.Integrations.Tests.csproj -p:BuildProjectReferences=false --no-restore`
Result on 2026-02-08: passed (`37/37`).