Skip to content

[A3S Cloud/C0] Harden streaming, authorization metadata, and graceful drain #1

Description

@ZhiXiao-Lin

Cloud gate

C0 — stable control surfaces and team operations.

Planning reference: https://github.com/A3S-Lab/Cloud/blob/e2a05b7f1f63486b2fda866b22aa84eea89aadb4/docs/development-plan.md

Problem

Cloud uses Boot for long-lived API streams and process roles. C0 requires bounded streaming behavior, reliable disconnect cancellation, explicit authorization metadata, and graceful drain during upgrades.

Scope

  • Propagate SSE and WebSocket disconnects into request cancellation.
  • Add bounded queues, backpressure behavior, heartbeat policy, and slow-consumer termination.
  • Define graceful drain for HTTP, SSE, WebSocket, worker, and relay roles with configurable deadlines.
  • Make operation scope and authorization metadata visible in route definitions and generated OpenAPI.
  • Provide a typed boundary for provider-backed distributed rate limiting without embedding a specific provider.
  • Emit correlation and drain-state telemetry without request or credential contents.

Acceptance criteria

  • Disconnect and slow-consumer tests leave no orphaned task, subscription, or socket.
  • A draining process rejects new work, permits bounded in-flight completion, and terminates at the deadline.
  • OpenAPI output carries the same scope requirements enforced at runtime.
  • Multi-process rate-limit tests can use a shared provider through the public interface.
  • Integration tests cover restart and shutdown for each Boot process role.

Non-goals

  • Defining Cloud business permissions or membership rules.
  • Implementing Cloud commands in Boot.
  • Selecting a mandatory distributed rate-limit backend.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions