archive audit attempts

This commit is contained in:
master
2026-02-19 22:00:31 +02:00
parent c2f13fe588
commit b5829dce5c
19638 changed files with 6366 additions and 7 deletions

View File

@@ -0,0 +1,102 @@
# Audit - StellaOps.Zastava.Agent
## Project
- Path: src/Zastava/StellaOps.Zastava.Agent/StellaOps.Zastava.Agent.csproj
- Module: Zastava
- Kind: Library
- Audit date (UTC): 2026-01-30
- Files scanned: 15
- Files with issues: 14
- File-level report: docs/implplan/audits/csproj-standards/file-audit.csv
## Coding Standards Findings
- Status: FAIL
- Nullable: enable
- TreatWarningsAsErrors: explicit true
- Deterministic: inherited true
- 100-line rule violations: 9
- Namespace violations: 14
- Using directive violations: 0
- Naming violations (interfaces/fields/const/async): 0
- Service locator usage (BuildServiceProvider/GetService): 0
- Assembly.LoadFrom usage: 0
### Details
- 100-line files:
- src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs (131 lines)
- src/Zastava/StellaOps.Zastava.Agent/Configuration/ZastavaAgentOptions.cs (209 lines)
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerEventModels.cs (214 lines)
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs (297 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs (113 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs (354 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs (277 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs (305 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs (212 lines)
- Namespace issues:
- src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Configuration/ZastavaAgentOptions.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerEventModels.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Docker/IDockerSocketClient.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/StellaOps.Zastava.Agent.AssemblyInfo.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/StellaOps.Zastava.Agent.GlobalUsings.g.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/obj/Release/net10.0/StellaOps.Zastava.Agent.GlobalUsings.g.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs: missing namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs: missing namespace
- Using directive issues:
- none
- Naming issues:
- none
- Async issues:
- none
- Service locator matches:
- none
- Assembly.LoadFrom matches:
- none
### Fix Guidance
- Normalize namespaces to file-scoped StellaOps.<Area>.
- Split files over 100 lines into smaller types or partials.
## File-Level Findings
- Status: FAIL
- Files scanned: 15
- Files with issues: 14
- See docs/implplan/audits/csproj-standards/file-audit.csv for full per-file status.
| File | Issues | Fix guidance |
| --- | --- | --- |
| src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Configuration/ZastavaAgentOptions.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Docker/DockerEventModels.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Docker/IDockerSocketClient.cs | NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>; |
| src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs | NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>; |
| src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/StellaOps.Zastava.Agent.AssemblyInfo.cs | NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>; |
| src/Zastava/StellaOps.Zastava.Agent/obj/Debug/net10.0/StellaOps.Zastava.Agent.GlobalUsings.g.cs | NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>; |
| src/Zastava/StellaOps.Zastava.Agent/obj/Release/net10.0/StellaOps.Zastava.Agent.GlobalUsings.g.cs | NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>; |
| src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs | FileLength>100; NamespaceMissing | Add file-scoped namespace: namespace StellaOps.<Area>;; Split file to stay <= 100 lines. |
## Testing Fullness Findings
- Status: FAIL
- Expected layers (heuristic): Unit
- Detected test projects: none
- Missing layers: Unit
### Manual checks required
- Observability contract tests for WebService/Worker.
- Intent tags for regulatory modules (Policy, Authority, Signer, Attestor, EvidenceLocker).
- Offline execution (tests must run without network access).
- Coverage matrix alignment (docs/technical/testing/TEST_COVERAGE_MATRIX.md).
### Fix Guidance
- Add or expand test projects to cover missing layers.
- Ensure tests use deterministic fixtures and offline harnesses.

View File

@@ -0,0 +1,99 @@
# Audit - StellaOps.Zastava.Agent
## Project
- Path: src/Zastava/StellaOps.Zastava.Agent/StellaOps.Zastava.Agent.csproj
- Module: Zastava
- Kind: Library
- Audit date (UTC): 2026-01-31
- Files scanned: 11
- Files with issues: 10
- File-level report: docs/implplan/audits/csproj-standards/file-audit.csv
## Coding Standards Findings
- Status: FAIL
- Nullable: enable
- TreatWarningsAsErrors: explicit true
- Deterministic: inherited true
- 100-line rule violations: 9
- Namespace violations: 1
- Using directive violations: 2
- Naming violations (interfaces/fields/const/async): 10
- Service locator usage (BuildServiceProvider/GetService): 2
- Assembly.LoadFrom usage: 0
### Details
- 100-line files:
- src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs (132 lines)
- src/Zastava/StellaOps.Zastava.Agent/Configuration/ZastavaAgentOptions.cs (210 lines)
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerEventModels.cs (214 lines)
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs (298 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs (113 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs (355 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs (278 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs (306 lines)
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs (213 lines)
- Namespace issues:
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs: namespace not StellaOps.*
- Using directive issues:
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs: using directives inside namespace
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs: using directives inside namespace
- Naming issues:
- src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs: private field naming
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs: private field naming
- src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs: private field naming
- Async issues:
- src/Zastava/StellaOps.Zastava.Agent/Program.cs: missing ConfigureAwait(false)
- src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs: async method naming
- src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs: async method naming
- src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs: async method naming
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs: async method naming
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs: blocking async usage
- src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs: async method naming
- Service locator matches:
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs:74 var optionsMonitor = provider.GetRequiredService<IOptionsMonitor<ZastavaAgentOptions>>();
- src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs:86 options.TenantResolver = sp => sp.GetRequiredService<IOptions<ZastavaRuntimeOptions>>().Value.Tenant;
- Assembly.LoadFrom matches:
- none
### Fix Guidance
- Align interface/field/const naming to standards.
- Move and sort using directives (outside namespace).
- Normalize namespaces to file-scoped StellaOps.<Area>.
- Rename async methods and avoid blocking async calls.
- Replace service locator usage with constructor injection.
- Split files over 100 lines into smaller types or partials.
## File-Level Findings
- Status: FAIL
- Files scanned: 11
- Files with issues: 10
- See docs/implplan/audits/csproj-standards/file-audit.csv for full per-file status.
| File | Issues | Fix guidance |
| --- | --- | --- |
| src/Zastava/StellaOps.Zastava.Agent/Program.cs | ConfigureAwaitMissing | Add ConfigureAwait(false) to awaited calls in library-like code. |
| src/Zastava/StellaOps.Zastava.Agent/Backend/RuntimeEventsClient.cs | FileLength>100; PrivateFieldNaming | Rename private fields to _camelCase.; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Configuration/ZastavaAgentOptions.cs | FileLength>100 | Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Docker/DockerEventModels.cs | FileLength>100 | Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Docker/DockerSocketClient.cs | AsyncNaming; FileLength>100; PrivateFieldNaming; UsingInsideNamespace | Move using directives outside namespace.; Rename async methods to end with Async.; Rename private fields to _camelCase.; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/AgentServiceCollectionExtensions.cs | FileLength>100; NamespaceNotStellaOps; ServiceLocator | Remove service locator usage; use constructor injection.; Split file to stay <= 100 lines.; Update namespace to StellaOps.<Area>. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/DockerEventHostedService.cs | AsyncNaming; FileLength>100 | Rename async methods to end with Async.; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/HealthCheckHostedService.cs | AsyncNaming; FileLength>100; PrivateFieldNaming | Rename async methods to end with Async.; Rename private fields to _camelCase.; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventBuffer.cs | AsyncNaming; BlockingAsync; FileLength>100 | Rename async methods to end with Async.; Replace .Result/.Wait/GetAwaiter().GetResult() with await.; Split file to stay <= 100 lines. |
| src/Zastava/StellaOps.Zastava.Agent/Worker/RuntimeEventDispatchService.cs | AsyncNaming; FileLength>100; UsingInsideNamespace | Move using directives outside namespace.; Rename async methods to end with Async.; Split file to stay <= 100 lines. |
## Testing Fullness Findings
- Status: FAIL
- Expected layers (heuristic): Unit
- Detected test projects: none
- Missing layers: Unit
### Manual checks required
- Observability contract tests for WebService/Worker.
- Intent tags for regulatory modules (Policy, Authority, Signer, Attestor, EvidenceLocker).
- Offline execution (tests must run without network access).
- Coverage matrix alignment (docs/technical/testing/TEST_COVERAGE_MATRIX.md).
### Fix Guidance
- Add or expand test projects to cover missing layers.
- Ensure tests use deterministic fixtures and offline harnesses.