Skip to content

docs: settle how a machine's events state the next state - #85

Merged
Sequela02 merged 1 commit into
mainfrom
docs/stage-10-machine-syntax
Nov 13, 2026
Merged

Sequela02 merged 1 commit into
mainfrom
docs/stage-10-machine-syntax

Conversation

@Sequela02

Copy link
Copy Markdown
Contributor

Records stage 10's machine syntax before its conformance cases, with the probe that chose how an event states the next state.

What changes

  • docs/design/syntax.md: a Machines section and decision 7.
    • A machine has state, init, event, observers (fn), invariant and helper invariant.
    • An event states its next state as next { field: value }. A field it doesn't list keeps its value, and every expression reads the state before the event.
    • Invariants are written over fields, since a specification can't call a function.
    • Events take intent and requires only, and next is a reserved word.
    • A sequence example takes the form example Machine … gives.
  • docs/design/probes/2026-11-12-machine-updates/: the probe.
    • Three forms: field = value, next { field: value } and field' = value.
    • Twenty-four replies: four Claude models, plus ChatGPT, Grok, DeepSeek and Gemini through their public interfaces. Qwen wasn't run.
    • Every reply was right on tracing, frame and immutability. On reading a field after setting it, 7 of 8 read = as updating in order, all 8 read next { } as the state before the event, and 7 of 8 read the prime the same way.
    • The rule written before the runs would have kept =. The maintainers chose next { }, and the README states why.
  • ROADMAP.md and constraint row 10: the boundary checks helper invariants too. Event overflow obligations assume them; without them, a state from TypeScript makes time + 60 overflow, per the stage 10 measurement.

Verification

  • cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked (85 passed, 1 ignored, with the pinned solvers) pass. This change touches no code.
  • The probe's answer key and decision rule were written before any run. The replies are condensed in replies.md.

Not established:

  • No person read the variants.
  • One run per reader.
  • The public interfaces' model versions weren't recorded.
  • Grok searched the web on one reply despite the instruction.

Risk note

Two-way door, no behavior change: documentation only, and nothing parses machine yet. Blast radius: the syntax stage 10's conformance cases and compiler will follow. Evidence: the probe above.

Refs #82

Stage 10 needs a syntax for machines before its conformance cases. A
probe gave twenty-four readers the same machine in three forms: one
update per line was read as updating in order by seven of eight, while
next { field: value } was read as Accord means it by all eight. Record
the machine syntax with that form, the probe behind it, and that the
boundary checks helper invariants, which event overflow proofs assume.

Refs #82
@Sequela02 Sequela02 added the full-ci Run Windows and macOS CI once before merging label Nov 13, 2026
@Sequela02
Sequela02 merged commit 70a624d into main Nov 13, 2026
5 checks passed
@Sequela02
Sequela02 deleted the docs/stage-10-machine-syntax branch November 13, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run Windows and macOS CI once before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant