Files
git.stella-ops.org/docs/features/unchecked/binaryindex/binaryindex-ops-endpoints.md

28 lines
1.9 KiB
Markdown

# BinaryIndex Ops Endpoints (Health, Bench, Cache Stats, Config)
## Module
BinaryIndex
## Status
IMPLEMENTED
## Description
Ops endpoints for BinaryIndex: health (lifter warmness), bench/run (latency measurement), cache stats (Valkey hit/miss), and effective config with deterministic JSON responses.
## Implementation Details
- **Modules**: `src/BinaryIndex/StellaOps.BinaryIndex.WebService/`
- **Key Classes**:
- `BinaryIndexOpsController` (`src/BinaryIndex/StellaOps.BinaryIndex.WebService/Controllers/BinaryIndexOpsController.cs`) - exposes `GET /ops/health`, bench, cache stats, and config endpoints; integrates with `B2R2LifterPool` and `FunctionIrCacheService`
- `B2R2LifterPool` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.Disassembly.B2R2/B2R2LifterPool.cs`) - provides pool stats (warm ISAs, pool sizes, acquire timeouts)
- `FunctionIrCacheService` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.Cache/FunctionIrCacheService.cs`) - Valkey-based function IR cache with hit/miss reporting
- `B2R2LifterPoolOptions` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.Disassembly.B2R2/B2R2LifterPoolOptions.cs`) - pool configuration (MaxPoolSizePerIsa, EnableWarmPreload, AcquireTimeout)
- `BinaryIndexOptions` (`src/BinaryIndex/__Libraries/StellaOps.BinaryIndex.Core/Configuration/BinaryIndexOptions.cs`) - top-level options with B2R2Pool, SemanticLifting sections
- **Source**: SPRINT_20260112_004_BINIDX_b2r2_lowuir_perf_cache.md
## E2E Test Plan
- [ ] Call `GET /ops/health` and verify response includes lifter pool warmness state and component versions
- [ ] Call bench endpoint and verify deterministic latency measurement JSON
- [ ] Call cache stats endpoint and verify Valkey hit/miss counts and cache key count
- [ ] Call config endpoint and verify effective configuration is returned with secrets redacted
- [ ] Verify all ops responses use deterministic JSON serialization (consistent key ordering)