activity_poll definition in Machines, commands, and views. Alternative fragments are labeled separately.
Testing without a survey
A machine is testable as an ordinary transition system:once=True.
Render the visible data separately:
Serialization
Machines and state maps use versioned JSON representations:field("votes") rather than a closure and arg("activity") rather than a
lambda.
Persisted values follow a deliberately narrow JSON contract:
- mapping keys are strings;
- numbers are finite, so
NaNand infinity are rejected; - expression and effect operators have validated names and arities; and
- symbolic conditions use
&,|, and~, not Pythonand,or, andnot.
TypeError instead of accidentally
collapsing a symbolic condition to True or False.
Machine and SharedStateMap currently serialize as version 1. Unsupported
versions fail explicitly rather than being interpreted as the current language.
