Skip to content

Migrate health-check API to token lifecycle #2324

Closed

Description

@josecelano

Goal

Migrate only the health-check API component to the supervised cancellation tree. Bootstrap derives a health-check child CancellationToken from JobManager; the component begins token-aware Axum draining, joins its server and drain-controller children, and reports one named health_check_api outcome.

Current behavior

The current component bridges JobManager cancellation through a private Halted channel. It retains the drain-controller handle but joins it only on token cancellation; independent server completion can return without joining the controller.

Scope

  • Add an additive token-aware health-check server start path while preserving legacy APIs.
  • Derive and inject one health-check component child token from JobManager.
  • Join runtime and drain-controller children for cancellation, independent completion, and failure.
  • Add deterministic lifecycle, registration rollback, legacy compatibility, and bootstrap-propagation coverage.
  • Record direct tracker-binary SIGTERM and listener-rebind evidence.

Out of scope

  • Changing health-check readiness or response behavior during shutdown; SI-21 owns readiness-before-drain behavior.
  • Migrating HTTP tracker, REST API, UDP server, or standalone consumers.
  • Removing legacy Halted APIs, global shutdown signals, deadline configuration, or exit codes.

Acceptance criteria

  • The component receives a JobManager-derived child CancellationToken and starts graceful draining without a library-level OS-signal subscription.
  • The component joins its server and drain-controller children before reporting health_check_api completion.
  • Legacy health-check start/stop behavior remains compatible.
  • Deterministic tests cover token cancellation, normal drain, unexpected completion/failure, and bootstrap propagation.
  • Direct-PID SIGTERM evidence demonstrates clean health-check drain and listener rebind.
  • Existing health-check request and readiness semantics remain unchanged.
  • Linter all passes.

Parent EPIC: #1488

Activity

  1. self-assigned this
    on Sep 23, 2026
  2. added 2 commits that reference this issue on Sep 24, 2026
  3. added 10 commits that reference this issue on Sep 24, 2026
  4. added 8 commits that reference this issue on Sep 25, 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