120 lines
7.2 KiB
Markdown
120 lines
7.2 KiB
Markdown
# Graph Query and Search API
|
|
|
|
## Module
|
|
Graph
|
|
|
|
## Status
|
|
VERIFIED
|
|
|
|
## Description
|
|
Graph API with query, search, and path services for traversing and querying dependency graphs.
|
|
|
|
## Implementation Details
|
|
- **Query service**: `src/Graph/StellaOps.Graph.Api/Services/IGraphQueryService.cs`, `InMemoryGraphQueryService.cs` -- graph node/edge query with filtering
|
|
- **Search service**: `src/Graph/StellaOps.Graph.Api/Services/IGraphSearchService.cs`, `InMemoryGraphSearchService.cs` -- full-text search across graph entities
|
|
- **Path service**: `src/Graph/StellaOps.Graph.Api/Services/IGraphPathService.cs`, `InMemoryGraphPathService.cs` -- shortest-path and reachability path queries
|
|
- **Repository**: `src/Graph/StellaOps.Graph.Api/Services/InMemoryGraphRepository.cs` -- in-memory graph data store
|
|
- **Search contracts**: `src/Graph/StellaOps.Graph.Api/Contracts/SearchContracts.cs` -- search request/response DTOs
|
|
- **Lineage contracts**: `src/Graph/StellaOps.Graph.Api/Contracts/LineageContracts.cs` -- lineage query contracts
|
|
- **Reachability contracts**: `src/Graph/StellaOps.Graph.Api/Contracts/ReachabilityContracts.cs` -- reachability query contracts
|
|
- **Rate limiting**: `src/Graph/StellaOps.Graph.Api/Services/RateLimiterService.cs` -- query rate limiting
|
|
- **Tests**: `src/Graph/__Tests/StellaOps.Graph.Api.Tests/QueryServiceTests.cs`, `SearchServiceTests.cs`, `PathServiceTests.cs`, `RateLimiterServiceTests.cs`
|
|
- **Source**: Feature matrix scan
|
|
|
|
## E2E Test Plan
|
|
- [x] Verify query API returns nodes and edges matching filter criteria
|
|
- [x] Test full-text search returns ranked results across graph entities
|
|
- [x] Verify path queries find shortest paths between nodes
|
|
- [x] Test rate limiting prevents query abuse
|
|
- [x] Verify search contracts handle empty results and pagination
|
|
|
|
## Verification
|
|
- **Run ID**: run-001
|
|
- **Date**: 2026-02-09T16:00:00Z
|
|
- **Tier**: 1 (Build + Test)
|
|
- **Result**: PASS
|
|
- **Evidence**: Query/search/path/rate-limiter tests all pass. All source files verified (15/15).
|
|
|
|
### Tier 2 Recheck (API Behavior)
|
|
- **Run ID**: run-002
|
|
- **Date**: 2026-02-10T11:35:00Z
|
|
- **Tier**: 2 (End-to-end API verification)
|
|
- **Result**: PASS
|
|
- **Evidence**: Verified `POST /graph/search` and `POST /graph/query` behavior for authenticated, unauthorized, forbidden, and missing-tenant paths. Tier 2 artifact: `docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-002/tier2-api-check.json`.
|
|
|
|
### Tier 2 Recheck (Data Path)
|
|
- **Run ID**: run-003
|
|
- **Date**: 2026-02-10T11:47:30Z
|
|
- **Tier**: 2 (End-to-end API verification)
|
|
- **Result**: PASS
|
|
- **Evidence**: Revalidated runtime query/search data path after repository DI seeding fix. Verified non-empty node NDJSON responses for component queries. Artifact: `docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-003/tier2-api-check.json`.
|
|
|
|
## Recheck (Run-005)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2a API replay validated via Graph.Api integration suite.
|
|
- **Tests**: PASS (`src/Graph/__Tests/StellaOps.Graph.Api.Tests`: 66/66).
|
|
- **Tier 2 Evidence**: `docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-005/tier2-api-check.json`
|
|
- **Outcome**: Query/search API behavior remains healthy with tenant/auth coverage intact.
|
|
|
|
## Recheck (Run-006)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2 replay validated via Graph API/indexer suites.
|
|
- **Tests**: PASS (src/Graph/__Tests/StellaOps.Graph.Api.Tests: 66/66; src/Graph/__Tests/StellaOps.Graph.Indexer.Tests: 37/37; src/Graph/__Tests/StellaOps.Graph.Indexer.Persistence.Tests: 17/17).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-006/tier2-api-check.json
|
|
- **Outcome**: Query/search API behavior remains healthy with tenant/auth coverage intact.
|
|
|
|
## Recheck (Run-007)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2 replay validated via Graph API/indexer suites.
|
|
- **Tests**: PASS (src/Graph/__Tests/StellaOps.Graph.Api.Tests: 66/66; src/Graph/__Tests/StellaOps.Graph.Indexer.Tests: 37/37; src/Graph/__Tests/StellaOps.Graph.Indexer.Persistence.Tests: 17/17).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-007/tier2-api-check.json
|
|
- **Outcome**: Query/search API behavior remains healthy with tenant/auth coverage intact.
|
|
|
|
## Recheck (Run-008)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2 replay validated via Graph API/indexer suites.
|
|
- **Tests**: PASS (src/Graph/__Tests/StellaOps.Graph.Api.Tests: 66/66; src/Graph/__Tests/StellaOps.Graph.Indexer.Tests: 37/37; src/Graph/__Tests/StellaOps.Graph.Indexer.Persistence.Tests: 17/17).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-008/tier2-api-check.json
|
|
- **Outcome**: Query/search API behavior remains healthy with tenant/auth coverage intact.
|
|
|
|
## Recheck (Run-009)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2a API replay + deterministic integration suite replay.
|
|
- **Tests**: PASS (Graph.Api.Tests 66/66, Graph.Indexer.Tests 37/37, Graph.Indexer.Persistence.Tests 17/17).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-009/tier2-api-check.json
|
|
- **Outcome**: Checked Graph behavior remains healthy in continued replay.
|
|
|
|
|
|
## Recheck (Run-010)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2d deterministic integration replay.
|
|
- **Tests**: PASS (Graph Api 66/66, Indexer 37/37, Indexer.Persistence 17/17; total 120/120).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-010/tier2-integration-check.json
|
|
- **Outcome**: Checked graph behavior remains healthy in continued replay.
|
|
## Recheck (Run-011)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2d deterministic integration replay.
|
|
- **Tests**: PASS (Graph Api 66/66, Indexer 37/37, Indexer.Persistence 17/17; total 120/120).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-011/tier2-integration-check.json
|
|
- **Outcome**: Checked graph behavior remains healthy in continued replay.
|
|
## Recheck (Run-012)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2 replay + deterministic Graph suite replay.
|
|
- **Tests**: PASS (Graph.Api 66/66, Graph.Indexer 37/37, Graph.Indexer.Persistence 17/17; total 120/120).
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-012/tier2-api-check.json
|
|
- **Outcome**: Checked graph behavior remains healthy in continued replay.
|
|
|
|
## Recheck (Run-013)
|
|
- **Verified**: 2026-02-10
|
|
- **Method**: Tier 2d deterministic integration replay with fresh command-output evidence.
|
|
- **Tests**: PASS (Graph matrix 120/120: Api 66, Indexer 37, Indexer.Persistence 17.)
|
|
- **Tier 2 Evidence**: docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-013/tier2-integration-check.json
|
|
- **Outcome**: Checked Graph behavior remains healthy in continued replay.
|
|
|
|
## Recheck (Run-016)
|
|
- **Verified**: 2026-02-11
|
|
- **Method**: Strict Tier 2 API replay against live Graph API (`https://127.0.0.1:10200`) with fresh request/response captures.
|
|
- **Tests**: PASS (Graph solution replay 120/120: Api 66, Indexer 37, Indexer.Persistence 17).
|
|
- **Tier 2 Evidence**: `docs/qa/feature-checks/runs/graph/graph-query-and-search-api/run-016/tier2-api-check.json`
|
|
- **Outcome**: Query/search positive paths returned non-empty NDJSON data (search 3 rows, query 4 rows), and negative guards remained correct for missing auth/scope/tenant (401/403/400).
|