Skip to content

test(backcompat): FALLBACK-1 quadrant cells for the four fallback twins - #85

Merged
JarbasAl merged 5 commits into
devfrom
fix/t1342-fallback-twin-quadrants
Dec 5, 2026
Merged

JarbasAl merged 5 commits into
devfrom
fix/t1342-fallback-twin-quadrants

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

What this adds

The four MIGRATION_MAP fallback twins — ovos.skills.fallback.register,
.deregister, .ping, .pong and their ovos.fallback.* counterparts — had
one cell, in one vintage. test_fallback_namespace_twin.py drives both
directions between two current clients and reads the wire with a raw
websocket. That answers "does the bridge deliver". It cannot answer two of the
four quadrants the backcompat lane's Round 2 brief names:

  • A raw websocket reader is not a client. It sees literal frames and has no
    subscription semantics, so it cannot show that a genuinely old
    MessageBusClient dispatches the frame to a handler. Receive-side counterpart
    delivery is a property of the subscriber's client, so the cell that matters
    pins the subscriber to the oldest deployed bus-client and the emitter to the
    current one. Two copies of the same version prove nothing about the pairing.
  • No cell asserted the FALLBACK-1 registry clauses. A twin that delivers
    twice, or that drops the context session, breaks fallback.md §3.1/§3.2/§3.4
    without changing a single payload field, and a delivery-count cell cannot see
    it.

test/backcompat/test_fallback_twin_quadrants.py adds one cell per quadrant per
twin:

consumer result asserted
Q1 a real ovos-bus-client==1.5.0 listener on the LEGACY name a canonical emit arrives exactly once, payload intact, context.session.session_id kept
Q2 canonical-only current client a legacy emit arrives once, session kept
Q3 consumer whose ovos-spec-tools predates 1.12.0a1 not delivered — strict xfail naming the vintage
Q4 a consumer on BOTH spellings §3.1/§3.2/§3.4 registry state unchanged under double delivery

Q4 asserts the clauses as quoted in the T-1331 ruling: one entry per
(context session, skill_id) (§3.4), re-registration replaces rather than adds
(§3.1), deregistration keys on the context session and ignores a
session_id planted in data (§3.2 MUST), a repeated deregistration is a
no-op, and a both-spellings pong collector lists a skill once and orders by
priority rather than arrival.

Supporting changes

  • wire_twin_listener.py takes its topic list from WIRE_TWIN_TOPICS,
    defaulting to speak, so the ovos-bus-client#286 cell that owns this script
    is unchanged. It now reports the topic, data and session of each frame
    instead of the token alone: a cell that only counts tokens cannot tell which
    spelling delivered, which is the whole question for a twin.
  • driver.WireTwinListener gains topics= plus received() /
    received_for().
  • build_venvs.sh documents that venv_wire_twin_old now also backs Q1, and
    documents the venv Q3 wants (ovos-spec-tools==1.11.2a1) as not built
    yet
    , with the export name the cell reads.

Evidence

On a real ovos-messagebus, with a real 1.5.0 listener built from
build_venvs.sh's own pin (verified live: bus-client 1.5.0,
NamespaceTranslator absent from its loaded client/client.py, ovos_spec_tools
not importable):

FALLBACK_TWIN_CELLS=1 BACKCOMPAT_WIRE_TWIN_PYTHON=<venv_wire_twin_old>/bin/python \
  pytest -q test/backcompat/test_fallback_twin_quadrants.py
-> 17 passed, 1 xfailed

The xfail is Q3, strict, as the ruling requires.

Mutation control. A pass is not proof a cell bites, so the same run with the
send-side twin disabled:

OVOS_BUS_EMIT_LEGACY=false ... -k q1_canonical
-> 1 failed: "a canonical 'ovos.fallback.register' emit never reached the old
   client listening on 'ovos.skills.fallback.register'"

So Q1 measures the twin, not the bus.

No regression in the modules this touches:

pytest -q test/backcompat/test_wire_twin_old_listener.py \
          test/backcompat/test_fallback_namespace_twin.py test/meta/
-> 37 passed, 18 xfailed

In CI. The integration job builds venv_wire_twin_old with build_venvs.sh and sets BACKCOMPAT_WIRE_TWIN_PYTHON next to FALLBACK_TWIN_CELLS=1, so the nine Q1 cells run there and do not skip. The backcompat matrix cells do not build the twin, so Q1 still skips in them.

What this does NOT claim

  • Q2's emitter is a real MessageBusClient on the legacy name, not the
    shipped ovos-workshop FallbackSkill
    that owns that emit today
    (skills/fallback.py:175, :195, :203, :113). The Round 2 table allows
    "any client" for this quadrant, and what it tests is the consumer's
    receive-side bridge. A cell that boots a real FallbackSkill is a separate
    piece of work and belongs with the skill-container venvs.
  • Q3 is unrun. The venv does not exist, so the quadrant is a strict xfail
    naming the vintage rather than a skip — a skip would let it vanish from a
    green run, which is what the ruling forbids. The assertion body is written out
    so the cell starts working the day the venv lands.
  • Q4's registry is a local model, not the shipped plugin. The question here
    is whether the twin preserves what the clauses key on. Whether the shipped
    plugin implements the clauses is a different and also useful question, and it
    belongs to the skills-side suite.
  • The four twins were already out of test/meta/untested-migration-topics.txt,
    so no allowlist line changes here. This closes the coverage that removal
    promised.

🤖 Generated with Claude Code

The four MIGRATION_MAP fallback twins had one cell, in one vintage:
test_fallback_namespace_twin.py drives both directions between two current
clients and reads the wire with a raw websocket. That answers "does the
bridge deliver" and cannot answer two of the four quadrants the backcompat
lane's Round 2 brief names.

A raw websocket reader is not a client. Receive-side counterpart delivery is
a property of the subscriber's client, so the cell that matters pins the
subscriber to the oldest deployed bus-client and the emitter to the current
one. And no cell asserted the FALLBACK-1 registry clauses at all: a twin
that delivers twice, or that drops the context session, breaks
fallback.md §3.1/§3.2/§3.4 without changing a payload field.

test_fallback_twin_quadrants.py adds:

Q1  a current client emits the canonical name; a real ovos-bus-client==1.5.0
    listener subscribed to the legacy name receives it exactly once, with the
    payload intact and context.session.session_id kept. Guarded by a probe
    that reads the live process's own VERSIONS line for
    client_has_namespace_translator false and for the subscription it
    actually made, plus a positive control on the legacy spelling.
Q2  a legacy emit reaches a canonical-only consumer once, session kept.
Q3  a consumer whose spec-tools predates 1.12.0a1 is not reached. Strict
    xfail naming the vintage and the venv this repository does not build
    yet, per the T-1331 ruling that this quadrant must never read green.
Q4  the registry clauses under double delivery: one entry per
    (context session, skill_id), re-registration replaces (§3.1),
    deregistration keys on the context session and ignores a session_id
    planted in data (§3.2 MUST), a repeat is a no-op, and a both-spellings
    pong collector lists a skill once and orders by priority, not arrival.

wire_twin_listener.py takes its topics from WIRE_TWIN_TOPICS, default
`speak`, so the #286 cell is unchanged, and reports the topic, data and
session of each frame rather than the token alone -- a cell that only counts
tokens cannot tell which spelling delivered. driver.WireTwinListener gains
topics= and received()/received_for().

Runs, on a real ovos-messagebus with a real 1.5.0 listener:
  17 passed, 1 xfailed (Q3, strict)
Mutation control, OVOS_BUS_EMIT_LEGACY=false: Q1 fails with its own message,
so the cell measures the twin rather than the bus.
No regression: test_wire_twin_old_listener.py,
test_fallback_namespace_twin.py and test/meta/ give 37 passed, 18 xfailed.

The four twins were already out of test/meta/untested-migration-topics.txt,
so this changes no allowlist line; it closes the coverage the removal
promised.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3108910a-dff6-4a2c-a6ba-c31158361d14
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

JarbasAl and others added 4 commits September 26, 2026 07:10
test_map_still_pairs_these_four carried no gate, so it ran in every matrix
cohort, including those on ovos-spec-tools 1.10.0a1 — a vintage that predates
the four ovos.skills.fallback.* entries. There the four are legitimately
absent, and the cell read that correct state as a rename, reddening
new-skill/old-core and old-skill/old-core (reviewer's FINDING 0, jobs
108353641052 and 108353641033).

That absence is the same state Q3's own marker in this module calls correct
behaviour rather than a defect, so the cell asserted the opposite of its
module's premise in exactly the cohorts the premise describes.

The gate is the map itself rather than a version comparison: "does this cohort
know these twins" is what the cells below need, and a version string is only a
proxy for it. The resolved ovos-spec-tools version is named in the skip reason
so a reader can tell an old cohort from a rename.

Three behaviours, all verified:

    current cohort (map has the four)   -> 1 passed
    all four absent from the map        -> 1 skipped, reason names
                                           ovos-spec-tools 1.13.0a2
    one of four absent (a rename)       -> 1 failed

The third is what keeps the cell worth having: a partial set is a rename or a
removal, not an old vintage, and it still fails loudly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
No workflow set BACKCOMPAT_WIRE_TWIN_PYTHON, so the nine Q1 cells of
test_fallback_twin_quadrants.py skipped in every CI job. The integration
job already has ovos-messagebus and FALLBACK_TWIN_CELLS=1 and runs
test/backcompat; it now builds venv_wire_twin_old (ovos-bus-client==1.5.0)
and points BACKCOMPAT_WIRE_TWIN_PYTHON at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n-quadrants

# Conflicts:
#	test/backcompat/build_venvs.sh
@JarbasAl
JarbasAl marked this pull request as ready for review December 5, 2026 17:05
@JarbasAl
JarbasAl self-requested a review as a code owner December 5, 2026 17:05
@JarbasAl
JarbasAl merged commit 0e372a1 into dev Dec 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants