Guard / foldkit-guard

Diagnostics

Two things a guarded server goes past without failing are reported through foldkit-surface's Diagnostics channel (re-exported by foldkit-remote), by default Effect's log:

_taglevelWhen
ComputeRefusederrorAn operator refused to work out a value a guarded write computes (text holding NUL, an implementation that throws). The write was refused with a fixed message; this carries the operator's error.
UnpinnedWriteswarningGuardServer.validate found mutations writing through a writer with no revision that a change can come between.

ComputeRefused is reported inside the write, so the reporter the server runs with applies (serveFetch's diagnostics, or Layer.succeed(Diagnostics.Reporter, report) in its layer). GuardServer.validate runs before any Effect of the server's, so it takes the reporter as an option, diagnostics, beside entities, domain and server. In a test, pass Diagnostics.collect().report and assert on reported.