beck / Effects and tiersSource

Effects, and the tiers that discharge them

Tier::discharges evaluated at every pair — the predicate the placement solver calls.

Atomclientserverdataany
ingressyesThe merge point: arbitrary interleaving of client proposals. A program has exactly one.
durableyesyesA persistent accumulator — the log.
domyesTouches the document.
nondetyesyesReads a clock or a random source, or mints an id.
net.out(host)yesAn outbound call to a named host. The host is what becomes a NetworkPolicy peer (§6.5).
net.inyesAccepts inbound connections.
fs.read(path)yesReads a path.
fs.write(path)yesWrites a path.
envyesReads process environment.
spawnyesStarts concurrent work.
cap.xyesA capability the caller must hold. Forgetting an auth check leaves `cap.*` undischarged — a compile error, not a pentest finding (§3.5).
partialyesyesyesyesMay diverge or panic.
raises(E)yesyesyesyesMay fail with a value of the named type. A signature without this provably cannot fail; `try:` reifies it into a `Result[T, E]`.
external.read(store)yesReads a store the program does not own — §3.8's escape hatch.
external.write(store)yesWrites a store the program does not own.
logyesyesyesyesAmbient: available everywhere, elided from signatures, never a reason to place anything.
metricsyesyesyesyesAmbient, as `log` is.

any is not a fourth tier: it means unplaced — legal everywhere, and compiled into each tier that calls it.