Skip to content

feat(testing): introduce multi-authority OpenWebNet golden corpus conformance suite - #30

Merged
GreenGrassBlueOcean merged 2 commits into
masterfrom
feat/openwebnet-golden-corpus
Sep 11, 2026
Merged

feat(testing): introduce multi-authority OpenWebNet golden corpus conformance suite#30
GreenGrassBlueOcean merged 2 commits into
masterfrom
feat/openwebnet-golden-corpus

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Summary

Introduces a standardized, declarative, multi-authority OpenWebNet Golden Corpus conformance test suite to ensure consistent, rock-solid frame parsing and command building across the OpenWebNet ecosystem.

Three-Authority Conformance Architecture

Authority Source Role in Suite
Judge Legrand OpenWebNet Specification PDFs (via openwebnet-mcp) Asserts frame validity, subsystem semantics, and dimension boundaries
Oracle openwebnet4j & openHAB reference vectors (MessageTest.java / OwnIdTest.java) Mature reference strings and real-world edge cases
System Under Test OWNd protocol engine Validates parser extraction, roundtrip string serialization, and builder parity

Key Deliverables

  • Declarative Golden Corpus (tests/golden/):
    • schema.json: Strict JSON Schema (Draft-07) enforcing canonical attributes, nullable signaling frames (*#*1##, *#*0##), interface routing (#4#01), dimension values, and builder factory specs.
    • 11 OpenWebNet Subsystems, 58 Fixtures:
      • WHO=00: Signaling & Scenarios
      • WHO=01: Lighting
      • WHO=02: Automation / Covers
      • WHO=04: Thermoregulation
      • WHO=05: Burglar Alarm
      • WHO=09: Auxiliary
      • WHO=13: Gateway Management
      • WHO=15: CEN
      • WHO=18: Energy Management
      • WHO=25: CEN+
    • SOURCE.yaml: Lineage and attribution metadata mapping each fixture to its source.
  • Automated Conformance Test Suite (tests/test_golden_conformance.py):
    • test_golden_corpus_schema_validity: Validates all fixture files against schema.json with strict ID and frame uniqueness.
    • test_golden_frame_parsing: Verifies parsing extraction of who, where, what, interface, dimension, and dimension_values.
    • test_golden_frame_roundtrip: Asserts 100% roundtrip wire serialization fidelity (str(OWNMessage.parse(f)) == f).
    • test_golden_frame_builder_parity: Validates that high-level OWNd command builders (OWNLightingCommand, OWNAutomationCommand) emit exact expected wire frames.
  • Validation & Harvesting Tooling (tools/golden/):
    • validate_corpus.py: Standalone CLI validator tool.
    • harvest_4j_fixtures.py: Automated extractor from openwebnet4j and openhab-addons.
    • HARVEST_REPORT.md: Comprehensive breakdown of 63 harvested frames.
    • MCP_NOTES.md: Live validation log from openwebnet-mcp.

Test Verification

  • Full test suite passes: 570 / 570 passed in 2.68s
  • Golden conformance suite passes: 137 / 137 passed in 0.24s
  • Zero third-party Java/Maven dependencies introduced.

Cc: @anotherjulien @mvalla

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 6cf91bc into master Sep 11, 2026
12 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