Skip to content

Migrate standalone UDP environment and example to the token lifecycle #2448

Closed

Description

@josecelano

Parent EPIC: #1488 (SI-17).

Goal

Make the UDP test Environment and the udp_only_public_tracker example use the token-aware UDP server lifecycle. Environment::stop() cancels and joins every task it owns (the receive loop and three event listeners) instead of aborting the listeners. The example maps SIGINT and Unix SIGTERM to Environment::stop(); the UDP library stays free of direct OS-signal subscriptions.

Acceptance criteria

  • AC1: Environment starts the UDP server through start_with_cancellation.
  • AC2: Environment::stop() cancels the environment token and joins the receive loop and the three event listeners; it never calls abort().
  • AC3: stop() panics with a message naming each failing task, after joining every owned task, and keeps its current signature.
  • AC4: A stopped environment can be started again and serves requests.
  • AC5: A failed start leaves no event listener running.
  • AC6: The health-check API contract tests pass without using the environment's server field to stop the UDP tracker.
  • AC7: udp_only_public_tracker stops gracefully on SIGINT and on Unix SIGTERM and exits with code 0.
  • AC8: No UDP library module subscribes to OS signals directly; the legacy Server::start/stop API still compiles, its tests pass, and it keeps its indirect subscription until SI-19.
  • AC9: The shutdown task inventory reflects the migration.
  • linter all exits with code 0
  • Relevant tests pass
  • Manual verification scenarios are executed and documented in issue-local manual-verification-evidence.md
  • Acceptance criteria are re-reviewed after implementation and reflect actual behavior

Specification: docs/issues/open/2448-1488-si-17-migrate-standalone-udp-environment/ISSUE.md (added by the spec-only PR).

Activity

  1. added 4 commits that reference this issue on Oct 6, 2026
  2. self-assigned this
    on Oct 6, 2026
  3. added 8 commits that reference this issue on Oct 6, 2026
  4. 6 remaining items

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions