Skip to content

Migrate HTTP tracker to token lifecycle #2289

Closed

Description

@josecelano

Parent EPIC: #1488 - Overhaul: Tracker Shutdown (roadmap step 7).

Goal

Migrate only the HTTP tracker component to the supervised cancellation tree. The tracker bootstrap derives a component child CancellationToken from JobManager; the HTTP tracker receives it, starts graceful Axum draining through the token-aware helper, joins its server and drain-controller children, and reports one named component outcome to JobManager.

Scope

  • Add an HTTP tracker start path that accepts an injected component CancellationToken.
  • Derive one child token per configured HTTP tracker instance in src/app.rs.
  • Use the token-aware, joinable Axum drain helper from Add Token-Aware, Joinable Axum Drain Helper #2274.
  • Retain and join the HTTP server and drain-controller tasks inside the HTTP component's owned task tree.
  • Add deterministic token-cancellation, normal-drain, unexpected-completion, bootstrap-propagation, and legacy-compatibility coverage.
  • Verify the migrated production path through the direct tracker binary PID, bounded SIGTERM shutdown, and listener rebind.

Constraints

  • Preserve the source and behavior compatibility of existing HttpServer::start and HttpServer::stop consumers.
  • Do not subscribe to SIGINT or SIGTERM inside the HTTP server package.
  • Keep nested server and drain handles owned by the HTTP component; JobManager receives only the component's top-level outcome.
  • Do not migrate REST API, health-check API, UDP, or standalone environment consumers.

Acceptance Criteria

  • Each configured HTTP tracker instance receives a JobManager-derived child token.
  • Token cancellation starts Axum draining through the new helper and the component awaits server and drain-controller completion.
  • Tests cover normal and unexpected completion without OS signals, plus bootstrap wiring and legacy compatibility.
  • Manual evidence shows one token-driven HTTP shutdown path, clean bounded direct-PID SIGTERM exit, and immediate binding reuse.
  • linter all passes.

The full reviewed specification, implementation plan, commit points, verification matrix, ownership contract, and rollback strategy are tracked in docs/issues/open/<issue-number>-1488-si-11-migrate-http-tracker-token-lifecycle/ISSUE.md after promotion.

Prerequisites: #2234 and #2274. Related: #1586, #1588, #2132, #2169, #2221.

Activity

  1. added 2 commits that reference this issue on Sep 22, 2026
  2. self-assigned this
    on Sep 22, 2026
  3. added 3 commits that reference this issue on Sep 22, 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