Skip to content

Stop event producers before event listeners #2416

Closed

Description

@josecelano

Parent: #2410 (SI-22 sub-issue 4 of 4; part of #1488).

Goal

On shutdown, listener components are cancelled only after every component that publishes to their buses has completed, or the shared deadline has expired. The application and the HTTP and UDP test environments follow this order, and the ADR and diagrams describe the final design.

Acceptance criteria

  • AC1 (sub-EPIC AC2): no listener component is cancelled before every event-producing component has completed or the shared deadline has expired.
  • AC2 (sub-EPIC AC5): the HTTP and UDP test environments stop producers before listeners.
  • AC3 (sub-EPIC AC7): the T0 scenarios, rerun after the fix, show every control completion persisted within budgets. Race evidence records counts and observed lag, leftovers, failures, and aborts; an unexplained deficit blocks acceptance. An abort may leave an in-progress outcome unknown, which cannot be counted using receiver length.
  • AC4 (sub-EPIC AC8): the ADR is in docs/adrs/, restates every still-valid point of the cancellation-tree ADR, and that ADR is marked Superseded by it.
  • AC5 (sub-EPIC AC10): the five diagrams describe the final implementation and live under docs/architecture/; the shutdown diagrams they replace are updated or removed.
  • AC6 (sub-EPIC AC13): EventFlows rejects a consumer registered after a producer of its bus (unit test). Bootstrap proves subscription before publication and retains bus ownership through listener join; individual sender clones may drop. The ADR states these rules and the drain rule, including shared-deadline abort exceptions verified by T8 (AC12).
  • linter all exits with code 0; relevant tests pass.

Specification: docs/issues/open/2416-2410-si-22-4-stop-producers-before-listeners/ISSUE.md (added by the spec-only PR).

Activity

  1. added
    Bug
    on Oct 2, 2026
  2. added theissue type on Oct 13, 2026
  3. added 6 commits that reference this issue on Oct 20, 2026
  4. 36 remaining items

  5. added 8 commits that reference this issue on Oct 24, 2026
  6. self-assigned this
    on Oct 24, 2026
  7. added a commit that references this issue on Oct 24, 2026
  8. added 4 commits that reference this issue on Oct 24, 2026
  9. added a commit that references this issue on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions