2.9 KiB
2.9 KiB
Scanner Platform Events (Redis Streams)
Module
Platform
Status
VERIFIED
Description
Scanner WebService events are ingested by Platform Analytics from the configured stream. The ingestion path now supports scanner.event.report.ready and scanner.scan.completed, handles scanner DSSE payload decoding for report-ready content, and resumes from persisted stream checkpoints after restart.
Implementation Details
- AnalyticsIngestionService:
src/Platform/StellaOps.Platform.Analytics/Services/AnalyticsIngestionService.cs-- subscribes to scanner stream; supports bothOrchestratorEventKinds.ScannerReportReadyandOrchestratorEventKinds.ScannerScanCompleted; resolves report payloads from direct JSON, wrappedreportReady, and DSSE envelopes; persists and restores scanner stream checkpoints. - ScannerOrchestratorEvents:
src/Platform/StellaOps.Platform.Analytics/Models/ScannerOrchestratorEvents.cs-- scanner event models, includingScanCompletedEventPayloadand scanner event-kind constants. - AnalyticsIngestionOptions:
src/Platform/StellaOps.Platform.Analytics/Options/AnalyticsIngestionOptions.cs-- stream settings includeResumeFromCheckpointand optionalScannerCheckpointFilePath. - IEventStream/IEventStreamFactory:
src/Router/__Libraries/StellaOps.Messaging/Abstractions/IEventStream.cs-- stream subscription withStreamPosition.After(entryId)checkpoint resume support. - Tests:
src/Platform/__Tests/StellaOps.Platform.Analytics.Tests/ScannerPlatformEventsBehaviorTests.cs. - Source: 2025-10-19-scanner-policy.md
E2E Test Plan
- Verify scanner report-ready events (
scanner.event.report.ready) are consumed and processed by analytics ingestion. - Verify scanner scan-completed events (
scanner.scan.completed) are accepted and mapped into report-ready ingestion payloads. - Verify DSSE envelope payloads are decoded and parsed into report-ready scanner payloads.
- Verify scanner stream checkpoint normalization and subscription position resolution for restart resume.
- Verify tenant filtering skips events from non-allowed tenants.
Verification
- Verified on 2026-02-11 with
run-003. - Tier 0 source checks passed with scanner event-kind, DSSE parser, and checkpoint resume declarations present.
- Tier 1 build + tests passed (
185/185) with code-review parity confirming previously missing scanner-event claims are implemented. - Tier 2 behavioral/e2e checks passed (
38/38) across scanner event behavior tests, Docker-backed analytics schema integration, and tenant normalization checks. - Evidence:
docs/qa/feature-checks/runs/platform/scanner-platform-events/run-003/tier0-source-check.jsondocs/qa/feature-checks/runs/platform/scanner-platform-events/run-003/tier1-build-check.jsondocs/qa/feature-checks/runs/platform/scanner-platform-events/run-003/tier2-integration-check.jsondocs/qa/feature-checks/runs/platform/scanner-platform-events/run-003/retest-result.json