Record write-once lazy builds against repeated reads and report the cache state.

Lazy Value Coordination Report

LazyValueCoordinationReport.kt
fun main() {
    val reads = 
    var builds = 0
    val cached: Int by lazy {
        builds++
        7
    }
    var served = 0

    for (i in 0 until reads) {
        if (cached > 0) {
            served++
        }
    }

    val status = if (builds == 0) {
        "unset"
    } else if (served <= 1) {
        "set"
    } else {
        "locked"
    }

    println("reads=$reads served=$served builds=$builds $status")
}
fun main() {
    val reads = 
    var builds = 0
    val cached: Int by lazy {
        builds++
        7
    }
    var served = 0

    for (i in 0 until reads) {
        if (cached > 0) {
            served++
        }
    }

    val status = if (builds == 0) {
        "unset"
    } else if (served <= 1) {
        "set"
    } else {
        "locked"
    }

    println("reads=$reads served=$served builds=$builds $status")
}
fun main() {
    val reads = 
    var builds = 0
    val cached: Int by lazy {
        builds++
        7
    }
    var served = 0

    for (i in 0 until reads) {
        if (cached > 0) {
            served++
        }
    }

    val status = if (builds == 0) {
        "unset"
    } else if (served <= 1) {
        "set"
    } else {
        "locked"
    }

    println("reads=$reads served=$served builds=$builds $status")
}
write-once lazy A coordination report can record how a write-once value is shared. A Kotlin `by lazy` delegate runs its initializer the first time the value is read and caches the result, so repeated reads reuse the single build. With no reads the slot is unset, with one read it is set, and with repeated reads it is locked to the one cached build. The status line summarizes whether the slot stayed unset, set, or locked after the recorded reads, while the build counter confirms the initializer ran at most once.