Skip to content

Events are facts; acknowledgements are derived

Reading of harness/docs/decisions/events-are-facts-acks-derived.md. If this page and that file disagree, the source file wins.

Events are facts; acknowledgements are derived

Section titled “Events are facts; acknowledgements are derived”

A result, event, or status field records a state transition that actually occurred: an append, a seal, a consumption, a cancel, or a refusal. The platform never emits a synthetic acknowledgement of a transition that did not happen.

The states accepted, delivered, running, and processed are derived from the record. They are never stored or emitted as claims.

  • accepted ≡ the entry exists on the document (and its consumer is alive)
  • delivered ≡ a consumption cell exists on the consuming turn
  • running ≡ heartbeat/activity facts are fresh
  • processed ≡ the derived output events exist

Three tests for any field or result:

  1. Could this ever be false? A constant-true result is protocol filler: zero information, non-auditable.
  2. What transition does this record? None. It is fiction.
  3. Stored or derived? A stored state that could be derived drifts from the facts. That drift is the dual lie.

The honest negative is failure. If the append fails, the call fails. Silence and failure are the two honest poles. Synthetic acks sit between them and lie.

When a protocol forces a result, return the minimal fact (the entry ref). When the system synthesizes content, mark it synthetic. The in-tree precedent is message/ack (../packages/harness-server/src/daemon/session/compact-env.ts; MessageChunk.ack on the eat). A sink’s ack is discarded. The verb’s whole return is its effect.

Do not build a command or ack API. The substrate has no messaging layer: no bus, no stream, no command channel. There is synced shape, derivation over shape, and presence (ephemeral shape that retracts). A want about a remote process is expressible only as a fact. “I expect this stopped” is a proposal, published on a lane. Satisfaction is derived from subsequent facts, or it is not known at all. Every fact has exactly one authority. Your proposal is your write. The worker’s admission is its act. A command or ack API would be dishonest, and it would claim a causal channel that does not exist.

Every write returns the ref to the fact it made. propose() returns a proposalId. A tingle seals with its tape-entry ref. A write never returns a claim about consequences.

Do not store a bare “Running” status. That status is the most hated lie in this class. Stuck agents report ACTIVE for hours. A stored state that drifts from the facts is worse than having no scheduler, because the operator believes the work is covered.

{accepted: true} claims an act of acceptance no component performs. It implies a guarantee the system has not made. The consumer may be dead, over budget, or about to drop the signal. The result carries no information, because it is constant, and it cannot be audited later. The record says “accepted”, and nothing accepted.

Event-sourced and reactive substrates make the honest shape cheap. The record exists anyway, so results can be references into it. Consumers that need assurance derive it from the record. Consumers that do not need assurance are not told comforting fictions.