Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ jobs:
git -C "$RUNNER_TEMP/ovos-docker" sparse-checkout set base/files
test -f "$RUNNER_TEMP/ovos-docker/base/files/ovos-hc.py"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Build the pre-spec-tools wire-twin listener venv
env:
BACKCOMPAT_PYTHON: "3.11"
# backs the Q1 cells of test/backcompat/test_fallback_twin_quadrants.py
# (ovos-bus-client==1.5.0, no NamespaceTranslator)
run: test/backcompat/build_venvs.sh "$RUNNER_TEMP/venvs" venv_wire_twin_old

- name: Record the installed stack
run: pip freeze > stack-freeze.txt

Expand All @@ -85,6 +95,8 @@ jobs:
# ovos-messagebus is installed above, so the fallback twin cells
# run here and never skip
FALLBACK_TWIN_CELLS: "1"
# the venv built above, so the Q1 old-listener cells run and never skip
BACKCOMPAT_WIRE_TWIN_PYTHON: ${{ runner.temp }}/venvs/venv_wire_twin_old/bin/python
# the same broker serves the MSG-1 §3.3 producer cells
MSG1_PRODUCER_CELLS: "1"
OVOS_DOCKER_HC: ${{ runner.temp }}/ovos-docker/base/files/ovos-hc.py
Expand Down
17 changes: 17 additions & 0 deletions test/backcompat/build_venvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,23 @@
# NamespaceTranslator) the #286 fix targets. This is a bare
# listener venv, not a skill or core cohort: no ovos-workshop,
# no ovos-core, nothing else pinned alongside it.
# Also backs the FALLBACK-1 Q1 cells in
# test_fallback_twin_quadrants.py, which put this same listener on
# the four ovos.skills.fallback.* legacy names through
# WIRE_TWIN_TOPICS instead of the default `speak`.
#
# venv_spec_tools_old NOT BUILT YET -- ovos-spec-tools==1.11.2a1
# Wanted by test_fallback_twin_quadrants.py's Q3, the FALLBACK-1
# no-bridge quadrant: a consumer whose spec-tools predates the
# 1.12.0a1 entries cannot bridge a legacy fallback emit, and a
# legacy emit gets no send-side wire twin, so nothing delivers.
# That is correct behaviour and the T-1331 ruling requires it to
# be recorded, never assumed. Until this venv exists the cell is
# a strict xfail naming the vintage; when it does, export
# BACKCOMPAT_SPEC_TOOLS_OLD_PYTHON and drop the marker. Unlike
# venv_wire_twin_old this is a CURRENT bus-client with an OLD
# spec-tools -- the map, not the client, is what must be behind.
#
# All FOUR core venvs -- core_old, core_new, AND the channel pair
# (core_stable/core_testing, below) -- also install
# ovos-common-query-pipeline-plugin -- test/backcompat/
Expand Down
24 changes: 23 additions & 1 deletion test/backcompat/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,8 +1260,15 @@ class WireTwinListener:
module docstring for why the distinction matters).
"""

def __init__(self, python: str, xdg: str):
def __init__(self, python: str, xdg: str, topics=None):
# ``topics`` puts this same genuinely-old client on other legacy
# names (the FALLBACK-1 quadrant cells use the four
# ``ovos.skills.fallback.*`` spellings). Default None keeps the
# ovos-bus-client#286 cell on ``speak`` alone, so that module is
# unchanged by this parameter's existence.
env = dict(os.environ, XDG_CONFIG_HOME=xdg, PYTHONUNBUFFERED="1")
if topics:
env["WIRE_TWIN_TOPICS"] = ",".join(topics)
self.lines = []
self.versions = {}
self.proc = subprocess.Popen(
Expand Down Expand Up @@ -1303,6 +1310,21 @@ def _wait_ready(self):
raise RuntimeError(
f"wire-twin listener never reported ready:\n{self.log}")

def received(self) -> list:
"""Every ``RECEIVED`` record this process has reported, parsed live
from its stdout log: ``{"token", "topic", "data", "session_id"}``.
A cell that only counts tokens cannot tell which legacy spelling
delivered, which is the whole question for a twin."""
out = []
for line in self.lines:
if line.startswith("RECEIVED "):
out.append(json.loads(line[len("RECEIVED "):]))
return out

def received_for(self, token: str) -> list:
"""The records carrying ``token``, in arrival order."""
return [r for r in self.received() if r.get("token") == token]

def received_tokens(self) -> list:
"""Tokens of every ``speak`` message this process has reported
receiving so far, parsed live from its stdout log -- not a count
Expand Down
Loading
Loading