save checkpoint
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Slice Query and Replay REST APIs
|
||||
|
||||
## Module
|
||||
Scanner
|
||||
|
||||
## Status
|
||||
VERIFIED
|
||||
|
||||
## Description
|
||||
REST API for on-demand reachability slice generation (POST /api/slices/query), retrieval by digest (GET /api/slices/{digest}), and byte-for-byte replay verification (POST /api/slices/replay) with detailed diff output on mismatch. Includes in-memory slice cache with configurable TTL.
|
||||
|
||||
## Implementation Details
|
||||
- **Slice Endpoints**:
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Endpoints/SliceEndpoints.cs` - `SliceEndpoints` providing REST API for slice query (POST), retrieval by digest (GET), and replay verification (POST)
|
||||
- **Slice Query Service**:
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Services/SliceQueryService.cs` - `SliceQueryService` executing on-demand reachability slice generation and retrieval
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Services/ISliceQueryService.cs` - Interface for slice query operations
|
||||
- **Score Replay**:
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Services/ScoreReplayService.cs` - `ScoreReplayService` performing byte-for-byte replay verification of slices with detailed diff output on mismatch
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Services/IScoreReplayService.cs` - Interface for replay service
|
||||
- `src/Scanner/StellaOps.Scanner.WebService/Endpoints/ScoreReplayEndpoints.cs` - `ScoreReplayEndpoints` REST API for replay verification
|
||||
- **Slice Cache**:
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Slices/SliceCache.cs` - `SliceCache` caching slices with configurable TTL
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Slices/InMemorySliceCache.cs` - `InMemorySliceCache` in-memory implementation
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Slices/ISliceCache.cs` - Interface for slice caching
|
||||
- **Slice Core**:
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Slices/SliceExtractor.cs` - `SliceExtractor` extracting reachability slices
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Reachability/Slices/SliceModels.cs` - Slice data models
|
||||
- **OCI Storage**:
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage.Oci/SlicePushService.cs` - `SlicePushService` pushing slices to OCI registries
|
||||
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage.Oci/SliceOciManifestBuilder.cs` - Building OCI manifests for slice storage
|
||||
- **Tests**:
|
||||
- `src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SliceEndpointsTests.cs` - Endpoint integration tests
|
||||
- `src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/Slices/SliceCacheTests.cs` - Cache tests
|
||||
- `src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/Slices/InMemorySliceCacheTests.cs` - In-memory cache tests
|
||||
|
||||
## E2E Test Plan
|
||||
- [ ] POST to /api/slices/query with a scan reference and verify a reachability slice is generated and returned with its content-addressed digest
|
||||
- [ ] GET /api/slices/{digest} and verify the previously generated slice is retrieved with correct content
|
||||
- [ ] POST to /api/slices/replay with a slice and verify byte-for-byte replay produces an identical slice (determinism check)
|
||||
- [ ] Introduce a modification and verify replay produces a detailed diff showing the mismatch
|
||||
- [ ] Verify the in-memory slice cache returns cached slices within TTL and regenerates after expiry
|
||||
- [ ] Verify slices are pushable to OCI registries via `SlicePushService`
|
||||
|
||||
---
|
||||
|
||||
## Verification
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| Tier 0 - Source files exist | PASS |
|
||||
| Tier 1 - Build + code review | PASS |
|
||||
| Tier 2 - Integration tests | PASS |
|
||||
| Verified | 2026-02-13T18:10:00Z |
|
||||
Reference in New Issue
Block a user