Skip to content

Continue Gateway request pipeline extraction: upstream opener and error mapper #5

Closed

Description

@NOirBRight

Problem

_proxy_post_request and _relay_upstream_response still mix parsing, routing, transport open, retry, telemetry, and downstream error shaping.

Scope

  • Continue the Gateway request pipeline architecture phase with a small, behavior-preserving extraction.
  • Move upstream opening and downstream error response shaping behind small pure/testable functions or classes.

Acceptance Criteria

  • Existing route behavior and response payloads remain stable.
  • Official passthrough pre-response retry semantics remain unchanged.
  • Extraction is covered by targeted routing/chat gateway tests.

Required Verification

python -m pytest tests/test_routing.py tests/test_chat_completions_gateway.py tests/test_proxy_event_logging.py
python -m pytest

Source Evidence

  • docs/reviews/v0.2-code-optimizer-audit.md
  • docs/superpowers/plans/2026-07-09-gateway-request-pipeline.md
  • docs/reviews/v0.2-issue-plan.md

Activity

  1. self-assigned this
    on Jul 12, 2026
  2. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Dispatch

    • Profile: core
    • Model: gpt-5.6-terra / max
    • Base: origin/dev@83485089ce1108d44ddba1d0f008afc2d93ce935
    • Branch: codex/issue-5-gateway-open-error-seam
    • Ownership: Python Gateway opener/error-mapping seam; sole Wave 1 writer for the codex_proxy.py handler hotset
    • Candidate evidence: gap-audit local 32e17a9; do not direct-cherry-pick stale code
    • Verification: Issue-targeted routing/chat/telemetry tests, full Python suite, report-only quality gates
    • Integration parent: none; PR targets dev and fully closes only if every acceptance criterion is met
  3. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Completed by PR #96, merged into dev as f833022.

    Verification:

    • Required targeted Gateway tests passed.
    • Full Python suite passed.
    • Frontend build/UI contract, Rust tests, and Rust clippy passed in GitHub Actions.
    • Orchestrator Standards review found no hard violations; Spec review found no missing requirements, scope creep, or incorrect implementation.

    The non-blocking wrapper consolidation/dead-code observation remains outside #5 scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions