Skip to content

Route third-party transparent streams through the downstream commit seam #222

Closed

Description

@NOirBRight

Parent

Part of #147. Delivers the second bounded slice of #18.

What to build

Move third-party Transparent Passthrough streams onto the downstream stream-commit seam proven by the Official slice. Native Responses and every already-supported same-format transparent route must retain their original protocol bytes while sharing the same disconnect, cancellation, and terminal-ledger behavior.

Acceptance criteria

  • Third-party Native Responses Transparent Passthrough uses the shared downstream stream-commit seam.
  • Other already-supported same-format transparent streams use the same lifecycle seam without changing their public protocol or introducing a conversion.
  • Byte preservation, SSE ordering, tool events, usage, model identity, and Route Affinity are unchanged for successful streams.
  • Downstream disconnect and cancellation stop owned upstream work within bounded time and cannot emit a second terminal result.
  • Regression evidence compares Official and third-party transparent behavior at the same lifecycle boundaries.

Blocked by

Activity

  1. added
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    wayfinder:taskWayfinder implementation task
    tier:heavyOrchestrator provider tier: heavy
    P1Priority 1: current iteration goal
    on Jul 25, 2026
  2. NOirBRight commented on Jul 25, 2026

    @NOirBRight
    OwnerAuthor
    {
      "contract": {
        "design": [
          "Separate the transport/lifecycle ownership proven by the Official Responses seam from protocol-specific event observation: the shared seam owns downstream write, close, cancellation, and the terminal ledger, while existing Responses and Chat observers identify their own terminal and usage semantics without a conversion.",
          "Route third-party Native Responses SSE and every already-supported same-format transparent streaming route through that shared ownership seam without changing upstream parsing or request routing, while preserving each route's raw bytes, event order, model identity, tool events, usage, and Route Affinity.",
          "Give transparent streams the same bounded downstream-close, cancellation handoff, committed-terminal precedence, and no-later-write or fallback invariants established by Issue #221.",
          "Develop comparative tests at the existing transparent relay boundaries. Keep converted routes, cross-protocol event parsing, provider configuration, release-runner behavior, and remaining route cleanup for later tickets outside this slice."
        ],
        "acceptance": [
          "Third-party Native Responses Transparent Passthrough uses the shared downstream stream-commit seam.",
          "Every already-supported same-format transparent SSE route uses the same lifecycle seam while retaining its existing protocol-specific terminal and usage observer; Chat `[DONE]` is never parsed as a Responses event and no conversion or public-wire change is introduced.",
          "Successful transparent streams preserve exact bytes, SSE ordering, model identity, tool events, usage, and Route Affinity.",
          "Downstream disconnect and cancellation close owned upstream work within bounded time and cannot write after terminal commitment, retry, fallback, or emit a second terminal.",
          "Regression evidence compares Official and third-party transparent success, upstream error, disconnect, cancellation, and post-terminal behavior at the same lifecycle boundaries."
        ],
        "change_claims": {
          "paths": [
            "src-python/codex_proxy.py",
            "tests/test_routing.py",
            "tests/test_chat_completions_gateway.py",
            "tests/test_proxy_event_logging.py",
            "tests/test_proxy_shutdown.py"
          ],
          "resources": [
            "gateway-downstream-stream-commit",
            "gateway-third-party-transparent-sse"
          ]
        },
        "done_when": [
          "Focused comparative regressions are observed failing before implementation and passing afterward.",
          "python -m pytest -q tests/test_routing.py tests/test_chat_completions_gateway.py tests/test_proxy_event_logging.py tests/test_proxy_shutdown.py",
          "python -m pytest -q",
          "git diff --check",
          "python scripts/report_quality_gates.py (report-only)",
          "An exact-local-SHA combined code review reports no blocker before the branch is pushed once."
        ],
        "dependencies": {
          "dispatch_after": [
            221
          ],
          "merge_after": [
            221
          ]
        },
        "priority": "P1",
        "difficulty": "heavy",
        "risk": "strict",
        "unresolved_decisions": [],
        "sha256": "7548c929c6c7a250925e2ea317c2fda91a713354f2ab72ad27e942e9605fa396"
      },
      "dispatch": {
        "attempt": 1,
        "base_sha": "421b65d9dc863e335b23f80ddb8afe4d3c73506a",
        "branch": "work/issue-222",
        "claimed_at": "2026-07-25T12:45:15.1581877Z",
        "contract_sha256": "7548c929c6c7a250925e2ea317c2fda91a713354f2ab72ad27e942e9605fa396",
        "creator_agent_id": "d81c5928-aff7-4d9d-b6a0-2b9f70ffad21",
        "generation": 1,
        "id": "dispatch-issue-222-a1",
        "status": "running",
        "worker_agent_id": "7ecc9038-1645-43af-b619-1137fe32f4e0",
        "workspace_id": "wks_323665a6057e60fc"
      }
    }
  3. added
    orch:activeOrchestrator V6: claimed Worker is active or rework is in progress
    on Jul 25, 2026
  4. NOirBRight commented on Jul 25, 2026

    @NOirBRight
    OwnerAuthor

    Merged via PR #230 into dev at 34830d8. The merged blobs for src-python/codex_proxy.py and tests/test_routing.py match frozen candidate 717c272 exactly; exact-SHA Actions run 30163040716 passed 7/7.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1: current iteration goalbugSomething isn't workingorch:activeOrchestrator V6: claimed Worker is active or rework is in progressready-for-agentFully specified, ready for an AFK agenttier:heavyOrchestrator provider tier: heavywayfinder:taskWayfinder implementation task

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions