Skip to content

Commit 91bdadf

Browse files
committed
Sync SSOT registry metadata
1 parent d83b73e commit 91bdadf

22 files changed

Lines changed: 1056 additions & 108 deletions
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
schema_version: "0.1.0"
2+
kind: "adr"
3+
id: "adr:1036"
4+
number: 1036
5+
slug: "first-class-http-status-code-set"
6+
title: "Adopt a minimum first-class HTTP status code set"
7+
status: "accepted"
8+
origin: "repo-local"
9+
decision_date: null
10+
tags: []
11+
summary: "Decision: Tigrcorn shall track a minimum immediate set of first-class HTTP status codes from 100 through 599, including 402 Payment Required."
12+
supersedes: []
13+
superseded_by: []
14+
status_notes: []
15+
references:
16+
- "HTTP Semantics"
17+
- "SPEC-2043"
18+
body: |-
19+
# ADR 1036 - First-class HTTP status code set
20+
21+
Decision: Tigrcorn shall maintain a minimum immediate set of first-class HTTP
22+
status codes across informational, success, redirection, client-error, and
23+
server-error classes.
24+
25+
First-class status support means the status code is explicitly represented in
26+
the SSOT, has a named reason phrase in runtime serialization or a planned
27+
runtime target, and has a traceable test row. Tigrcorn-originated responses
28+
shall have concrete runtime behavior; application-originated responses shall
29+
serialize correctly without depending on application-specific reason text.
30+
31+
The minimum immediate set is:
32+
33+
- 100 Continue
34+
- 101 Switching Protocols
35+
- 103 Early Hints
36+
- 200 OK
37+
- 201 Created
38+
- 202 Accepted
39+
- 204 No Content
40+
- 206 Partial Content
41+
- 301 Moved Permanently
42+
- 302 Found
43+
- 304 Not Modified
44+
- 307 Temporary Redirect
45+
- 308 Permanent Redirect
46+
- 400 Bad Request
47+
- 401 Unauthorized
48+
- 402 Payment Required
49+
- 403 Forbidden
50+
- 404 Not Found
51+
- 405 Method Not Allowed
52+
- 406 Not Acceptable
53+
- 408 Request Timeout
54+
- 413 Content Too Large
55+
- 416 Range Not Satisfiable
56+
- 421 Misdirected Request
57+
- 426 Upgrade Required
58+
- 431 Request Header Fields Too Large
59+
- 500 Internal Server Error
60+
- 502 Bad Gateway
61+
- 503 Service Unavailable
62+
- 504 Gateway Timeout
63+
64+
Consequences:
65+
66+
- Unknown valid HTTP status codes may still pass through numerically, but they
67+
are not first-class until represented by SSOT rows and tests.
68+
- Runtime-originated error paths should use the most specific listed code
69+
rather than collapsing limit, timeout, and negotiation failures into 400.
70+
- Serializer reason phrases must not fall back to an incorrect phrase for any
71+
first-class code.

.ssot/registry.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
schema_version: "0.1.0"
2+
kind: "spec"
3+
id: "spc:2043"
4+
number: 2043
5+
slug: "first-class-http-status-codes"
6+
title: "First-class HTTP status codes"
7+
status: "draft"
8+
origin: "repo-local"
9+
decision_date: null
10+
tags: []
11+
summary: "Tigrcorn shall track a minimum immediate first-class HTTP status code set from 100 through 599, including 402 Payment Required."
12+
supersedes: []
13+
superseded_by: []
14+
status_notes: []
15+
references:
16+
- "ADR-1036"
17+
- "HTTP Semantics"
18+
body: |-
19+
# First-class HTTP status codes
20+
21+
Tigrcorn shall track the minimum immediate first-class HTTP status code set as
22+
explicit SSOT features with linked test rows.
23+
24+
Requirements:
25+
26+
- The first-class set shall include status codes 100, 101, 103, 200, 201, 202,
27+
204, 206, 301, 302, 304, 307, 308, 400, 401, 402, 403, 404, 405, 406, 408,
28+
413, 416, 421, 426, 431, 500, 502, 503, and 504.
29+
- Each first-class status code shall have a stable feature row.
30+
- Each first-class status code shall have a stable test row, even when the row
31+
initially points at this SPEC as a placeholder.
32+
- Runtime-originated status codes shall have concrete tests for the path that
33+
emits the status.
34+
- Application-originated status codes shall serialize with the correct numeric
35+
code and reason phrase.
36+
- The serializer shall not emit an incorrect fallback reason phrase for any
37+
first-class status code.
38+
- 402 Payment Required is part of the immediate governed set even though the
39+
runtime does not currently originate it.
40+
spec_kind: "local-policy"
41+
adr_ids:
42+
- "adr:1036"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM python:3.13-slim AS runtime
2+
3+
WORKDIR /app
4+
ENV PYTHONUNBUFFERED=1
5+
6+
COPY pyproject.toml README.md LICENSE ./
7+
COPY src ./src
8+
COPY pkgs ./pkgs
9+
COPY examples/__init__.py ./examples/__init__.py
10+
COPY examples/advanced_delivery_uix ./examples/advanced_delivery_uix
11+
12+
RUN python -m pip install --no-cache-dir --no-deps \
13+
-e pkgs/tigrcorn-core \
14+
-e pkgs/tigrcorn-config \
15+
-e pkgs/tigrcorn-asgi \
16+
-e pkgs/tigrcorn-contract \
17+
-e pkgs/tigrcorn-transports \
18+
-e pkgs/tigrcorn-protocols \
19+
-e pkgs/tigrcorn-http \
20+
-e pkgs/tigrcorn-security \
21+
-e pkgs/tigrcorn-runtime \
22+
-e pkgs/tigrcorn-static \
23+
-e pkgs/tigrcorn-observability \
24+
-e pkgs/tigrcorn-compat \
25+
-e pkgs/tigrcorn-certification \
26+
-e .
27+
28+
EXPOSE 8000/tcp
29+
30+
CMD ["tigrcorn", "examples.advanced_delivery_uix.server:app", "--host", "0.0.0.0", "--port", "8000", "--protocol", "http1", "--http", "1.1", "--connect-policy", "relay", "--trailer-policy", "pass", "--content-coding-policy", "allowlist", "--content-codings", "gzip,deflate,br", "--alt-svc", "h3=\":8443\"; ma=60", "--timeout-keep-alive", "30", "--read-timeout", "10", "--write-timeout", "10", "--max-body-size", "1048576", "--max-header-size", "16384", "--server-header", "Tigrcorn-Advanced-Delivery-Demo", "--access-log"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.13-slim AS client
2+
3+
WORKDIR /client
4+
ENV PYTHONUNBUFFERED=1
5+
6+
COPY examples/advanced_delivery_uix ./examples/advanced_delivery_uix
7+
8+
EXPOSE 8080/tcp 9000/tcp
9+
10+
CMD ["python", "examples/advanced_delivery_uix/client_server.py"]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
!examples/
3+
!examples/advanced_delivery_uix/
4+
!examples/advanced_delivery_uix/client_server.py
5+
!examples/advanced_delivery_uix/client/
6+
!examples/advanced_delivery_uix/client/**
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*
2+
!pyproject.toml
3+
!README.md
4+
!LICENSE
5+
!src/
6+
!src/**
7+
!pkgs/
8+
!pkgs/**
9+
!examples/
10+
!examples/__init__.py
11+
!examples/advanced_delivery_uix/
12+
!examples/advanced_delivery_uix/**
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Tigrcorn Advanced Delivery UIX Demo
2+
3+
This demo runs a normal ASGI3 app under Tigrcorn and a separate lightweight UIX
4+
client for probing delivery behavior.
5+
6+
```bash
7+
docker compose -f examples/advanced_delivery_uix/docker-compose.yml up --build -d
8+
```
9+
10+
Open `http://localhost:8022` for the UIX client. The Tigrcorn ASGI3 app is also
11+
published directly at `http://localhost:8021`.
12+
13+
The UIX client exposes raw socket probes for:
14+
15+
- CONNECT relay through Tigrcorn to an echo endpoint in the UIX container.
16+
- Response trailer fields.
17+
- Content coding negotiation with `Accept-Encoding: gzip`.
18+
- Conditional requests with both normal and `304 Not Modified` paths.
19+
- Byte range requests with `206 Partial Content` and `416 Range Not Satisfiable`.
20+
- `103 Early Hints` before the final response.
21+
- Bounded `Alt-Svc` from the Tigrcorn `--alt-svc 'h3=":8443"; ma=60'` setting.
22+
23+
```bash
24+
docker compose -f examples/advanced_delivery_uix/docker-compose.yml down
25+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Dockerized ASGI3 delivery feature laboratory."""
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Tigrcorn Advanced Delivery Lab</title>
7+
<link rel="stylesheet" href="./styles.css">
8+
</head>
9+
<body>
10+
<main class="shell">
11+
<header class="topbar">
12+
<div>
13+
<p class="eyebrow">ASGI3 over Tigrcorn</p>
14+
<h1>Advanced Delivery Lab</h1>
15+
</div>
16+
<div class="origin">
17+
<span>origin</span>
18+
<code id="origin">http://localhost:8021</code>
19+
</div>
20+
</header>
21+
22+
<section class="controls" aria-label="Feature probes">
23+
<button data-feature="connect">CONNECT Relay</button>
24+
<button data-feature="trailers">Trailer Fields</button>
25+
<button data-feature="coding">Content Coding</button>
26+
<button data-feature="conditional">Conditional Miss</button>
27+
<button data-feature="conditional-hit">Conditional Hit</button>
28+
<button data-feature="range">Range 206</button>
29+
<button data-feature="range-unsatisfied">Range 416</button>
30+
<button data-feature="early">Early Hints</button>
31+
<button data-feature="alt-svc">Bounded Alt-Svc</button>
32+
</section>
33+
34+
<section class="workbench">
35+
<aside class="panel">
36+
<label for="base-url">Fetch origin</label>
37+
<input id="base-url" value="http://localhost:8021">
38+
<button id="inspect" type="button">Inspect ASGI Scope</button>
39+
<button id="fetch-resource" type="button">Fetch Resource</button>
40+
<dl id="headers"></dl>
41+
</aside>
42+
<section class="panel terminal">
43+
<div class="terminal-head">
44+
<h2 id="title">Response</h2>
45+
<span id="status">idle</span>
46+
</div>
47+
<pre id="output"></pre>
48+
</section>
49+
</section>
50+
</main>
51+
<script src="./main.js"></script>
52+
</body>
53+
</html>

0 commit comments

Comments
 (0)