Unify renderer template parity coverage - #127
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR is confined to test harnesses, parity references, regression coverage, and documentation; no production renderer or customer request-path code changes. Its primary impact is how CI parametrizes and executes renderer tests, with no schema, deployment, security, billing, or authentication changes. Notes:
You can add or adjust custom eligibility rules. Learn more. |
# Conflicts: # tests/conftest.py # tests/test_bridge.py # tests/test_disabled_thinking_stability.py # tests/test_renderer_config_parity.py # tests/test_roundtrip.py
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d427cf7. Configure here.
# Conflicts: # tests/conftest.py # tests/test_bridge.py # tests/test_render_ids.py # tests/test_renderer_config_parity.py # tests/test_roundtrip.py

Summary
Why
Parity coverage had grown across several mostly-overlapping test modules and local model lists. Adding a renderer, checkpoint, scenario, or template kwarg required updating multiple places, while global skips made it difficult to see which cells were intentionally unsupported.
This change makes the coverage surface auditable in one place: models declare the suites they participate in, scenarios declare renderer-specific applicability, and every finite typed template kwarg is crossed with every valid scenario. New declared kwargs fail coverage until representative values are added.
Impact
There are no production renderer changes. The test suite gains broader, systematic template coverage while removing roughly 1,800 net lines of duplicated test setup and parity cases. Known renderer/template deviations remain covered by focused stability tests rather than hidden runtime skips.
Validation
uv run pytest tests/ -q: 7,675 passed, 63 skippeduv run ruff check .uv run ruff format --check .uv run ty check renderers: exits successfully with the existing 82-warning baselinegit diff --check origin/main...HEADNote
Unify renderer parity tests into catalog-driven
test_parity.pywith pluggable reference oraclesMODEL_CATALOG,models_for(suite)) that binds each model to a renderer and a reference oracle, driving parametrization across all test suites via conftest.py.render_referenceinto a pluggable oracle registry with adapters for HuggingFaceapply_chat_template, DeepSeek V4's Python encoder, and OpenAI Harmony.test_deepseek_r1,test_llama_3,test_laguna_m1, deletedtest_gpt_oss_harmony_parity.py) and replaces their static model lists withmodels_for(...)calls.MODEL_CATALOGor misrouted inRENDERER_ORACLE_ROUTESwill silently lose coverage. ReviewMODEL_CATALOGmembership and oracle routing in parity.py and reference_rendering.py.Macroscope summarized b858ccc.
Note
Low Risk
Test-only refactor with no production renderer changes; main risk is shifted parametrization coverage if a suite mapping is wrong.
Overview
Consolidates scattered render/token parity tests into
tests/parity.py(singleMODEL_CATALOG, sharedSCENARIOS,KWARG_VALUES, and declarative exclusions) andtests/test_parity.py, which runs every valid model × scenario × typed template-kwarg cell against a model-aware reference oracle.tests/reference_rendering.pynow registers three oracles—Hugging Face Jinja (default), DeepSeek V4’s Python encoder, and Harmony for GPT-OSS—and routes by resolved renderer name, folding formertest_gpt_oss_harmony_parity.py/ HF-only assumptions into one path.conftest.pyparametrizes tests frommodels_for(suite)(shared, plain-parser, build-helpers, etc.) instead of a monolithic list and drops autouse skips for GPT-OSS and Llama date nondeterminism (Llama uses pinneddate_stringin the catalog).Large bespoke parity modules (
test_render_ids.py,test_renderer_config_parity.py, Nemotron/Prime-Qwen/Laguna-S parity files, and similar) are removed or trimmed; bridge, roundtrip, tool-arg, and stability suites now read model lists from the same catalog. Docs (README,docs/renderer-config.md,pyproject.toml) point attest_parity.py. Prime-Qwen empty-think parse/bridge regressions move intotest_parse_response.py.Reviewed by Cursor Bugbot for commit b858ccc. Bugbot is set up for automated code reviews on this repo. Configure here.