oxidecomputer / oxidecomputer/steno
automated testing for action invariants
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 170
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Steno expects action implementations to meet a few invariants (these come from distributed sagas in general):
- actions are idempotent
- undo actions are idempotent
- "undo" should be commutative with the action. That is, if an undo action is executed followed by a re-execution of the action itself, the net result should be as though the undo action ran last.
- what others?
We cannot test that actions are correct or even that they always obey these invariants. But we could empirically test a lot of different cases, like:
- after an action runs to completion, run it again. It should succeed again and the resulting external state should be equivalent. (Steno can't know the second part but the consumer can help here.)
- after an undo action runs to completion, run it again. It should succeed again and the external state should be equivalent.
- run the action again after the undo action completes. It should succeed again and the external state should be equivalent.
If we could inject a retryable error into either the action or undo action, then we could also test that they can fail (multiple times in a row), then remove the injected error, and then run it again and have them succeed.
All of this requires that the consumer be able to tell us whether the external states of the world are equivalent (or, maybe equivalently, whether they've changed).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Steno's existing action and undo-action APIs, since the issue does not name specific files or tests. Determine how consumers could report equivalent external state and inject retryable errors. Done would include automated coverage for repeated actions, repeated undo actions, action-after-undo behavior, and injected failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100