Skip to content

test(engines): parametrize wire-protocol tests across all sidecar engines - #1408

Merged
debpalash merged 2 commits into
debpalash:mainfrom
paoloantinori:test/subprocess-backend-shared-wire-framing
Aug 7, 2026
Merged

test(engines): parametrize wire-protocol tests across all sidecar engines#1408
debpalash merged 2 commits into
debpalash:mainfrom
paoloantinori:test/subprocess-backend-shared-wire-framing

Conversation

@paoloantinori

@paoloantinori paoloantinori commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Every sidecar (9 modules) carries its own copy of the length-prefixed JSON wire protocol. This parametrizes the 4 protocol invariants across all of them so a bug in any copy is caught.

Inspired by @debpalash's test_pockettts_sidecar.py (PR paoloantinori#1), which established the pattern for a single sidecar. This lifts the generic protocol tests (send/recv roundtrip, EOF, oversized-frame cap, truncated-body) so every sidecar inherits the same coverage. Engine-specific tests (language, PCM, voice cache) stay in each engine's own file.

36 test cases, 0.6s, no deps (all sidecar modules are stdlib-only at import time).

Adds 36 parametrized wire-protocol tests for all nine sidecar engines. The tests verify round trips, EOF handling, oversized-frame rejection, and truncated-body errors. The change is test-only and adds no dependencies or production behavior.

…ines

Every sidecar (9 modules: TTS + ASR + echo) carries its own copy of the length-prefixed JSON wire protocol. This parametrizes the 4 protocol invariants (send/recv roundtrip, EOF, oversized-frame cap, truncated-body) across all of them, so a bug in any sidecar's copy is caught. Inspired by debpalash's test_pockettts_sidecar.py (PR #1) which established the pattern for a single sidecar; this lifts the generic protocol tests so every sidecar inherits the same coverage. 36 test cases, 0.6s.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d4b4906a-a2f9-47f7-aaa2-a9bd372bb94e

📥 Commits

Reviewing files that changed from the base of the PR and between 0c82167 and a5e1de2.

📒 Files selected for processing (1)
  • tests/test_subprocess_sidecar_wire.py

📝 Walkthrough

Walkthrough

The pull request adds shared parametrized tests for subprocess sidecar wire protocols. The tests cover round trips, clean EOF, oversized frames, and truncated bodies across sidecar modules.

Changes

Subprocess sidecar wire protocol

Layer / File(s) Summary
Wire-protocol validation
tests/test_subprocess_sidecar_wire.py
Parametrized tests validate length-prefixed JSON-over-stdio round trips, clean EOF handling, maximum-frame rejection, and truncated-body errors across subprocess sidecar modules.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and test scope but omits the required Summary, Changes, Type, Testing, Checklist, and Release cadence sections. Rewrite the description using the repository template and include the test method, applicable type, checklist status, and release cadence information.
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commit syntax with a scope and accurately describes the parametrized wire-protocol tests.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cross-Platform Default Parity ✅ Passed The commit adds only tests/test_subprocess_sidecar_wire.py; it changes no default runtime behavior or platform-specific code, so parity is not applicable.
I18n Completeness (21 Locales) ✅ Passed The commit changes only tests/test_subprocess_sidecar_wire.py; it adds no frontend code, t('...') keys, or hardcoded frontend user-facing strings.
Local-First Guarantee ✅ Passed The PR adds only stdlib/pytest wire tests; it makes no network, credential, account, telemetry, or reporting calls, and sidecar model downloads remain lazy and opt-in.
Backward Compatibility ✅ Passed HEAD changes only add tests/test_subprocess_sidecar_wire.py; no production, database schema, migration, installation, or model-download changes can affect existing data or weights.

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

Comment @coderabbitai help to get the list of available commands.

@debpalash
debpalash merged commit 14979c3 into debpalash:main Aug 7, 2026
15 checks passed
debpalash added a commit that referenced this pull request Aug 7, 2026
The PR merged without an Unreleased entry. It is not user-facing, so it
belongs under CI rather than Fixed — but the contributor credit the repo
keeps for community work should still be there.
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