Skip to content

[Brook] Added stream errors and Core's failure kinds. - #151

Closed
moetemp wants to merge 5 commits into
moe/brook/v2/p2b-records-wirefrom
moe/brook/v2/p2c-errors-cursors
Closed

moetemp wants to merge 5 commits into
moe/brook/v2/p2b-records-wirefrom
moe/brook/v2/p2c-errors-cursors

Conversation

@moetemp

@moetemp moetemp commented Oct 13, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds the stream error family and maps each of Core's failure kinds to it.

  • StreamRefusedError is for a write the store refused, and StreamStorageError is for a store that failed. StreamOutcomeUnknownError sits under the storage error.
  • error_from_failure maps each StreamFailure kind to its class. A kind this release doesn't know is a storage error.
  • StreamRecordError carries the cursor of a record a reader can't decode.
  • BEGINNING and END are the only cursors lang names. Core mints and checks every other one.

Why?

Core reports one kind per failure, so every SDK raises the same error for the same failure (DD-21). A record skipped with a log line is data the reader never hears of.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

tests/contrib/streams/test_errors_cursors.py. A new kind in Core fails the mapping test first.

@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 13, 2026
@moetemp

moetemp commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Combined into #239.

@moetemp moetemp closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant