Skip to content

[v1.0] Add an explicit async lifecycle adapter #191

Description

@codeforester

Goal

Support asynchronous command work without weakening the deterministic synchronous lifecycle contract.

Background

Professional CLIs increasingly call async SDKs. Consumers currently bridge async work themselves, risking inconsistent cleanup, cancellation, and exit-code behavior.

Scope

Design a small documented async adapter; define event-loop ownership, cancellation, signal handling, cleanup, and exception-to-exit-code rules; keep async dependencies optional; add Click/Typer examples and tests.

Acceptance Criteria

  • A supported async entry point preserves context, logging, and exit semantics.
  • Cancellation and cleanup are deterministic.
  • Sync APIs remain backward compatible.
  • No async dependency is added to core.
  • Docs include a minimal working example.

Validation

Run async tests on supported Python versions and at least one Unix runner; exercise success, failure, cancellation, and cleanup; run the synchronous suite unchanged.

Non-Goals

Do not redesign the lifecycle API or require a new parser.

Project Fields

  • Status: Backlog
  • Priority: P1
  • Area: Python
  • Initiative: v1.0 Readiness
  • Size: M

Ownership

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions