Skip to content

refactor: pre-1.0 state API consistency (Tick shape + idiomatic error names)#141

Merged
joshua-temple merged 2 commits into
mainfrom
refactor/pre1-api-consistency
Jun 5, 2026
Merged

refactor: pre-1.0 state API consistency (Tick shape + idiomatic error names)#141
joshua-temple merged 2 commits into
mainfrom
refactor/pre1-api-consistency

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

What this change does

Two pre-1.0 breaking consistency fixes on the state public API, landed before the contracts freeze:

  • ServiceRunner.Tick returns []FireResult like the other drivers. It was the odd one out ((FireResult, bool)); Scheduler.Tick and ActorSystem.Tick already return a slice. Callers now check len(results) > 0. A return type can't be unified additively later, so this had to happen pre-freeze.
  • Error types now use the idiomatic *Error suffix. The 15 Err*-prefix structs plus MultiRegionErr are renamed to the *Error suffix (ErrInvalidTransition to InvalidTransitionError, and so on), matching VerifyError/SnapshotError/WaitTimeoutError and Go convention. The Err* prefix is the convention for sentinel error values; these are struct types you errors.As into, and there are no sentinel values in the package.

Why

These are the two now-or-never items from the pre-1.0 API audit: both are breaking, so they belong before the freeze rather than as a future v2 break. Idiomatic error naming also signals a hand-built, conventional library.

Checklist

  • Commits are signed off (git commit -s) per the DCO
  • Conventional commit messages (type: subject)
  • Every workspace consumer (durable, cluster, e2e, transport, wasm, sink, examples, source*) builds and go vets clean; state tests green
  • Public API changes documented (godoc + CHANGELOG under the staged [1.0.0])

@joshua-temple joshua-temple merged commit 9f5e318 into main Jun 5, 2026
121 checks passed
@joshua-temple joshua-temple deleted the refactor/pre1-api-consistency branch June 5, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant