Skip to content

docs(manual): state the GET write lane is probabilistic above the URL budget (#180) - #450

Closed
wrvnnull wants to merge 1 commit into
flop-labs:mainfrom
wrvnnull:fix/manual-url-budget-probabilistic-180
Closed

wrvnnull wants to merge 1 commit into
flop-labs:mainfrom
wrvnnull:fix/manual-url-budget-probabilistic-180

Conversation

@wrvnnull

@wrvnnull wrvnnull commented Aug 28, 2026 •

Copy link
Copy Markdown

Fixes #180

State in the manual that the GET write lane is probabilistic above the URL budget.

What

The manual now explicitly says that GET writes are best-effort once the URL budget is exceeded.

Why

Issue #180. Callers were assuming GET writes are reliable under load; the reality is that they are dropped probabilistically once the budget is exceeded.

Checks

  • uv run coverage run -m pytest tests -q && uv run coverage report
  • uv run ruff check . && uv run ruff format --check . and uv run ty check
  • Docs that would now be wrong are updated: README.md
  • New surface on a world-writable service: nothing new

@luch91

luch91 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The current commit is not limited to #180: it also adds retry guidance for #141 and OpenAPI value-budget wording for #362, overlapping the focused PRs #449 and #448. Please split or coordinate these changes so each contract has one authoritative edit. Separately, the ~16 KiB statement is an observed edge/proxy limit rather than a server-enforced configuration value; keep it explicitly deployment-dependent and supported by reproducible evidence, not as a universal protocol ceiling. The only visible upstream check is skipped [code]smith.

@github-actions

Copy link
Copy Markdown

Open pull requests citing the same issues:

If one already covers this change, review or build on it instead of racing it (CONTRIBUTING.md "Overlapping work").

@luch91 luch91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 12811f7. The manual now distinguishes the reliable below-budget GET lane from the probabilistic over-budget behavior and directs callers to POST; the added tests check the served manual and the related OpenAPI descriptions. No source-level blocker found in this scoped documentation change.

erhnysr added a commit to erhnysr/technocore-chat that referenced this pull request Sep 10, 2026
…p-labs#180)

The GET write lanes carry their payload in the URL, so the binding limit is
URL bytes, not the advertised `maxLength: 4096` character cap — 4096 CJK
characters is a ~36 KiB URL. That budget was enforced only by uvicorn's h11
`--h11-max-incomplete-event-size`, which rejects an over-long request line
only when it arrives across TCP segments, so the same over-budget URL 200s
or 400s at random (flop-labs#180's measured ~20-67% coin flip above 16 KiB), and the
400 it produces is a bare origin `Invalid HTTP request received.` that names
no length, no budget, and no escape.

Make the budget the enforced contract:
- app.py MAX_URL_BYTES (16 KiB): HeaderLimits now refuses an over-budget URL
  with a 414 in the app's own voice, naming the byte count and pointing at
  the POST body. Runs before routing, so the request never reaches a handler.
- Dockerfile --h11-max-incomplete-event-size 16384 -> 32768, above the budget,
  so a just-over-budget request reaches the app for that clean 414 instead of
  dying opaquely in the parser. Trade-off documented at the CMD: worst-case
  per-connection incomplete-request-line buffer doubles to 32 KiB, bounded by
  --limit-concurrency to 4 MiB against a 128 MiB container.

Tests: deterministic refusal at the boundary, the full-length CJK case (414
then POST carries it byte-exact), and a pin that the parser cap stays above
the budget. Docs scope (flop-labs#450) untouched.

Claude-Session: https://claude.ai/code/session_01MUnLjwckNcSN1mFUXsFLea
erhnysr added a commit to erhnysr/technocore-chat that referenced this pull request Sep 10, 2026
…p-labs#180)

The GET write lanes carry their payload in the URL, so the binding limit is
URL bytes, not the advertised `maxLength: 4096` character cap — 4096 CJK
characters is a ~36 KiB URL. That budget was enforced only by uvicorn's h11
`--h11-max-incomplete-event-size`, which rejects an over-long request line
only when it arrives across TCP segments, so the same over-budget URL 200s
or 400s at random (flop-labs#180's measured ~20-67% coin flip above 16 KiB), and the
400 it produces is a bare origin `Invalid HTTP request received.` that names
no length, no budget, and no escape.

Make the budget the enforced contract:
- app.py MAX_URL_BYTES (16 KiB): HeaderLimits now refuses an over-budget URL
  with a 414 in the app's own voice, naming the byte count and pointing at
  the POST body. Runs before routing, so the request never reaches a handler.
- Dockerfile --h11-max-incomplete-event-size 16384 -> 32768, above the budget,
  so a just-over-budget request reaches the app for that clean 414 instead of
  dying opaquely in the parser. Trade-off documented at the CMD: worst-case
  per-connection incomplete-request-line buffer doubles to 32 KiB, bounded by
  --limit-concurrency to 4 MiB against a 128 MiB container.

Tests: deterministic refusal at the boundary, the full-length CJK case (414
then POST carries it byte-exact), and a pin that the parser cap stays above
the budget. Docs scope (flop-labs#450) untouched.

Claude-Session: https://claude.ai/code/session_01MUnLjwckNcSN1mFUXsFLea
@sv sv added the material Substantive: correctness, security, data durability, capacity, or user-visible behavior label Oct 19, 2026
@sv

sv commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Closing as a look-alike of #829 — also for #180, but docs-only: it states the lane is probabilistic above the URL budget, which becomes wrong the moment #829's hard 414 ceiling lands.

@sv sv closed this Oct 19, 2026
@sv sv added the duplicate This issue or pull request already exists label Oct 19, 2026
erhnysr added a commit to erhnysr/technocore-chat that referenced this pull request Nov 1, 2026
…p-labs#180)

The GET write lanes carry their payload in the URL, so the binding limit is
URL bytes, not the advertised `maxLength: 4096` character cap — 4096 CJK
characters is a ~36 KiB URL. That budget was enforced only by uvicorn's h11
`--h11-max-incomplete-event-size`, which rejects an over-long request line
only when it arrives across TCP segments, so the same over-budget URL 200s
or 400s at random (flop-labs#180's measured ~20-67% coin flip above 16 KiB), and the
400 it produces is a bare origin `Invalid HTTP request received.` that names
no length, no budget, and no escape.

Make the budget the enforced contract:
- app.py MAX_URL_BYTES (16 KiB): HeaderLimits now refuses an over-budget URL
  with a 414 in the app's own voice, naming the byte count and pointing at
  the POST body. Runs before routing, so the request never reaches a handler.
- Dockerfile --h11-max-incomplete-event-size 16384 -> 32768, above the budget,
  so a just-over-budget request reaches the app for that clean 414 instead of
  dying opaquely in the parser. Trade-off documented at the CMD: worst-case
  per-connection incomplete-request-line buffer doubles to 32 KiB, bounded by
  --limit-concurrency to 4 MiB against a 128 MiB container.

Tests: deterministic refusal at the boundary, the full-length CJK case (414
then POST carries it byte-exact), and a pin that the parser cap stays above
the budget. Docs scope (flop-labs#450) untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists material Substantive: correctness, security, data durability, capacity, or user-visible behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The say lanes' URL budget is a 16 KiB coin flip, not a ceiling — and the 400 is the origin's, not the proxy's (re #111, #128, #82)

3 participants