counting_source() records numerical reads without placing a mutable
environment inside the source descriptor. It is exported for backend and
downstream conformance suites, not as an application data source.
Details
This is developer-only test instrumentation. The counter registry is process-local, is not persisted with the descriptor, and must not be used as provenance or as an execution receipt.
Examples
src <- counting_source(memory_source(matrix(seq_len(6), nrow = 2)))
source_read(src, observations = 1)
#> [,1] [,2] [,3]
#> [1,] 1 3 5
source_counts(src)$reads
#> [1] 1