Rainbow — Testing

Parent: Rainbow development

No executable code, testing framework, coverage requirement, or test command exists in the inspected workspace. When tooling is introduced, document test commands and suite scope here. This documentation migration requires readback and link verification, not application tests.

Finalized validation plan

No test command exists until implementation starts. Use CTest to run numerical validation executables without requiring an extra test framework. Validate cross-section normalization and energy accounting, geometric rainbow-angle agreement, Mie recurrence convergence, direct-vs-table interpolation error, spectral quadrature convergence, and spectral-vs-derived-XYZ image agreement.

Validate thin-limit density linearity, zero-density foreground, zero source intensity, invariance of mean brightness to weighted sample count, PSF energy conservation including image edges, tile-boundary consistency, agreement of averaged particle realizations with the continuous cloud, solar-disc integration convergence and motion/exposure integration. Distinguish image cropping from erroneous energy loss.

Configuration tests reject unknown units/keys, inconsistent density/population inputs, ambiguous distributions, unsupported physical modes and out-of-table requests. Shard tests check global normalization, exact-once inclusion, background added once, compatible hashes, missing/duplicate work rejection and restart consistency. Compare fixed physical realizations across thread/process counts with specified tolerances.

Profile unchanged scenes at fixed accuracy: table-build time, projection/bin/render/merge stages, throughput, peak memory, core/socket scaling and NUMA effects. Publish measured errors and timings alongside resolved configuration and hardware details. None of these checks has yet run.

2026-10-16 — Observed verification

Renderer tests in tests/tests.cpp cover a published Mie coefficient reference, energy normalization, Rayleigh limit, angular SIMD/scalar agreement, configuration errors, deterministic pixels across thread counts, thin-density scaling, PSF conservation and shard merge. These have NOT yet completed a verified run; build artifacts were damaged during the hard power-off. No speed or image-quality claim has been established.

Telemetry tests: python3 -m unittest discover -s tests -p 'test_host_health.py' -v — six tests passed in about 0.3 s. Covers receiver acknowledgement/persistence, invalid path/incomplete-record rejection, bounded rotation, sender ACK protocol, queue-overflow reporting and sampler fields/collector identity. Four-second local monitor produced four samples and CPU deltas with a live kernel journal follower. Remote receiver fsynced and acknowledged a genuine pomelo sample; the stored sample was read back from gravlax. systemd-analyze verify accepted the service definition (unrelated existing system-unit warnings were emitted). Continuous service delivery awaits user activation and verification.

2026-10-16 — Completed renderer verification

Release CTest now passes, including the numerical and image/shard invariants listed above. Configuration tests also reject nonfinite vectors passed directly through the C++ API and empty optical tables. Debug AddressSanitizer/UndefinedBehaviorSanitizer CTest passed with ASAN_OPTIONS=detect_leaks=0; LeakSanitizer initially failed because it cannot run under the sandbox's tracing environment, so leak detection remains unverified.

OMP_NUM_THREADS=2 ctest --test-dir build --output-on-failure
ASAN_OPTIONS=detect_leaks=0 OMP_NUM_THREADS=2 ctest --test-dir build-sanitize --output-on-failure
python3 -m unittest discover -s tests -p 'test_host_health.py' -v

One/two-thread mono images have identical PNG hashes. Fine spectral/angular test changed normalized foreground Y by about 0.9% L1 and integrated Y by about 0.12% in the tested realization. Both mono and variable-size PNGs were viewed; PNG/EXR file formats were checked. Live telemetry confirmed advancing remote ACKs without captured kernel events or queue loss. See rainbow/dev/review for measured timing, memory, model limits and the self-review.

version 4  ·  created 2026-10-16  ·  updated 2026-10-16