Skip to content

Auto-abort SSE subscription on execution_error events #624

Description

@jonathansick

Branch

tickets/DM-55470

Type

AFK

Jira Key

DM-55470

Jira URL

https://rubinobs.atlassian.net/browse/DM-55470

Blocked by

#621

Parent PRD

#620

Task Order

4

Parallel with

#623, #625

Scope

Extend the auto-abort condition in subscribeToHtmlEvents (packages/times-square-client/src/sse.ts) so a validated event carrying a non-null execution_error also completes the subscription: the terminal event is still delivered to onEvent first, then onComplete fires and the stream is aborted. The existing success condition (execution_status === 'complete' && html_hash) is unchanged, and autoAbortOnComplete: false disables both conditions.

Extend sse.test.ts for the failure-abort path.

See PRD #620 §Scope (sse.ts bullet) and acceptance criterion 2.

Acceptance criteria

  • An SSE event with non-null execution_error is delivered to onEvent, then onComplete fires and the stream is aborted.
  • The success auto-abort condition is unchanged.
  • autoAbortOnComplete: false disables the failure abort as well.
  • Tests cover abort-on-failure.

Metadata

Metadata

Assignees

Labels

prd-taskImplementation task from a PRD

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions