Skip to content

lifecycle: topological resolver, wait_for_health, graceful shutdown #7

@pierrick-fonquerne

Description

@pierrick-fonquerne

Coordinate the lifecycle of every resource declared in the manifest: resolve their start order, gate readiness on a health policy, and tear everything down cleanly on signal.

Scope

  • Dependency graph builder from the parsed manifest.
  • Topological sort with cycle detection.
  • wait_for_health startup policy reusing the runtime healthcheck primitive.
  • Coordinated shutdown on SIGINT and SIGTERM with a configurable graceful timeout before force-kill.
  • Tracing spans per resource lifecycle.

Acceptance criteria

  • A cycle in the dependency graph produces a clear error before any runtime call is made.
  • Resources start in topological order and only after their dependencies are healthy.
  • Ctrl+C from the CLI stops every resource in reverse topological order within the configured timeout.
  • A failure during start triggers a clean teardown of the resources already running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureNew capabilityphase:lifecycleTopological resolution, startup and failure policies, signal handling

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions