serve-asgi 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. serve_asgi-1.0.0/CHANGELOG.md +60 -0
  2. serve_asgi-1.0.0/IMPLEMENTATION_PLAN.md +557 -0
  3. serve_asgi-1.0.0/LICENSE +21 -0
  4. serve_asgi-1.0.0/PKG-INFO +43 -0
  5. serve_asgi-1.0.0/README.md +29 -0
  6. serve_asgi-1.0.0/SECURITY.md +7 -0
  7. serve_asgi-1.0.0/docs/README.md +58 -0
  8. serve_asgi-1.0.0/docs/baselines/load-macos.json +160 -0
  9. serve_asgi-1.0.0/docs/development.md +26 -0
  10. serve_asgi-1.0.0/docs/http.md +27 -0
  11. serve_asgi-1.0.0/docs/listeners.md +27 -0
  12. serve_asgi-1.0.0/docs/load.md +37 -0
  13. serve_asgi-1.0.0/docs/operations.md +30 -0
  14. serve_asgi-1.0.0/docs/operator-guide.md +58 -0
  15. serve_asgi-1.0.0/docs/prettynb-staging.md +35 -0
  16. serve_asgi-1.0.0/docs/qualification-v0.1.md +48 -0
  17. serve_asgi-1.0.0/docs/security-qualification.md +23 -0
  18. serve_asgi-1.0.0/docs/stability.md +44 -0
  19. serve_asgi-1.0.0/docs/websocket.md +22 -0
  20. serve_asgi-1.0.0/pyproject.toml +41 -0
  21. serve_asgi-1.0.0/pyproject.toml.orig +33 -0
  22. serve_asgi-1.0.0/scripts/autobahn_server.py +6 -0
  23. serve_asgi-1.0.0/scripts/build_ingress.py +40 -0
  24. serve_asgi-1.0.0/scripts/check_autobahn.py +19 -0
  25. serve_asgi-1.0.0/scripts/check_distributions.py +48 -0
  26. serve_asgi-1.0.0/scripts/compare_http.py +27 -0
  27. serve_asgi-1.0.0/scripts/compare_websocket.py +51 -0
  28. serve_asgi-1.0.0/scripts/http_profile.py +112 -0
  29. serve_asgi-1.0.0/scripts/load_profile.py +332 -0
  30. serve_asgi-1.0.0/scripts/prepare_prettynb.py +83 -0
  31. serve_asgi-1.0.0/scripts/prettynb_profile.py +292 -0
  32. serve_asgi-1.0.0/scripts/qualify_prettynb.py +67 -0
  33. serve_asgi-1.0.0/scripts/security_profile.py +216 -0
  34. serve_asgi-1.0.0/scripts/smoke_installed.py +49 -0
  35. serve_asgi-1.0.0/src/serve_asgi/__init__.py +21 -0
  36. serve_asgi-1.0.0/src/serve_asgi/__main__.py +3 -0
  37. serve_asgi-1.0.0/src/serve_asgi/cli.py +76 -0
  38. serve_asgi-1.0.0/src/serve_asgi/config.py +66 -0
  39. serve_asgi-1.0.0/src/serve_asgi/demo.py +23 -0
  40. serve_asgi-1.0.0/src/serve_asgi/diagnostics.py +36 -0
  41. serve_asgi-1.0.0/src/serve_asgi/http.py +373 -0
  42. serve_asgi-1.0.0/src/serve_asgi/lifespan.py +103 -0
  43. serve_asgi-1.0.0/src/serve_asgi/listeners.py +72 -0
  44. serve_asgi-1.0.0/src/serve_asgi/loading.py +21 -0
  45. serve_asgi-1.0.0/src/serve_asgi/proxy.py +37 -0
  46. serve_asgi-1.0.0/src/serve_asgi/server.py +267 -0
  47. serve_asgi-1.0.0/src/serve_asgi/settings.py +75 -0
  48. serve_asgi-1.0.0/src/serve_asgi/types.py +10 -0
  49. serve_asgi-1.0.0/src/serve_asgi/websocket.py +337 -0
  50. serve_asgi-1.0.0/tests/autobahn/fuzzingclient.json +7 -0
  51. serve_asgi-1.0.0/tests/contracts/public-api-v1.json +327 -0
  52. serve_asgi-1.0.0/tests/security/http.json +20 -0
  53. serve_asgi-1.0.0/tests/test_budgets.py +193 -0
  54. serve_asgi-1.0.0/tests/test_foundations.py +114 -0
  55. serve_asgi-1.0.0/tests/test_http.py +235 -0
  56. serve_asgi-1.0.0/tests/test_listeners.py +181 -0
  57. serve_asgi-1.0.0/tests/test_load_profile.py +49 -0
  58. serve_asgi-1.0.0/tests/test_public_api.py +71 -0
  59. serve_asgi-1.0.0/tests/test_security.py +25 -0
  60. serve_asgi-1.0.0/tests/test_server.py +265 -0
  61. serve_asgi-1.0.0/tests/test_settings.py +89 -0
  62. serve_asgi-1.0.0/tests/test_websocket.py +219 -0
@@ -0,0 +1,60 @@
1
+ # Release notes
2
+
3
+ ## 1.0.0 — 2026-12-03
4
+
5
+ First stable release of the documented core API and compatibility policy. CPython 3.14 on Linux/macOS is the qualified platform matrix; base runtime dependencies remain empty. All changes below are included in this release.
6
+
7
+ ### Core stable contract
8
+
9
+ - Versioned public constructors/methods/dataclasses, coroutine boundaries and expanded ASGI type alias contract checks from source and installed artifacts.
10
+ - Compatibility/deprecation and private security reporting policy with explicit supported protocol/platform limits.
11
+ - Stable qualification review across installation, conformance, security, finite load/soak and installed application rollback.
12
+
13
+ ### Operator configuration
14
+
15
+ - Strict TOML and complete CLI budget configuration with explicit precedence and validation-only checks.
16
+ - Structured JSON serving logs omit exception text; operator guidance covers trust, capacity, telemetry and rollback.
17
+
18
+ ### Sustained load qualification
19
+
20
+ - Isolated HTTP/SSE/WebSocket workloads with correctness, latency, task, descriptor, memory and drain gates.
21
+ - Linux/macOS short PR checks, extended main/scheduled/manual profiles and retained failure receipts.
22
+
23
+ ### Security qualification
24
+
25
+ - Frozen and seeded HTTP/WebSocket rejection corpora, sentinel pipeline guards and response-splitting regression coverage.
26
+ - Linux/macOS ingress/reference agreement receipts and scheduled/manual security and Autobahn core workflows.
27
+
28
+ ### Application qualification
29
+
30
+ - Pinned installed Pretty Notebook profile over inherited TCP and Unix/nginx ingress, with actual auth, publication, upload/download, restart and retained-stack rollback checks.
31
+ - Isolated candidate/rollback environments and sanitized source/artifact receipts on Linux/macOS.
32
+
33
+ ### Operational budgets
34
+
35
+ - Admit TLS negotiations within the connection budget; cap global active requests and transport buffering.
36
+ - Bound body/interim-output deadlines and abort remaining HTTP/WebSocket work at the global drain deadline.
37
+ - Separate lifecycle liveness/readiness and expose immutable events with request/connection correlation.
38
+
39
+ ### Listener composition
40
+
41
+ - Unix and inherited TCP/Unix listeners with explicit ownership and safe path cleanup.
42
+ - Injected platform TLS contexts, bounded handshakes and explicit reverse proxy address/scheme trust.
43
+
44
+ ### WebSocket core
45
+
46
+ - RFC 6455 base framing and ASGI 2.5 messages, bounded queues, fragmentation, heartbeat and close handling.
47
+ - Independent client/server interoperability and a pinned Autobahn core workflow.
48
+
49
+ ### Core HTTP
50
+
51
+ - Persistent ordered HTTP/1.1, incremental/chunked input, expectations, trailers, SSE and bounded file streaming.
52
+ - Separate input, response, idle and write deadlines; transport EOF observation preserves pipelined bytes.
53
+
54
+ ### Package foundations
55
+
56
+ - Standalone Python >=3.14 package with no external runtime dependencies.
57
+ - Documented HTTP/ASGI scopes, bounded framing, application failures, deadlines and cooperative draining.
58
+ - Locked build, Linux/macOS checks, isolated wheel/source execution and OIDC publishing workflow.
59
+
60
+ Qualification receipts cover their declared workloads and durations. See the [stable core contract](docs/stability.md) for supported guarantees and limits. Production deployment requires its own application-specific verification and authorization.
@@ -0,0 +1,557 @@
1
+ # Serving Infrastructure implementation plan
2
+
3
+ Planning baseline: 2026-12-01. [GitHub Project 32](https://github.com/orgs/wispsy/projects/32) and the linked issues are the current development queue. This coordinated plan is carried in all three repositories; changes to shared architecture and task scope should be reflected in each copy. Issue and pull request history own delivery status and verification receipts.
4
+
5
+ ## Purpose and independence
6
+
7
+ Build independent, interoperable application serving, service execution and communication libraries. The target is zero mandatory third-party Python runtime packages outside Wispsy and zero mandatory external application infrastructure services. The initial packages use only the Python standard library and require Python >=3.14, preserving their original project configuration. CPython, the OS, OpenSSL, SQLite, browsers, DNS and certificate infrastructure remain platform dependencies. External development and qualification tools are permitted without becoming runtime requirements.
8
+
9
+ Each library must work outside Wispsy. Pretty Notebook is the first integration application, not the owner of general-purpose runtime contracts. No mandatory dependency between the three packages is necessary for their standalone APIs. Integrations use explicit adapters and injected callables; circular dependencies are prohibited. Do not extract a shared protocol repository until concrete implementations demonstrate reusable behavior and conformance tests.
10
+
11
+ ## Ownership
12
+
13
+ | Package | Owns | Excludes |
14
+ | --- | --- | --- |
15
+ | serve-asgi | ASGI 3 application execution; HTTP/WebSocket framing and handshakes; sockets, TLS, transport backpressure and connection draining | Process supervision; application routing/authentication; session and message policy; durable state |
16
+ | serve-runner | Service lifecycle, subprocess supervision, worker pools, listener ownership/handoff, local IPC, scheduling, job execution and recovery | HTTP/WebSocket codecs; application workflows; database/cache semantics; OS isolation |
17
+ | serve-gateway | Transport-independent peers, sessions, connections, channels, subscriptions, discovery, relaying and message distribution | WebSocket framing/ping/pong; process management; application auth policy; durable application persistence |
18
+
19
+ ```mermaid
20
+ flowchart LR
21
+ Client[HTTP and WebSocket clients] --> ASGI[serve-asgi]
22
+ ASGI --> App[ASGI application]
23
+ App --> Gateway[serve-gateway]
24
+ Gateway <--> IPC[Local IPC adapter]
25
+ IPC <--> Worker[Other application workers]
26
+ Runner[serve-runner] -. supervises .-> ASGI
27
+ Runner -. supervises .-> Worker
28
+ App --> State[Application-owned persistent state]
29
+ ```
30
+
31
+ WebSocket protocol events belong to the server; connection registration, presence, sessions and pub/sub belong to the gateway. A gateway may run on any conforming ASGI server. systemd owns overall service management and OS isolation; runner integrates with socket activation/readiness/watchdog rather than duplicating them. function-sequence owns workflow definition; runner owns execution, leases and recovery. backpack-store/application adapters own persistent data and versioning; gateway events distribute invalidations and runner IPC transports them.
32
+
33
+ ## Contracts before expansion
34
+
35
+ - Configuration uses typed immutable dataclasses and a deliberately documented TOML subset. Reject unknown keys, invalid types, non-finite timeouts and unbounded budgets. New configuration surfaces need explicit precedence and secret-redaction rules.
36
+ - All queues, messages, connections, registrations, retries and deadlines have finite budgets. Define overflow as rejection, bounded wait or eviction before implementing a feature; never silently create an unbounded buffer.
37
+ - ASGI is a single async callable `(scope, receive, send)`. Lifespan and application requests execute on the same event loop. Per-request state is a shallow copy of lifespan state. Unsupported lifespan in auto mode differs from an explicit startup.failed event.
38
+ - Services have explicit pending, starting, running, stopping, stopped, exited and failed states. Startup follows dependency order and shutdown reverses it. Process-spawn readiness is explicitly weaker than application health until RUN-04.
39
+ - A peer is an identity, a session is a logical interaction, and a connection is one active link. Reconnection/resumption requires explicit policy; the initial in-memory gateway is ephemeral and process-local.
40
+ - IPC and gateway delivery guarantees state ordering, duplicates, overflow and disconnection behavior. Durable jobs are at-least-once with leases/idempotency; do not claim exactly-once side effects.
41
+ - Logging uses Python logging; counters/gauges/histograms and tracing use injected, interoperable hooks. Request/session/job/correlation IDs and liveness/readiness are distinct. Never log credentials or opaque authentication tokens.
42
+ - Listener and process ownership include cleanup responsibilities. Cancellation and partial startup failure must release tasks, subprocesses, sockets and registry entries. Draining has a deadline followed by cancellation or process termination.
43
+ - Initial runtime support is Linux and macOS, CPython 3.14+. Windows support requires an explicit qualification task before it is advertised. POSIX signals, process groups and Unix sockets need documented capability checks.
44
+ - HTTP/2 and HTTP/3 are later optional decisions: ingress may terminate them and speak HTTP/1.1 to the application. Cryptography uses ssl and reviewed platform/protocol implementations.
45
+
46
+ ## Milestones and release gates
47
+
48
+ Versions describe coordinated development gates, not mandatory simultaneous releases. Each repository releases independently; empty later milestones may reflect work owned by another package. A version label in pyproject.toml is not evidence of a published release. No dates are promised before qualification evidence exists.
49
+
50
+ | Milestone | Acceptance gate |
51
+ | --- | --- |
52
+ | v0.1 | Contracts and foundations: bounded, minimal runnable implementations; no production claim. |
53
+ | v0.2 | Core implementation: complete HTTP/1.1, WebSocket adapters and supervised recovery. |
54
+ | v0.3 | Operational composition: worker pools, IPC, sessions and graceful draining. |
55
+ | v0.4 | Pretty Notebook integration: staging profile, shared-state correctness and rollback. |
56
+ | v0.5 | Production hardening: conformance, security, crash recovery, load and soak evidence. |
57
+ | v0.6 | Independent operations: durable jobs, deployment profiles, diagnostics and restoration. |
58
+ | v0.7 | Extended connectivity: peer discovery and browser WebRTC signaling. |
59
+ | v0.8 | First-party relay: authenticated STUN/TURN implementation and qualified fallback. |
60
+ | v0.9 | Optional native endpoints: explicit dependency decision and interoperability qualification. |
61
+ | v1.0 | Stable platform: published guarantees, compatibility policy and reproducible qualification. |
62
+
63
+ The v0.1 deliverables are validated ASGI/lifespan contracts plus a bounded one-request HTTP development server; validated service topology plus a bounded subprocess supervisor; and bounded in-memory messaging with distinct peer/session/connection identities. It is not a production-readiness claim. The three v0.1 qualification issues gate developer release review. Full HTTP/1.1 streaming/persistence, WebSockets and application health recovery belong to v0.2.
64
+
65
+ At v0.4, actual Pretty Notebook behavior must work in a controlled staging profile without mandatory Uvicorn, Gunicorn or external messaging infrastructure. Inspect the application and its dependency graph at implementation time. Prove cross-worker state visibility, version tracking, concurrent writes, authentication, restart and rollback. Existing deployment remains available until the replacement is verified. Production deployment is a separate operation.
66
+
67
+ v0.7 adds browser-native signaling. The v0.8 track selected on 2026-12-02 implements an optional first-party STUN/TURN service using standard-library/platform cryptography, then qualifies authenticated UDP relay and TCP/TLS fallback. The v0.9 track evaluates an existing reviewed DTLS binding or a narrow native wrapper around platform OpenSSL before any optional native data endpoint is selected. Media has a separate needs-driven decision. These optional connectivity tracks do not block stable core serving, supervision or messaging APIs.
68
+
69
+ ## First stable package release
70
+
71
+ The completed core and optional-connectivity gates form the 1.0.0 release target selected on 2026-12-03. Each repository tracks its reviewed source, CI, Trusted Publishing run and registry verification in its release task: [serve-asgi REL-01](https://github.com/wispsy/serve-asgi/issues/29), [serve-runner REL-01](https://github.com/wispsy/serve-runner/issues/34), and [serve-gateway REL-01](https://github.com/wispsy/serve-gateway/issues/46). The earlier 0.1.0 labels identify unpublished development baselines. Native endpoint implementation remains deferred under the recorded feasibility decision; publication does not provision or deploy services.
72
+
73
+ ## Testing and evidence
74
+
75
+ | Layer | Required evidence and placement |
76
+ | --- | --- |
77
+ | Contracts | tests/ unittest cases for validation, topology/state machines, event ordering, identities and resource budgets |
78
+ | Runtime | Real loopback sockets/subprocesses, cancellation, partial startup, slow peers, queue overflow, cleanup and bounded shutdown |
79
+ | Protocol | RFC 9110/9112 vectors, ASGI 3 and lifespan events, RFC 6455 frames, Autobahn reports and differential tests against established servers |
80
+ | Security | Request smuggling/splitting, trusted proxy spoofing, slowloris, oversized/malformed frames/envelopes, authorization/replay and IPC permissions |
81
+ | Composition | Actual installed Pretty Notebook; multiple workers/connections; state invalidation; artifact upgrades and rollback |
82
+ | Reliability | Worker/supervisor death, descriptor/task/memory trends, bounded retries, leases, interrupted jobs and restored state |
83
+ | Performance | Defined workload/hardware, startup/idle memory, memory per connection, throughput, p95/p99, queue depth and shutdown duration |
84
+ | Packaging | Fresh wheel and source installations, dependency metadata, console scripts and independent runnable API smokes |
85
+ | Portability | Linux/macOS CI on supported CPython; capability-specific tests for POSIX behavior |
86
+
87
+ Ordinary pull requests run the smallest affected checks locally plus the relevant suite, then Linux/macOS CI. Build and install both distributions for packaging changes. Security corpora, Autobahn, fuzzing, load, crash, soak and application qualification grow with their owning tasks and run in scheduled/manual workflows where expensive. Keep raw evidence and immutable source/artifact identifiers in issues/PRs. Do not infer conformance from a handful of development-server tests.
88
+
89
+ ## Repository layout and automation
90
+
91
+ Each repository contains src/<package>/, tests/, docs/, scripts/, README.md, IMPLEMENTATION_PLAN.md, pyproject.toml, uv.lock, LICENSE, .github/workflows/ci.yaml and .github/workflows/release.yaml. docs/ owns public contracts, examples, support limits, testing and operator guidance. New behavior ships with its focused tests and relevant documentation.
92
+
93
+ CI uses locked uv environments, treats compilation warnings as errors, runs unittest discovery, builds wheel/source distributions, and tests installed API/CLI behavior in fresh isolated environments. The original uv_build backend range is preserved. No new runtime dependency is added for implementation convenience.
94
+
95
+ release.yaml runs only for a published GitHub release, checks that the tag is exactly v<package-version> and belongs to main, reruns relevant verification, builds and validates both artifacts, and passes those artifacts to a separate publish job. Only that job has id-token: write and uses environment pypi plus PyPA Trusted Publishing. Each repository's pypi environment permits v* tags. There are no API tokens in workflow files. The PyPI publisher configuration must match wispsy/<repository>, release.yaml and pypi; the first authorized publication verifies that identity through OIDC. Release tasks retain publication and registry receipts separately from implementation qualification. Production deployment requires separate authorization.
96
+
97
+ ## First delivery batch
98
+
99
+ 1. ASGI-01: shared plan, package/CI/release foundations, ASGI/config/import/lifespan APIs.
100
+ 2. RUN-01: shared plan, package/CI/release foundations, typed service topology and validate CLI.
101
+ 3. GW-01: shared plan, package/CI/release foundations, bounded in-memory pub/sub and demo.
102
+ 4. ASGI-02: minimal bounded HTTP server, real-socket tests and support-limit documentation.
103
+ 5. RUN-02: bounded subprocess supervision, real-process tests and start CLI.
104
+
105
+ These are five focused PRs. Independent foundations target main; dependent runtime tasks may stack on their corresponding foundation branch. Merge a passing child into its parent before squash-merging that parent into main, following the chosen stack workflow. Preserve issue closure and verification evidence for each task, remove completed branches after reconciliation, update the Project, and smoke final main. Stop at the initial release qualification gate rather than publishing automatically.
106
+
107
+ ## Task registry
108
+
109
+ Acceptance and verification are included here for a complete baseline; linked issues own subsequent scope changes, status and implementation receipts. Native GitHub dependency links mirror the prerequisites below. First-party relay implementation and a subsequent native data-endpoint feasibility spike were selected on 2026-12-02; linked issue status owns current progress and prerequisites.
110
+
111
+ ### serve-asgi
112
+
113
+ #### [ASGI-01: Establish ASGI contracts, configuration and package foundations](https://github.com/wispsy/serve-asgi/issues/1)
114
+
115
+ Milestone: **v0.1**. Prerequisites: None.
116
+
117
+ - Publish the shared roadmap, architecture boundaries, support policy and development/release guides.
118
+ - Provide typed ASGI callables, validated immutable server configuration, explicit import loading and bounded lifespan handling.
119
+ - Add unittest discovery, wheel/source build verification, Linux/macOS CI and release.yaml with the pypi environment and job-scoped OIDC; keep runtime dependencies empty.
120
+
121
+ Verification: Configuration boundaries, application import failures, lifespan success/failure/unsupported/timeout/cancellation, clean installed artifacts and CLI help.
122
+
123
+ #### [ASGI-02: Run a bounded HTTP development server over TCP](https://github.com/wispsy/serve-asgi/issues/2)
124
+
125
+ Milestone: **v0.1**. Prerequisites: [ASGI-01](https://github.com/wispsy/serve-asgi/issues/1).
126
+
127
+ - Expose Server.serve(), shutdown() and run() with a loopback default and an importable example application.
128
+ - Accept an explicitly limited HTTP/1.1 profile: origin-form targets, one Host, bounded Content-Length requests, streamed close-delimited responses and one request per connection.
129
+ - Reject ambiguous framing and unsupported transfer codings, upgrades and expectations before invoking applications; bound connections, headers, bodies and timeouts.
130
+ - Propagate lifespan state per request; enforce response event order, disconnect errors and bounded shutdown cancellation. Document every unsupported protocol feature.
131
+
132
+ Verification: Real loopback HTTP, fragmented input, malformed framing, streaming/HEAD/empty responses, app failures, slow clients, concurrency limits and graceful shutdown.
133
+
134
+ #### [ASGI-03: Qualify the initial ASGI developer release](https://github.com/wispsy/serve-asgi/issues/3)
135
+
136
+ Milestone: **v0.1**. Prerequisites: [ASGI-02](https://github.com/wispsy/serve-asgi/issues/2).
137
+
138
+ - Exercise documented examples from independently installed wheel and source distribution.
139
+ - Record the limited HTTP profile against an established server and distinguish rejected features from supported behavior.
140
+ - Review public APIs, release notes, package metadata and rollback/install instructions; publish only after separate release authorization.
141
+
142
+ Verification: Installed artifacts on Linux/macOS; reproducible compatibility transcript and explicit v0.1 release checklist.
143
+
144
+ #### [ASGI-04: Implement complete HTTP/1.1 framing and streaming](https://github.com/wispsy/serve-asgi/issues/4)
145
+
146
+ Milestone: **v0.2**. Prerequisites: [ASGI-03](https://github.com/wispsy/serve-asgi/issues/3).
147
+
148
+ - Implement incremental request streams, chunk decoding and bounded trailers, keep-alive, pipelining order, expectations, target forms and response length rules.
149
+ - Define disconnect and response cancellation semantics; stream files and SSE without buffering entire payloads.
150
+ - Maintain RFC 9110/9112 acceptance and rejection vectors, including proxy framing mismatches.
151
+
152
+ Verification: Wire-level fragmented/chunked/pipelined requests, request smuggling corpus, slow readers/writers, SSE and large-file memory checks; differential profile.
153
+
154
+ #### [ASGI-05: Implement WebSocket protocol and ASGI events](https://github.com/wispsy/serve-asgi/issues/5)
155
+
156
+ Milestone: **v0.2**. Prerequisites: [ASGI-03](https://github.com/wispsy/serve-asgi/issues/3).
157
+
158
+ - Implement RFC 6455 handshake, masking, fragmentation, ping/pong, UTF-8, close codes and bounded messages.
159
+ - Map ASGI WebSocket connect/accept/receive/send/disconnect events and denial behavior; exclude application sessions and routing.
160
+ - Declare supported ASGI HTTP/WebSocket sub-specification and extensions accurately.
161
+
162
+ Verification: Autobahn client/server compliance profile, malformed frames, fragmented Unicode, close races, application cancellation and queue bounds.
163
+
164
+ #### [ASGI-06: Support Unix and inherited sockets, TLS and proxy trust](https://github.com/wispsy/serve-asgi/issues/6)
165
+
166
+ Milestone: **v0.3**. Prerequisites: [ASGI-04](https://github.com/wispsy/serve-asgi/issues/4).
167
+
168
+ - Support TCP, Unix sockets and inherited socket descriptors through injected listeners; document ownership and cleanup.
169
+ - Use ssl.SSLContext for TLS, never custom cryptography; accept proxy headers only from explicitly trusted peers.
170
+ - Test socket activation composition with serve-runner without importing it as a mandatory dependency.
171
+
172
+ Verification: Unix permissions/cleanup, inherited descriptors, TLS handshake failures, trusted/untrusted proxy spoofing and listener ownership.
173
+
174
+ #### [ASGI-07: Complete connection budgets, flow control and graceful draining](https://github.com/wispsy/serve-asgi/issues/7)
175
+
176
+ Milestone: **v0.3**. Prerequisites: [ASGI-04](https://github.com/wispsy/serve-asgi/issues/4), [ASGI-05](https://github.com/wispsy/serve-asgi/issues/5).
177
+
178
+ - Enforce per-connection and global budgets, header/body/idle/write timeouts and bounded buffering.
179
+ - Stop accepting, drain HTTP and WebSocket workloads, then cancel within configured deadlines.
180
+ - Expose structured logging hooks, connection/request correlation and liveness/readiness separately.
181
+
182
+ Verification: Saturation, slowloris and slow-reader workloads; timeout and cancellation races; bounded memory, task and descriptor counts.
183
+
184
+ #### [ASGI-08: Qualify the Pretty Notebook ASGI staging profile](https://github.com/wispsy/serve-asgi/issues/8)
185
+
186
+ Milestone: **v0.4**. Prerequisites: [ASGI-06](https://github.com/wispsy/serve-asgi/issues/6), [ASGI-07](https://github.com/wispsy/serve-asgi/issues/7), [RUN-05](https://github.com/wispsy/serve-runner/issues/5), [GW-02](https://github.com/wispsy/serve-gateway/issues/2).
187
+
188
+ - Inventory the current Pretty Notebook ASGI application and dependencies at implementation time.
189
+ - Exercise actual authentication, errors, uploads/downloads, SSE and WebSockets where used; retain the prior server rollback path.
190
+ - Produce source/artifact evidence and a staging deployment plan; production deployment requires separate authorization.
191
+
192
+ Verification: Installed application integration, nginx ingress, Unix/inherited listeners, process restart and previous-stack rollback rehearsal.
193
+
194
+ #### [ASGI-09: Establish protocol, fuzz and security qualification](https://github.com/wispsy/serve-asgi/issues/9)
195
+
196
+ Milestone: **v0.5**. Prerequisites: [ASGI-08](https://github.com/wispsy/serve-asgi/issues/8).
197
+
198
+ - Automate HTTP/ASGI/WebSocket conformance and differential testing with reproducible corpora.
199
+ - Cover smuggling, response splitting, proxy trust, malformed frames, cancellation and resource exhaustion.
200
+ - Add scheduled/manual qualification workflows and retain reports; keep ordinary PR checks focused.
201
+
202
+ Verification: Seeded fuzz regressions, Autobahn reports, ingress/backend agreement and documented security regression gates.
203
+
204
+ #### [ASGI-10: Measure sustained server reliability and performance](https://github.com/wispsy/serve-asgi/issues/10)
205
+
206
+ Milestone: **v0.5**. Prerequisites: [ASGI-09](https://github.com/wispsy/serve-asgi/issues/9).
207
+
208
+ - Define workload/hardware, startup latency, throughput, p95/p99, memory per connection, idle memory and shutdown duration.
209
+ - Run load and extended soak profiles for HTTP, SSE and WebSockets; publish task/descriptor/memory trends and budgets.
210
+ - Treat predictable resource usage and correctness as gates, not headline throughput.
211
+
212
+ Verification: Repeatable load/soak commands with baselines, thresholds and failure artifacts.
213
+
214
+ #### [ASGI-11: Finish server configuration, diagnostics and operator guides](https://github.com/wispsy/serve-asgi/issues/11)
215
+
216
+ Milestone: **v0.6**. Prerequisites: [ASGI-10](https://github.com/wispsy/serve-asgi/issues/10).
217
+
218
+ - Provide typed TOML/CLI configuration, interoperable metrics/tracing hooks and redacted structured logs.
219
+ - Document certificates, trust boundaries, capacity, timeout tuning, upgrades and incident diagnostics.
220
+ - Keep routing, authentication policy, process supervision and durable state outside this package.
221
+
222
+ Verification: Configuration precedence, invalid inputs, secret redaction and operator runbook exercises.
223
+
224
+ #### [ASGI-12: Qualify stable ASGI APIs and operational guarantees](https://github.com/wispsy/serve-asgi/issues/12)
225
+
226
+ Milestone: **v1.0**. Prerequisites: [ASGI-11](https://github.com/wispsy/serve-asgi/issues/11), [RUN-14](https://github.com/wispsy/serve-runner/issues/14), [GW-13](https://github.com/wispsy/serve-gateway/issues/13).
227
+
228
+ - Freeze supported APIs, protocol versions, compatibility/deprecation policy and Linux/macOS platform matrix.
229
+ - Re-run the release qualification matrix and publish documented limits, security reporting and reproducible artifacts.
230
+ - HTTP/2/3 remain optional future decisions; they are not prerequisites while ingress terminates them.
231
+
232
+ Verification: Signed-off conformance, security, load, soak, installation, integration and rollback evidence; separate publication authorization.
233
+
234
+ ### serve-runner
235
+
236
+ #### [RUN-01: Establish service contracts, topology and package foundations](https://github.com/wispsy/serve-runner/issues/1)
237
+
238
+ Milestone: **v0.1**. Prerequisites: None.
239
+
240
+ - Publish the shared roadmap, runtime boundaries, support policy and development/release guides.
241
+ - Define Service, ServiceState, RestartPolicy and Manager with validated argument vectors, finite budgets and dependency ordering; reject missing/cyclic dependencies.
242
+ - Parse a small documented serve.toml profile and provide a validate CLI.
243
+ - Add unittest, artifact verification, Linux/macOS CI and release.yaml with pypi/OIDC; keep runtime dependencies empty.
244
+
245
+ Verification: State transitions, topology order/cycles/missing services, typed TOML errors, CLI status codes and clean installed artifacts.
246
+
247
+ #### [RUN-02: Supervise bounded subprocess services](https://github.com/wispsy/serve-runner/issues/2)
248
+
249
+ Milestone: **v0.1**. Prerequisites: [RUN-01](https://github.com/wispsy/serve-runner/issues/1).
250
+
251
+ - Launch argument vectors without a shell; track process state and exit status per service.
252
+ - Implement never/on-failure/always restart policies, finite restart budgets and capped backoff; readiness initially means process spawned, not application healthy.
253
+ - Start in dependency order and stop in reverse order; terminate, wait, kill and reap on cancellation or startup failure.
254
+ - Provide start CLI signal handling and a bounded one-shot example; document POSIX process-group cleanup and platform limits.
255
+
256
+ Verification: Real subprocess success/failure/restart exhaustion, ordered startup, cancellation, partial-start cleanup, shutdown timeout and process reaping.
257
+
258
+ #### [RUN-03: Qualify the initial runner developer release](https://github.com/wispsy/serve-runner/issues/3)
259
+
260
+ Milestone: **v0.1**. Prerequisites: [RUN-02](https://github.com/wispsy/serve-runner/issues/2).
261
+
262
+ - Run the documented service topology from wheel and source installations on Linux/macOS.
263
+ - Record signal behavior, reaping, environment inheritance, process-spawn readiness and restart-limit guarantees.
264
+ - Review release notes and public interfaces; keep publication separately authorized.
265
+
266
+ Verification: Installed subprocess lifecycle fixtures, CLI failures and explicit v0.1 release checklist.
267
+
268
+ #### [RUN-04: Add health checks, heartbeats and recovery policies](https://github.com/wispsy/serve-runner/issues/4)
269
+
270
+ Milestone: **v0.2**. Prerequisites: [RUN-03](https://github.com/wispsy/serve-runner/issues/3).
271
+
272
+ - Distinguish liveness, readiness and progress with deadlines and injectable HealthCheck strategies.
273
+ - Add worker heartbeat loss, startup grace and restart stability windows, jitter and operator-visible failure reasons.
274
+ - Dependency readiness gates must use health evidence; never equate spawning with application readiness.
275
+
276
+ Verification: Unhealthy/alive and healthy/unready cases, stale heartbeat, restart storms, flapping and dependency failure propagation.
277
+
278
+ #### [RUN-05: Implement worker pools and listener handoff](https://github.com/wispsy/serve-runner/issues/5)
279
+
280
+ Milestone: **v0.3**. Prerequisites: [RUN-04](https://github.com/wispsy/serve-runner/issues/4), [ASGI-06](https://github.com/wispsy/serve-asgi/issues/6).
281
+
282
+ - Define Worker and WorkerPool interfaces for ASGI, async and command workloads.
283
+ - Own listener descriptors once, pass them to workers, scale pools and roll replacements without dropping the listener.
284
+ - Integrate systemd LISTEN_PID/LISTEN_FDS, readiness notification and watchdog where supported; document POSIX-only mechanisms.
285
+
286
+ Verification: Actual inherited socket traffic, pool scaling, rolling replacement, failed warmup rollback and descriptor/orphan cleanup.
287
+
288
+ #### [RUN-06: Provide bounded authenticated local IPC](https://github.com/wispsy/serve-runner/issues/6)
289
+
290
+ Milestone: **v0.3**. Prerequisites: [RUN-04](https://github.com/wispsy/serve-runner/issues/4).
291
+
292
+ - Implement versioned local IPC envelopes, endpoint ownership/permissions, peer identity and bounded queues.
293
+ - Define ordering, delivery, cancellation, overflow and restart semantics; avoid claims of durable or exactly-once delivery.
294
+ - Provide gateway adapters through explicit integration seams, with no circular dependencies.
295
+
296
+ Verification: Multi-process delivery, unauthorized access, peer death, malformed/oversized messages, queue saturation and reconnect semantics.
297
+
298
+ #### [RUN-07: Compose and verify the Pretty Notebook staging topology](https://github.com/wispsy/serve-runner/issues/7)
299
+
300
+ Milestone: **v0.4**. Prerequisites: [RUN-05](https://github.com/wispsy/serve-runner/issues/5), [RUN-06](https://github.com/wispsy/serve-runner/issues/6), [ASGI-08](https://github.com/wispsy/serve-asgi/issues/8), [GW-06](https://github.com/wispsy/serve-gateway/issues/6).
301
+
302
+ - Create a pinned staging profile that operates without mandatory Uvicorn, Gunicorn or external messaging infrastructure.
303
+ - Prove cross-worker invalidation/version tracking and concurrent-write coordination through the application persistence owner.
304
+ - Separate serving, supervision, messaging, auth and durable state ownership; retain a tested prior deployment profile.
305
+ - Document staging commands and rollback; do not deploy production without separate authorization.
306
+
307
+ Verification: Actual installed Pretty Notebook workflow across multiple workers, restart/drain, shared-state visibility, backup restore and rollback rehearsal.
308
+
309
+ #### [RUN-08: Qualify crash recovery, resource policy and orphan cleanup](https://github.com/wispsy/serve-runner/issues/8)
310
+
311
+ Milestone: **v0.5**. Prerequisites: [RUN-07](https://github.com/wispsy/serve-runner/issues/7).
312
+
313
+ - Define ResourcePolicy, resource accounting and platform-specific enforcement; defer OS isolation to systemd/OS.
314
+ - Exercise worker and supervisor death, signal races, dependency failures and descriptor exhaustion.
315
+ - Add scheduled crash/load/soak profiles with reproducible receipts and leak budgets.
316
+
317
+ Verification: Supervisor termination, descendant cleanup, repeated restarts, resource exhaustion and sustained topology recovery.
318
+
319
+ #### [RUN-09: Implement durable jobs, leases and recovery](https://github.com/wispsy/serve-runner/issues/9)
320
+
321
+ Milestone: **v0.6**. Prerequisites: [RUN-08](https://github.com/wispsy/serve-runner/issues/8).
322
+
323
+ - Define Job and a replaceable persistent queue, initially single-host SQLite with safe transactions.
324
+ - Specify at-least-once execution, leases, retries, idempotency keys, cancellation, checkpoints and crash reconciliation.
325
+ - Keep workflow definitions caller-owned; provide an optional function-sequence seam without making it mandatory.
326
+
327
+ Verification: Death before/after claim and side effect, lease expiry, duplicate attempts, cancellation, retry exhaustion and database restart/backup.
328
+
329
+ #### [RUN-10: Add scheduled workers and deterministic job policies](https://github.com/wispsy/serve-runner/issues/10)
330
+
331
+ Milestone: **v0.6**. Prerequisites: [RUN-09](https://github.com/wispsy/serve-runner/issues/9).
332
+
333
+ - Implement scheduled/queue/process/async worker adapters and declared concurrency limits.
334
+ - Specify timezone, DST, missed-run, overlap and clock-adjustment behavior before accepting recurring schedules.
335
+ - Allow applications to coordinate checkpointing and idempotent work without embedding workflow semantics.
336
+
337
+ Verification: Virtual-clock scheduling, DST transitions, restart catch-up, overlap limits, cancellation and persisted recovery.
338
+
339
+ #### [RUN-11: Build deployment profiles and operational controls](https://github.com/wispsy/serve-runner/issues/11)
340
+
341
+ Milestone: **v0.6**. Prerequisites: [RUN-08](https://github.com/wispsy/serve-runner/issues/8).
342
+
343
+ - Add status/inspect/scale/reload/logs/stop and generate systemd/nginx/doctor interfaces through authenticated local control.
344
+ - Specify TOML precedence, protected runtime directories, secret references and redacted logging.
345
+ - Generate reviewable configuration and reproducible installation instructions; external changes remain explicit operator actions.
346
+
347
+ Verification: Control authorization, concurrent operations, configuration validation, generated profile checks and signal/socket activation.
348
+
349
+ #### [RUN-12: Verify backup, restoration and deployment rollback](https://github.com/wispsy/serve-runner/issues/12)
350
+
351
+ Milestone: **v0.6**. Prerequisites: [RUN-09](https://github.com/wispsy/serve-runner/issues/9), [RUN-10](https://github.com/wispsy/serve-runner/issues/10), [RUN-11](https://github.com/wispsy/serve-runner/issues/11).
352
+
353
+ - Publish recoverable deployment profiles and database/state backup boundaries.
354
+ - Rehearse interrupted upgrades, artifact rollback, restoration and lease reconciliation.
355
+ - Document SQLite WAL single-writer/local-filesystem constraints and persistence adapter ownership.
356
+
357
+ Verification: Restore into a clean environment, interrupted migration/upgrade and rollback preserving application data and job invariants.
358
+
359
+ #### [RUN-13: Operate optional signaling and relay services](https://github.com/wispsy/serve-runner/issues/13)
360
+
361
+ Milestone: **v0.7**. Prerequisites: [RUN-12](https://github.com/wispsy/serve-runner/issues/12), [GW-10](https://github.com/wispsy/serve-gateway/issues/10).
362
+
363
+ - Extend topology examples for gateway/signaling/relay workloads with independent scaling and health checks.
364
+ - Expose replaceable worker adapters and capability probes; do not embed WebRTC protocols in the supervisor.
365
+ - Record runtime and infrastructure opt-ins explicitly.
366
+
367
+ Verification: Partial connectivity service outages, independent restart/scaling and browser signaling topology smoke.
368
+
369
+ #### [RUN-14: Qualify stable service runtime guarantees](https://github.com/wispsy/serve-runner/issues/14)
370
+
371
+ Milestone: **v1.0**. Prerequisites: [RUN-12](https://github.com/wispsy/serve-runner/issues/12).
372
+
373
+ - Freeze lifecycle, configuration, IPC, worker and job APIs and the platform support matrix.
374
+ - Provide security reporting, compatibility policy and measured recovery/shutdown guarantees.
375
+ - Re-run portable installation, crash, soak, restoration and composition evidence before separately authorized publication.
376
+
377
+ Verification: Stable release qualification report with upgrade/rollback, orphan, resource, durable job and deployment receipts.
378
+
379
+ #### [RUN-15: Qualify first-party relay supervision and recovery](https://github.com/wispsy/serve-runner/issues/32)
380
+
381
+ Milestone: **v0.8**. Prerequisites: [GW-11D](https://github.com/wispsy/serve-gateway/issues/35), [GW-11E1](https://github.com/wispsy/serve-gateway/issues/41).
382
+
383
+ - Supervise the explicitly selected relay through existing command workers without a mandatory gateway dependency.
384
+ - Require protected current-PID readiness and fresh heartbeats; refuse stale receipts and retain independent signaling availability during bounded relay restart.
385
+ - Record installed Linux/macOS recovery evidence, socket/session loss boundaries and complete process/receipt cleanup.
386
+
387
+ Verification: Real relay crashes/restarts, independently available signaling, current-PID/fresh-heartbeat admission, UDP availability and owned process/receipt cleanup.
388
+
389
+ ### serve-gateway
390
+
391
+ #### [GW-01: Establish bounded messaging primitives and package foundations](https://github.com/wispsy/serve-gateway/issues/1)
392
+
393
+ Milestone: **v0.1**. Prerequisites: None.
394
+
395
+ - Publish the shared roadmap, communication boundaries, support policy and development/release guides.
396
+ - Define Message, Peer, Session, Connection, Channel and transport/registry seams with distinct identities.
397
+ - Provide an in-memory Gateway with bounded registration/subscriptions/message queues, explicit overflow and cleanup behavior and a runnable demo.
398
+ - Add unittest, wheel/source verification, Linux/macOS CI and release.yaml with pypi/OIDC; keep runtime dependencies empty.
399
+
400
+ Verification: Pub/sub fan-out, connection/session distinction, invalid identities/payloads, byte/queue/registry bounds, disconnect cleanup and installed demo.
401
+
402
+ #### [GW-02: Adapt gateway messaging to ASGI WebSockets](https://github.com/wispsy/serve-gateway/issues/2)
403
+
404
+ Milestone: **v0.2**. Prerequisites: [GW-03](https://github.com/wispsy/serve-gateway/issues/3).
405
+
406
+ - Provide a standard ASGI application compatible with serve-asgi and an established alternative server.
407
+ - Define a versioned application message envelope, JSON/binary limits, serialized sends, cancellation and disconnect cleanup.
408
+ - Inject authentication/authorization and origin policies; protocol handshakes/framing remain server responsibilities.
409
+
410
+ Verification: ASGI event harness, real clients over two servers, oversized/malformed envelopes, denied access, slow consumers and shutdown.
411
+
412
+ #### [GW-03: Qualify the initial gateway developer release](https://github.com/wispsy/serve-gateway/issues/3)
413
+
414
+ Milestone: **v0.1**. Prerequisites: [GW-01](https://github.com/wispsy/serve-gateway/issues/1).
415
+
416
+ - Exercise documented in-memory messaging and transport replacement from wheel and source installations.
417
+ - Record process-local, ephemeral, bounded and non-durable delivery guarantees and explicit session lifetime.
418
+ - Review public API and release notes; keep publication separately authorized.
419
+
420
+ Verification: Independent installed demos, overflow/isolation cases, CLI failures and explicit v0.1 release checklist.
421
+
422
+ #### [GW-04: Implement session resumption, presence and channel policies](https://github.com/wispsy/serve-gateway/issues/4)
423
+
424
+ Milestone: **v0.3**. Prerequisites: [GW-02](https://github.com/wispsy/serve-gateway/issues/2).
425
+
426
+ - Separate transport connections from resumable sessions and identifiable peers, with TTL and eviction budgets.
427
+ - Define resumption credentials/rotation via injected policy, replay window, sequence IDs and presence semantics.
428
+ - Specify subscription lifetime, authorization revocation and offline/slow consumer behavior.
429
+
430
+ Verification: Concurrent devices, reconnect/replay/expiry, revoked access, duplicate/out-of-order messages and bounded presence/subscriptions.
431
+
432
+ #### [GW-05: Distribute messages through runner IPC adapters](https://github.com/wispsy/serve-gateway/issues/5)
433
+
434
+ Milestone: **v0.3**. Prerequisites: [GW-04](https://github.com/wispsy/serve-gateway/issues/4), [RUN-06](https://github.com/wispsy/serve-runner/issues/6).
435
+
436
+ - Adapt bounded local runner IPC to gateway publish/subscribe without a mandatory dependency.
437
+ - Specify cross-worker ordering, deduplication, overflow and transient delivery guarantees.
438
+ - Keep durable application state in backpack-store/application adapters; events trigger version-aware invalidation.
439
+
440
+ Verification: Actual multi-process pub/sub, worker death/rejoin, duplicate events, invalidation, unauthorized endpoints and saturation.
441
+
442
+ #### [GW-06: Verify Pretty Notebook realtime and shared-state integration](https://github.com/wispsy/serve-gateway/issues/6)
443
+
444
+ Milestone: **v0.4**. Prerequisites: [GW-05](https://github.com/wispsy/serve-gateway/issues/5), [ASGI-08](https://github.com/wispsy/serve-asgi/issues/8).
445
+
446
+ - Inventory actual Pretty Notebook realtime and invalidation needs before adding application-specific adapters.
447
+ - Verify live operations across multiple connections/workers and reconnection without losing persisted edits.
448
+ - Provide a staging profile and prior messaging rollback; leave authentication and persistence policies application-owned.
449
+
450
+ Verification: Actual application clients, concurrent edits/version conflicts, worker restart, missed event reconciliation and rollback.
451
+
452
+ #### [GW-07: Qualify gateway security and abuse limits](https://github.com/wispsy/serve-gateway/issues/7)
453
+
454
+ Milestone: **v0.5**. Prerequisites: [GW-06](https://github.com/wispsy/serve-gateway/issues/6).
455
+
456
+ - Threat-model peer discovery, unauthorized subscriptions, replay, origin trust and signaling abuse.
457
+ - Enforce per-principal rates/quotas through injectable policies and redact credentials from diagnostics.
458
+ - Fuzz envelopes and exercise identity/authorization changes during active sessions.
459
+
460
+ Verification: Cross-principal isolation, forged/replayed messages, rate/queue exhaustion, reconnect storms and malformed inputs.
461
+
462
+ #### [GW-08: Measure messaging load and sustained resource bounds](https://github.com/wispsy/serve-gateway/issues/8)
463
+
464
+ Milestone: **v0.5**. Prerequisites: [GW-07](https://github.com/wispsy/serve-gateway/issues/7).
465
+
466
+ - Record fan-out latency, queue depth, memory per peer/session, recovery and shutdown budgets.
467
+ - Exercise slow consumers, reconnect storms, large channels and cross-worker distribution over extended runs.
468
+ - Retain scheduled/manual load and soak reports.
469
+
470
+ Verification: Reproducible mixed-workload benchmarks with memory/task/descriptor trends and declared thresholds.
471
+
472
+ #### [GW-09: Finish gateway configuration, diagnostics and recovery guides](https://github.com/wispsy/serve-gateway/issues/9)
473
+
474
+ Milestone: **v0.6**. Prerequisites: [GW-08](https://github.com/wispsy/serve-gateway/issues/8).
475
+
476
+ - Provide typed configuration, metrics/log/tracing hooks and separate liveness/readiness.
477
+ - Document channel/session policy, capacity, failure and restoration behavior with optional adapters.
478
+ - Demonstrate standalone use on an alternative ASGI server and operational composition without circular imports.
479
+
480
+ Verification: Redacted diagnostics, configuration boundaries, adapter failure, recovery exercises and installed interoperability.
481
+
482
+ #### [GW-10: Add peer discovery and browser WebRTC signaling](https://github.com/wispsy/serve-gateway/issues/10)
483
+
484
+ Milestone: **v0.7**. Prerequisites: [GW-09](https://github.com/wispsy/serve-gateway/issues/9).
485
+
486
+ - Define authorized peer discovery and signaling envelopes for browser-native offer/answer/ICE exchange.
487
+ - Use gateway channels for signaling; direct data traffic may bypass ingress and gateway.
488
+ - Bound negotiation state, expiration, replay and privacy; native WebRTC/media is outside this milestone.
489
+
490
+ Verification: Two real browsers, discovery authorization, negotiation timeout/retry and direct data-channel exchange.
491
+
492
+ #### [GW-11: Implement authenticated first-party STUN/TURN relaying](https://github.com/wispsy/serve-gateway/issues/11)
493
+
494
+ Milestone: **v0.8**. Prerequisites: [GW-10](https://github.com/wispsy/serve-gateway/issues/10), [RUN-13](https://github.com/wispsy/serve-runner/issues/13).
495
+
496
+ - Implement optional first-party STUN framing/integrity and a bounded Binding service, followed by authenticated TURN UDP allocations, permissions, channels and expiry.
497
+ - Add TCP/TLS client access to UDP relays; keep TCP relay endpoints, native DTLS/WebRTC and media separate. Use reviewed standard-library/platform cryptographic primitives, retaining empty base Python runtime dependencies.
498
+ - Define temporary credentials, account/port/packet/rate/bandwidth budgets, peer-address policy, listener ownership and health/recovery boundaries.
499
+ - Qualify real browsers and independent protocol clients against an explicit constrained-network/security/resource matrix before public deployment. Public infrastructure provisioning and package publication are separate operations.
500
+
501
+ Verification: Published STUN vectors, bounded parser/socket/security profiles, independent authenticated relay clients, real-browser direct/relay and UDP-blocked TCP/TLS fallback, credential expiry/replay, relay quotas and outage recovery. Record exact IPv4/IPv6/NAT/platform support; finite fixtures do not establish universal traversal.
502
+
503
+ First-party relay delivery tasks, in prerequisite order:
504
+
505
+ - [GW-11A](https://github.com/wispsy/serve-gateway/issues/32)
506
+ - [GW-11B](https://github.com/wispsy/serve-gateway/issues/33)
507
+ - [GW-11C](https://github.com/wispsy/serve-gateway/issues/34)
508
+ - [GW-11D](https://github.com/wispsy/serve-gateway/issues/35)
509
+ - [GW-11E](https://github.com/wispsy/serve-gateway/issues/36)
510
+ - [GW-11E1 private browser configuration/health](https://github.com/wispsy/serve-gateway/issues/41)
511
+ - [RUN-15 relay supervision/recovery](https://github.com/wispsy/serve-runner/issues/32)
512
+
513
+ The [relay qualification guide](https://github.com/wispsy/serve-gateway/blob/main/docs/relay-qualification.md) records exact browser, IPv4/IPv6, network, resource and recovery boundaries. Linked issues and retained CI receipts own current acceptance; configured URLs alone are not interoperability evidence.
514
+
515
+ #### [GW-12: Evaluate and qualify optional native WebRTC endpoints](https://github.com/wispsy/serve-gateway/issues/12)
516
+
517
+ Milestone: **v0.9**. Prerequisites: [GW-11](https://github.com/wispsy/serve-gateway/issues/11).
518
+
519
+ - Produce an explicit feasibility/dependency decision for native data channels, comparing existing DTLS bindings with a narrow optional native OpenSSL wrapper. A wrapper may be compiled C/C++/Rust; cryptography remains platform-owned. Qualify the selected bridge and document any remaining endpoint implementation or deferral.
520
+ - Keep native endpoints optional and isolated from base installation; reuse reviewed cryptographic/protocol implementations.
521
+ - Audio/video remains a separate needs-driven scope decision.
522
+
523
+ Verification: Approved endpoint interoperability and resource/security matrix, or documented deferral; base runtime remains independent.
524
+
525
+ The [native feasibility decision](https://github.com/wispsy/serve-gateway/blob/main/docs/native-endpoints.md) evaluates an existing DTLS binding before assuming a custom compiled wrapper. Its isolated probe does not add a project runtime dependency or implement ICE/SCTP/DCEP. Native endpoint implementation remains deferred pending an approved optional dependency set and finite data-only contract; media remains separate.
526
+
527
+ #### [GW-13: Qualify stable messaging guarantees and interoperability](https://github.com/wispsy/serve-gateway/issues/13)
528
+
529
+ Milestone: **v1.0**. Prerequisites: [GW-09](https://github.com/wispsy/serve-gateway/issues/9).
530
+
531
+ - Freeze core gateway/transport/session APIs with compatibility and deprecation policies.
532
+ - Publish ordering, delivery, security, overflow, recovery and operational guarantees backed by evidence.
533
+ - Optional WebRTC/relay work does not block core stability; release independently after authorization.
534
+
535
+ Verification: Multi-server, multi-process, security, load, soak, artifact and recovery reports plus stable release review.
536
+
537
+ ## Operational independence checklist
538
+
539
+ - [ ] ASGI application serving and conformance evidence
540
+ - [ ] Worker supervision, IPC and cross-worker event distribution
541
+ - [ ] Local persistent state, version tracking and cache coordination
542
+ - [ ] Durable jobs, leases, scheduling, retries and cancellation
543
+ - [ ] Application-owned authentication and authorization
544
+ - [ ] Configuration, secrets, health, structured logging and metrics
545
+ - [ ] Reproducible installation and reviewed deployment profiles
546
+ - [ ] Backup, restoration, upgrade and rollback rehearsal
547
+ - [ ] Security, load, soak and failure qualification with measured limits
548
+
549
+ These are future acceptance gates, not an audit of current ecosystem implementations.
550
+
551
+ ## Standards and references
552
+
553
+ - [ASGI 3](https://asgi.readthedocs.io/en/latest/specs/main.html), [HTTP/WebSocket messages](https://asgi.readthedocs.io/en/latest/specs/www.html), [lifespan 2.0](https://asgi.readthedocs.io/en/latest/specs/lifespan.html)
554
+ - [HTTP semantics RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html), [HTTP/1.1 RFC 9112](https://www.rfc-editor.org/rfc/rfc9112.html), [WebSocket RFC 6455](https://www.rfc-editor.org/rfc/rfc6455.html)
555
+ - [Autobahn Testsuite](https://autobahn-testsuite.readthedocs.io/en/latest/), [Uvicorn server behavior](https://www.uvicorn.org/server-behavior/)
556
+ - [SQLite WAL constraints](https://sqlite.org/wal.html), [systemd socket activation](https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html)
557
+ - [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/using-a-publisher/)