Repository navigation
docs: settle how a machine's events state the next state - #85
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records stage 10's
machinesyntax 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.state,init,event, observers (fn),invariantandhelper invariant.next { field: value }. A field it doesn't list keeps its value, and every expression reads the state before the event.intentandrequiresonly, andnextis a reserved word.example Machine…gives.docs/design/probes/2026-11-12-machine-updates/: the probe.field = value,next { field: value }andfield' = value.=as updating in order, all 8 readnext { }as the state before the event, and 7 of 8 read the prime the same way.=. The maintainers chosenext { }, and the README states why.ROADMAP.mdand constraint row 10: the boundary checks helper invariants too. Event overflow obligations assume them; without them, a state from TypeScript makestime + 60overflow, per the stage 10 measurement.Verification
cargo fmt --all --check,cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test --workspace --locked(85 passed, 1 ignored, with the pinned solvers) pass. This change touches no code.replies.md.Not established:
Risk note
Two-way door, no behavior change: documentation only, and nothing parses
machineyet. Blast radius: the syntax stage 10's conformance cases and compiler will follow. Evidence: the probe above.Refs #82