Testing and Validation Strategy
Test Levels
Unit
- Spectrum validation.
- Plan generation.
- ShardPlan freezing.
- Actor state machine.
- Backend state machine.
- Bridge message mapping.
- Metric aggregation.
- Histogram encoding/decoding.
Contract / Conformance
- Rust Controller ↔ Rust Worker.
- Rust Supervisor ↔ Python Bridge.
- Protobuf codegen consistency across languages.
- Event sequences and repeated-event handling.
- Declared capabilities matching actual behavior.
- HDR V2 blob merging consistency across implementations.
Integration
- KBEngine Bots startup and Bridge registration.
- Batch creation.
- Login event collection.
- Stop admission.
- Graceful exit.
- Disconnect and reconnect.
- Supervisor / Bridge / bot process failures.
Load / Soak
- 5k / 20k / 50k Actors.
- 4 timers per Actor.
- Event bursts.
- Mass connection setup and teardown.
- 24h soak.
- Bridge event reporting pressure.
- High-latency monitoring providers.
- Controller restart and Backend re-registration.
Performance Adjudication Experiments
The ADR's performance arguments for Rust / Go / Python should be validated with real benchmarks, not by comparing data structure complexity alone.
Test at least:
- Tokio timer insert/cancel/expire.
- Go timer heap as a comparison.
- Python heapq / uvloop as comparisons (only for applicable patterns).
- Scheduling P50/P95/P99 at 5k / 20k / 50k Actors.
- Memory with 4 timers per Actor.
- planned_at deviation at creation rates of 1k–5k/s.
- Bridge IPC throughput, latency, batch size, and queue growth.
- KBEngine callback scheduling granularity and backlog behavior.
- Supervisor process monitoring overhead.
- Generator metrics overhead on the runtime.
Test Validity
A Swell can be marked Valid only when all of the following hold:
- The plan configuration passed validation.
- The plan digest matches the digest the Backend received.
- Backend states and actual load data are complete.
- The generator did not reach an unacceptable saturated state.
- Required observability data meets coverage requirements, or is explicitly marked Partial.
- The time series has no unexplained large gaps.
- The deviation between planned and actual arrivals is within the user-defined threshold.
- No unhandled critical failures.