fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/11) #526

Closed
didericis-codex wants to merge 1 commits from fix/gateway-request-boundaries into fix/authoritative-cleanup-revalidation
Collaborator

Stacked on #525. Sixth quality-cleanup chunk tracked by #444 and PRD 0082.

Makes the shared gateway resilient to slow and parallel requests from untrusted bottles:

  • Shared stdlib boundary: supervisor and Git HTTP now use one BoundedThreadingHTTPServer and one exact declared-body reader instead of maintaining separate resource policies.
  • Total body deadlines: each body read is capped by a monotonic total deadline, rejects incomplete bodies, and preserves the service-specific size cap.
  • Bounded concurrency: supervisor allows 32 in-flight requests and Git HTTP 16; saturation returns 503 without spawning another thread.
  • Strict route introspection: list-egress-routes resolves the caller directly and returns an MCP error for attribution/control-plane failure rather than a successful fabricated empty route table.
  • Empty-state distinction: an authoritatively resolved routes: [] remains successful.

This follows the same consolidation rule as the backend cleanup chunk: common control flow and failure policy live once, while services provide only their limits and response adaptation.

Final stack extension

  • #528 — authoritative resource identities and bounded artifact transfers.

Validation: The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; git diff --check passes.

Refs #444.

Final stack extension

  • #530 — cleanup execution and mandatory authenticated-secret integrity.

Final stack extension

  • #531 — bounded heavy Git and cleanup operations.

Final stack extension

  • #532 — fail-closed shared database and gateway credential permissions.
Stacked on #525. Sixth quality-cleanup chunk tracked by #444 and PRD 0082. Makes the shared gateway resilient to slow and parallel requests from untrusted bottles: - **Shared stdlib boundary:** supervisor and Git HTTP now use one `BoundedThreadingHTTPServer` and one exact declared-body reader instead of maintaining separate resource policies. - **Total body deadlines:** each body read is capped by a monotonic total deadline, rejects incomplete bodies, and preserves the service-specific size cap. - **Bounded concurrency:** supervisor allows 32 in-flight requests and Git HTTP 16; saturation returns 503 without spawning another thread. - **Strict route introspection:** `list-egress-routes` resolves the caller directly and returns an MCP error for attribution/control-plane failure rather than a successful fabricated empty route table. - **Empty-state distinction:** an authoritatively resolved `routes: []` remains successful. This follows the same consolidation rule as the backend cleanup chunk: common control flow and failure policy live once, while services provide only their limits and response adaptation. **Final stack extension** - #528 — authoritative resource identities and bounded artifact transfers. **Validation:** The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; `git diff --check` passes. Refs #444. **Final stack extension** - #530 — cleanup execution and mandatory authenticated-secret integrity. **Final stack extension** - #531 — bounded heavy Git and cleanup operations. **Final stack extension** - #532 — fail-closed shared database and gateway credential permissions.
didericis force-pushed fix/gateway-request-boundaries from 9848eb27a0 to 1f90344f29 2026-07-26 23:39:41 -04:00 Compare
didericis-codex changed title from fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/7) to fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/8) 2026-07-26 23:41:53 -04:00
didericis force-pushed fix/gateway-request-boundaries from 1f90344f29 to d69035e7d2 2026-07-26 23:56:08 -04:00 Compare
didericis-codex changed title from fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/8) to fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/9) 2026-07-27 00:02:56 -04:00
didericis force-pushed fix/gateway-request-boundaries from d69035e7d2 to 511e8b6721 2026-07-27 00:17:32 -04:00 Compare
didericis-codex changed title from fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/9) to fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/10) 2026-07-27 00:26:13 -04:00
didericis added 1 commit 2026-07-27 00:46:46 -04:00
fix(gateway): bound stdlib HTTP request work
test / image-input-builds (pull_request) Successful in 1m2s
test / unit (pull_request) Has started running
test / coverage (pull_request) Blocked by required conditions
test / integration-docker (pull_request) Blocked by required conditions
tracker-policy-pr / check-pr (pull_request) Failing after 12m29s
f33566941b
didericis force-pushed fix/gateway-request-boundaries from 511e8b6721 to f33566941b 2026-07-27 00:46:47 -04:00 Compare
didericis-codex changed title from fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/10) to fix: quality cleanup - bounded gateway HTTP boundaries (chunk 6/11) 2026-07-27 00:49:30 -04:00
didericis-codex closed this pull request 2026-07-27 01:35:41 -04:00
Some checks are pending
test / image-input-builds (pull_request) Successful in 1m2s
test / unit (pull_request) Has started running
test / coverage (pull_request) Blocked by required conditions
test / integration-docker (pull_request) Blocked by required conditions
tracker-policy-pr / check-pr (pull_request) Failing after 12m29s

Pull request closed

Sign in to join this conversation.