oxidecomputer / oxidecomputer/steno

Consider a `must_use` attribute on `SagaResult`

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
170
Forks
15
PR merge metrics
No merged PRs in 30d

Description

SagaResult describes the result of executing a saga, akin to Rust's native Result type:

https://github.com/oxidecomputer/steno/blob/8da3eda3bd3fd5d077872c687bb2de1a8b326982/src/saga_exec.rs#L1407-L1415

This type is propagated back to the SecClient, where it may be acquired when awaiting the future returned from saga_create.

As this is the only mechanism for actually checking the success or failure of a saga, we should consider annotating it with the must_use attribute.

Note that this would align with the stdlib Result type attribute, which uses must_use to encourage callers to handle errors explicitly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SagaResult in src/saga_exec.rs around lines 1407-1415, then compare the standard library Result definition linked in the issue. Confirm that the attribute applies to the propagated saga result and that ignoring it produces the intended compiler diagnostic; done means SagaResult encourages callers to check saga success or failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.