Skip to content

chore: count the strict xfails of the conformance suites - #97

Draft
openvoiceos-bot wants to merge 2 commits into
devfrom
feat/xfail-count
Draft

openvoiceos-bot wants to merge 2 commits into
devfrom
feat/xfail-count

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

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

This adds tools/xfail_count.py. It counts the collected test items under test/conformance that carry a strict xfail mark that applies on the installed stack. That is the number of known gaps that have a test. It prints one JSON line.

The tool collects the suites with pytest and runs no test. It asks pytest's own evaluate_xfail_marks which mark applies and whether it is strict, so conditions and the xfail_strict and strict ini options follow pytest. It clears OVOS_CHANNEL before collection, so the channel gap marks that the root conftest adds are not counted. The spec of each suite comes from docs/coverage.md; a suite that two specs share is reported under both ids joined by +. The tool exits non-zero when any suite file, with or without an xfail, maps to no spec. Helper tests are exempt by name.

The output has these fields: metric, value, repo, commit (null outside the checkout), dirty, tool_version, stack (installed versions of the OVOS packages the count depends on), by_spec, unmapped_files, non_strict, non_strict_items and runtime_xfail_calls (pytest.xfail, its aliases, add_marker and applymarker). docs/coverage.md describes each field. Four suites that the file did not name now have a mention in their spec section.

Tests in test/meta/test_xfail_count.py cover plain, parametrized and module-level marks, false conditions, keyword conditions, class and method marks, the ini options, runtime forms, and a suite with no xfail and no mapping. The real-repo test is skipped when OVOS_CHANNEL is set, and it checks the value with OVOS_CHANNEL=stable. There is no CI step; the tests run with test/.

On head 16d50ac the tool prints:

{"metric": "conformance_strict_xfails", "value": 29, "repo": "OpenVoiceOS/ovos-test-harness", "commit": "16d50ac725c8a364038cc6a236888257ebacd17e", "dirty": false, "tool_version": "2.0.0", "stack": {"ovos-core": "3.7.13a1", "ovos-workshop": "9.10.10a1", "ovos-utils": "0.15.15a1", "ovos-bus-client": "2.11.34a1", "ovos-messagebus": "0.2.5a1", "ovos-plugin-manager": "2.12.5a1", "ovos-spec-tools": "1.18.2a1"}, "by_spec": {"OVOS-AUDIO-1": 1, "OVOS-AUDIO-IN-1": 1, "OVOS-COMMON-QUERY-1": 5, "OVOS-CONTEXT-1": 3, "OVOS-FALLBACK-1": 2, "OVOS-GUI-1": 6, "OVOS-INTENT-3": 2, "OVOS-INTENT-4": 1, "OVOS-OCP-1": 2, "OVOS-PERSONA-1": 1, "OVOS-SESSION-1+OVOS-SESSION-2": 1, "OVOS-STOP-1": 1, "OVOS-TRANSFORM-1": 3}, "unmapped_files": [], "non_strict": 1, "non_strict_items": ["test/conformance/test_intent3_conformance.py::TestE2ETemplateGeneralizes::test_unseen_phrasing_still_matches"], "runtime_xfail_calls": 0}

🤖 Generated with Claude Code

tools/xfail_count.py collects test/conformance with pytest, runs no test,
and prints one JSON line: the collected items that carry an applicable
strict xfail mark, split by spec through the suite rows of docs/coverage.md.
It exits non-zero when a suite maps to no spec. Tests cover plain, param,
module-level, false-condition, non-strict and runtime cases, and compare
the real-repo value with pytest's own xfail evaluator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 6, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

… gaps

The channel_compat jobs set OVOS_CHANNEL, and the root conftest then adds a
strict xfail per channel gap at collection, so the tool counted those too.
It now clears OVOS_CHANNEL before collection.

Marks are evaluated with pytest's own evaluate_xfail_marks instead of a
reimplementation, which differed on keyword conditions, class and method
marks, strict=None and the xfail_strict and strict ini options. Every suite
file must map to a spec, not only files with a strict xfail; the four plugin
and dual-emit suites are now named in docs/coverage.md. The output gains
dirty, stack, unmapped_files and non_strict_items, commit is null outside the
checkout, and runtime calls include aliases, add_marker and applymarker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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