Repository navigation
Closed
Description
Context
kernal_api::async_engine currently owns runtime, task, blocking-work, sleep, and a wall-clock timeout facade. It does not yet provide a façade-owned cancellation token/source, deadline composition, bounded async I/O/channel seam, or separate connection and progress/idle timeout policy.
A single total download timeout is unsafe for slow but continuously progressing connections. The first embedded zccache migration needs kernel-owned controls without exposing Tokio or tokio-util types.
Proposal
- Add façade-owned cancellation source/token semantics and deadline-aware task/I/O composition.
- Define separate connection deadline and progress/idle timeout policy: progress resets the idle budget; absence of progress expires it.
- Add only the bounded async I/O/channel abstractions concretely required to compose those policies and future zccache embedded APIs.
- Keep Tokio Console diagnostics opt-in and compatible with application logging layers.
- Do not add an HTTP client/server, database, GUI, broker, or zccache call-site migration in this issue.
Acceptance criteria
- RED: focused tests show that the existing wall-clock-only timeout cannot distinguish a stalled operation from a long-running operation that continues making progress.
- RED: focused tests show a pending façade operation cannot be externally cancelled with a kernel-owned token/source.
- GREEN: a connection that does not establish within its deadline fails with a typed façade error.
- GREEN: a continuously progressing transfer survives beyond the original total elapsed duration, while a stalled transfer fails after the configured progress/idle interval.
- GREEN: cancellation unblocks the pending operation/task and leaves no Tokio or
tokio-utiltype in a public signature. - GREEN: the new capability is feature-isolated where it adds dependencies, and the existing Dylint/public façade tests cover its implementation boundary.
- The issue adds no HTTP transport/server, broker, database, GUI, or zccache migration dependency.
Decisions
- Priority is P1 because the safe timeout and cancellation contract must exist before an AI-authored client can be prohibited from using raw runtime/network APIs.
- The first slice defines policy and composable primitives, not a general networking framework; concrete HTTP/server work waits for a real consumer.
- Progress is caller-observable activity under the façade contract, rather than an undocumented backend-specific timer reset.
Related issues
- feat: implement the kernal-api capability spine and fully rebase zccache embedded #5 — implementation umbrella and Phase 2.
- feat: unify async OS HAL, profiling, symbolization, and allocator instrumentation #1 — canonical façade ownership architecture.
Metadata
Metadata
Assignees
Labels
No labels
Activity