Repository navigation
Breaking: set code on every perform.hot_cell event and rename Verdict to Failure::Exception - #109
Merged
flavorjones merged 4 commits intoOct 10, 2026
Conversation
flavorjones
force-pushed
the
card-657-yabeda-exception-counted-ok-redesign
branch
from
October 9, 2026 20:35
6c1646a to
f85f49e
Compare
code on every perform.hot_cell event and rename Verdict to FailedCallcode on every perform.hot_cell event and rename Verdict to FailureError
code on every perform.hot_cell event and rename Verdict to FailureErrorcode on every perform.hot_cell event and rename Verdict to Failure::Exception
flavorjones
force-pushed
the
card-657-yabeda-exception-counted-ok-redesign
branch
from
October 9, 2026 20:52
f85f49e to
b44aa1c
Compare
flavorjones
force-pushed
the
card-657-yabeda-exception-counted-ok-redesign
branch
from
October 10, 2026 17:15
b44aa1c to
0c08009
Compare
The event left `code` nil on success and unset when an exception escaped the call, so `HotCell::LogSubscriber` and `yabeda-hotcell` each derived the call's result, and `yabeda-hotcell` counted an interrupted call as `ok` with a `perform` of 0 seconds. Set `code` to `ok` on success and to `interrupted` when an exception interrupts the call, and have both subscribers record it as given. [Fix #93]
`Verdict` was a third name for a failure, beside `Failure` and the wire's `error`. Rename `HotCell::Verdict` to `HotCell::Failure::Exception`, and `HotCell::Client::Legacy::Verdict` to `HotCell::Client::Legacy::Failure::Exception`. `hot_cell_failure` is unchanged. Inside `HotCell::Failure`, a bare `Exception` now names the new module, so `Failure.for` checks for `::Exception`.
Comments, docs and test names called a failure a "verdict", and the `requests` metric counted calls "by outcome". Use "failure", "code", "cause" and "permanent", and "answer" for what a cell sends back. Rename `Supervisor#outcome_code` to `reported_code` and `verdict_for` in `examples/load` to `code_for`. The log's `event.outcome` keeps its name because ECS defines it, and "outcome" stays where it means the result of a filesystem operation.
flavorjones
force-pushed
the
card-657-yabeda-exception-counted-ok-redesign
branch
from
October 10, 2026 17:22
0c08009 to
26f8c7b
Compare
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.
Motivation
The code used several words for the same few ideas. Whether a call failed was
okon the wire,code: nilon theperform.hot_cellevent, and"ok"in the log line and the metric. The failure itself was aFailurein Ruby,erroron the wire, aVerdicton the exception, and a "verdict" or an "outcome" in comments and docs.Subscribers also had to work out a call's result from the event.
publishruns only when the transport returns, so an exception that escapes the call, such as the application's own request timeout, leaves nocodeon the event.HotCell::LogSubscriberhandled that case.yabeda-hotcelldid not: it counted the call ascode="ok"with aperformof 0 seconds (#93).Fixes #93
Details
The code now uses four words: a failure has a code, an optional cause, and is permanent or not.
codeon everyperform.hot_cellevent:okon success, the failure's code on failure, andinterruptedwhen an exception interrupts the call.HotCell::LogSubscriberandyabeda-hotcellrecordcodeas the event gives it.yabeda-hotcellrecords noperformobservation for aninterruptedcall. This includes the test from Fix yabeda-hotcell counting a call interrupted by an exception asok#108, withinterruptedin place ofexception.HotCell::Verdictis renamedHotCell::Failure::Exception, andHotCell::Client::Legacy::Verdictis renamedHotCell::Client::Legacy::Failure::Exception.Supervisor#outcome_codeis renamedreported_code.errorkey would need a protocol version bump and would change no behavior.The event's
codeand theFailure::Exceptionrename are breaking changes. The CHANGELOG's Upgrading section lists what an application changes.Additional information
This replaces #108, which fixed #93 by adding an
exceptionlabel toyabeda-hotcellalone.The server log's
event.outcomefield keeps its name, because ECS defines it. "outcome" also stays in comments where it means the result of a filesystem operation.