Repository navigation
feat(D147): oversized files reach a URL route; pass 413 from the spend lease - #550
Conversation
…d lease - Owner decision 2026-11-07: the 100/200 MB reading limits guard this process, which would read the file, so they apply only on the bytes path. A file over its limit whose route fetches it by URL from a presigning store goes to that route instead of being refused (PDF) or carded. - ControlPlaneSpendLease passes a control-plane 413 through as SpendLeaseRefused, so an over-size hold answers 413, not 503 spend_lease_unavailable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9cMsQBqiW2qU2ow4zeNCm
…stated Codex round 1 minor: D147, the format conversion design and the file-types guide now say the reading limits guard the engine process and do not apply when the route fetches the file by URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9cMsQBqiW2qU2ow4zeNCm
Codex review (gpt-6.1-sol, max effort)VERDICT: APPROVE
No blocker or major findings. Routing and guard ordering, oversized ingest routability, PDF provider limits, parking, unread card fallback, and representation replay satisfy the owner decision. No processing-version or reuse-key bumps occur. CP 413 passes through the adapter and middleware unchanged, before ingest runs. Validation: 166 passed, 3 skipped; 25 direct conversion cases and an adapter-to-HTTP 413 check passed. Database integration tests remain pending in CI. No containers started; worktree unchanged. Disposition (Claude)The minor is accepted and fixed in f4cd315. D147, the format conversion design §(over the reading limit) and the file-types guide now say the reading limits guard the engine process, apply on the bytes path only, and that a file whose route fetches it by URL goes to that route. |
Two changes: an owner decision (2026-11-07) and a team-lead request.
1. No size refusal or card when the file reaches the converter by URL. The reading limits (100 MB for office and PDF, 200 MB for spreadsheets; D138/D139) guard this process, which would otherwise read the file. When the routed converter is a
UrlConverter(#545) and the raw store presigns, the engine reads nothing, so:PDF exceeds the pre-OCR reading limit); it goes to the URL route;On the in-process bytes path (the self-host default), the limits stay exactly as before as the engine's resource guard. A converter's own declared
provider_limit_bytesstill applies. An oversized file with no route is still carded (non-PDF) or refused (PDF), as before. Bounded reads are already in place: #548 cards without reading, and the URL path never reads.2. Spend lease 413.
ControlPlaneSpendLeasenow passes a control-plane 413 through asSpendLeaseRefused, next to 401/403/423. The middleware then answers 413 instead of503 spend_lease_unavailablewhen the control plane refuses an over-size hold.Tests
read_bytescalls.test_adapter_passes_an_oversize_refusal_through.Checks: ruff, pyright (0), unit lane (3153 passed). DB tests run in CI.
🤖 Generated with Claude Code
https://claude.ai/code/session_01F9cMsQBqiW2qU2ow4zeNCm