[AIT-667] spec/ait: align AIT-ST4b with turn-lifecycle error pattern#452
Open
JoaoDiasAbly wants to merge 1 commit intoai-transport-featuresfrom
Open
[AIT-667] spec/ait: align AIT-ST4b with turn-lifecycle error pattern#452JoaoDiasAbly wants to merge 1 commit intoai-transport-featuresfrom
JoaoDiasAbly wants to merge 1 commit intoai-transport-featuresfrom
Conversation
AIT-ST4b (turn-start publish failure) previously said onError must be invoked and the error re-thrown. PR #449 reworked ST5c and ST7b to the rejection-only pattern: the method must reject with an Ably.ErrorInfo carrying code TurnLifecycleError and wrapping the underlying error as cause, and onError must NOT be invoked. This brings ST4b in line with ST5c and ST7b. Per the project's single-delivery-channel rule, awaited methods must not surface the same error through both rejection and onError. Since start() is awaited, rejection is the sole delivery channel; onError is reserved for paths with no other signal (streamResponse stream errors in AIT-ST6b3, onCancel handler failures in AIT-ST9a). Scope: deliberately left out of PR #449 to keep that PR's scope to its branch name; this is the promised follow-up. Refs: AIT-667 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
I've already merged the other PRs, this is just a follow-up to improve something that was flagged after I've applied the changes you've requested in the original PR ably/ably-ai-transport-js#60 |
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.
Summary
Aligns
AIT-ST4b(turn-start publish failure) with the rejection-only error pattern adopted forAIT-ST5candAIT-ST7bin PR #449.Context
PR #449 reworked server-transport error handling so that awaited lifecycle methods surface publish failures via promise rejection only, with an
Ably.ErrorInfo(TurnLifecycleError)wrapping the underlying error ascause. The per-turnonErrorcallback is reserved for paths with no other signal —streamResponsestream errors (AIT-ST6b3) andonCancelhandler failures (AIT-ST9a).AIT-ST4bstill carried the pre-existing "invokeonErrorand re-throw" wording. That was intentionally left out of PR #449's scope to keep it focused on what its branch name declared; this PR is the promised follow-up.Change
AIT-ST4bAbly.ErrorInfo(codeTurnLifecycleError) wrapping the underlying error ascause.onErroris not invoked.Wording now matches
AIT-ST5candAIT-ST7bverbatim in structure.Test plan
AIT-ST5candAIT-ST7b(same pattern, same phrasing)onErrorand re-throw" references inspecifications/ai-transport-features.mdably-ai-transport-jsalready removedonErrorfromstart()'s catch block, so no code change is blocked on this🤖 Generated with Claude Code