Files
hq/04-ISSUES/031-a-machine-becomes-each-thing-it-was-told-in-turn/00-report.md
T

43 lines
2.1 KiB
Markdown

---
status: resolved
opened: 2026-09-02
located-in: [mesh-host]
fixed-by: mesh-host #16 (internal/link/run.go: the host prefetches a window of declarations, applies the newest and sets the rest aside, each reported as superseded); mesh-controller #36 (the link records a superseded report as a word that the node is there)
amended-design: 03-DESIGN/01-to-be/05-the-node-host.md
---
# 031 — A machine becomes each thing it was told, in turn
## Symptom
A machine that was pushed several declarations in quick succession applies every one of them,
oldest first, at the better part of a minute each. Under the lab's suite — twenty-odd pushes in
fifteen minutes — the anchor machine ran minutes behind the newest declaration, and a test that
waited for it honestly timed out while the machine was busy becoming things nobody wanted any
more.
Only visible since caught-up became an equality: each report now names the declaration it applied,
and the reports arriving were about ever-older ones. Before that, the same backlog hid inside
timestamp comparisons that happened to pass.
## Why it is wrong, and why it is also right
Each declaration is complete — the whole machine, not a delta — so applying an old one is never
*incorrect*, only wasted: the machine converges to a state the mesh has already moved past, then
does it again. The queue keeps a disconnected machine's instructions safe, which is right. What
is wrong is only the order of consumption: **a machine asked to be five successive things should
become the last one.**
## The shape of a fix
On waking with a queue, drain it and apply only the newest declaration; acknowledge the
superseded ones without applying them. Whether a superseded declaration deserves a report — and
what its outcome should be called — is the real question for the link's vocabulary: silence reads
as a machine that ignored an instruction, and "applied" would be a lie.
## What it costs today
Nothing on a real mesh at rest: pushes are far apart. It costs the lab about a doubling of one
test's wait, and it will cost a real mesh exactly when things are busiest — a flurry of changes is
when a machine can least afford to replay history.