Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

646 B
Raw Blame
"""The turn record names the connection that served it (2026-09-06): the session's last_connection
carried it once per session, and the turns feed exposed a key the record did not have."""
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import app as gw  # noqa: E402


def test_the_record_carries_the_connection_stamped_at_dispatch():
    tr = gw._RespTranslator("resp_1", "gemini-3.5-flash", None, True, 0.0)
    assert tr.connection == ""
    tr.connection = "integration:Google AI Studio"
    rec = tr._response_obj("completed")
    assert rec["connection"] == "integration:Google AI Studio"