Skip to content

docs(planning): file the two defects deferred from the access-log fix - #163

Merged
lesnik512 merged 2 commits into
mainfrom
docs/deferred-litestar-logging-defects
Aug 10, 2026
Merged

docs(planning): file the two defects deferred from the access-log fix#163
lesnik512 merged 2 commits into
mainfrom
docs/deferred-litestar-logging-defects

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Two proposals, no code. Both defects surfaced while fixing the Litestar access-log body leak (#162) and were deliberately kept out of it.

  • planning/changes/2026-08-10.02-log-stream-bind-at-bootstrap.md (lightweight) — _MemoryLoggerFactoryConfig.log_stream binds sys.stdout at import time, so structlog output ignores a stdout the process rebinds before bootstrap, while _configure_foreign_loggers' root handler follows it. Reproduced with a plain FreeBootstrapper under contextlib.redirect_stdout, so it affects every bootstrapper.
  • planning/changes/2026-08-10.03-litestar-request-max-body-size.md (full) — Litestar.from_config() skips the 10 MB request_max_body_size default that Litestar(...) applies, so any handler reading a request body returns 500 unless the caller sets the field on their own AppConfig. Design: fill it in _apply_config only when it is Empty, pinned by a guard test against Litestar's own signature default, plus an upstream issue.

just check-planning and just lint-ci pass.

🤖 Generated with Claude Code

Both were found while fixing the Litestar access-log body leak (#162) and
kept out of it to leave a security fix unencumbered.

- log_stream binds sys.stdout at import, so structlog output ignores a
  stdout the process rebinds before bootstrap, while the root-logger
  handler follows it.
- Litestar.from_config() skips the request_max_body_size default that
  Litestar.__init__ applies, so every body-reading handler returns 500
  unless the caller sets the field themselves.
The from_config/__init__ default divergence is already tracked as
litestar-org/litestar#4296; link it and our reproduction instead of asking
a future implementer to file a duplicate.
@lesnik512
lesnik512 merged commit e6b6be2 into main Aug 10, 2026
11 checks passed
@lesnik512
lesnik512 deleted the docs/deferred-litestar-logging-defects branch August 10, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant