Skip to main content

Module test_support

Module test_support 

Source
Expand description

Test-side backend for the diagnostics production already emits.

Production instruments its solvers through the log facade — the BMS intercept-solve counters, the GL-ladder rung histogram, the cell-moment cache stats, the certificate-bound discriminator. Every one of those is a log::info!, and the log facade drops every record until some binary installs a backend. No test binary in this workspace installed one, so all of that instrumentation has been running and producing nothing, in unit tests and integration tests alike. Two lanes independently spent hours re-deriving facts these lines already carried (#2472’s non-terminating marginal-slope cluster; the [CERTIFICATE-BOUND] discriminator). This module is the missing half.

It lives in gam-runtime rather than gam-test-support for the reason that crate’s own header gives: a helper owning no model-layer type belongs in a leaf, so depending on it does not drag the solver stack into an unrelated test build. gam-runtime already owns the observability modules (span, process_monitor, loop_progress) and already depends on log. gam-test-support re-exports it for consumers that use that path.

Following the workspace convention for test_support modules, this is a plain always-compiled pub mod: a cfg(test) gate would make it invisible to exactly the downstream integration binaries that need it.

Functions§

diagnostic_write_failures
How many records this backend failed to write.
install_diagnostic_logger
Install the stderr diagnostic backend for this process, once.