Skip to content

feat(kb,parser): support Machine KB schema 2.0.0 and align WHO 6/8 with Encyclopedia - #19

Merged
GreenGrassBlueOcean merged 1 commit into
mainfrom
chore/sync-oracle-index-f453-l4686sdk
Oct 18, 2026
Merged

GreenGrassBlueOcean merged 1 commit into
mainfrom
chore/sync-oracle-index-f453-l4686sdk

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Updates openwebnet-mcp to support the OpenWebNet Encyclopedia Machine KB schema 2.0.0 (machine-kb-v0.2.0 / 2026.05.0), enriches the WHO 6 (Video Door Entry System) and WHO 8 (Voice / Video Intercom & Call Management) catalog entries, and adds dedicated WHO 6 and WHO 8 semantic frame validation in frame_parser.py.


Changes

1. Machine KB Schema 2.0.0 Compatibility (kb.py, kb_format.py)

  • SUPPORTED_SCHEMA_MAJOR: Accept both schema major versions (1, 2) in src/openwebnet_mcp/kb.py so openwebnet-mcp loads both legacy 1.0.0 snapshots and the current 2.0.0 OpenWebNet Encyclopedia Machine KB (../OpenWebNet-Encyclopedia/knowledge).
  • Schema 2.0.0 Provenance Formatting: Update _format_source_line in src/openwebnet_mcp/kb_format.py to support the provenance.sources[] object layout (source_id, tier, title, section, page, locus) alongside the v1 string-ID + sources_by_id lookup, while also surfacing provenance.firmware_oracle (suite, verdict, evidence_path).

2. WHO 6 & WHO 8 Catalog Alignment (src/openwebnet_mcp/data/who_catalog.json)

  • WHO 6 (Video Door Entry System):
    • Populated complete WHAT table (0–12, 22–24, 32–35), including 10 (Open door Lock 1), 11 (Reset external unit (#2 riser required)), 12 (Door lock release notification), 22/23/24 (Open door Locks 2/3/4).
    • Documented WHERE addressing (0 General, 1–99 Entrance panel (EP), 4000–4099 Camera endpoint (40xx), 4100 Broadcast, and #2 riser suffix).
    • Added note clarifying that WHO 6 frames are command/event (*6*WHAT*WHERE##) and status-request (*#6*WHERE##) only (DIMENSION frames are NACKed across all 7 gateway firmwares).
  • WHO 8 (Voice / Video Intercom & Call Management):
    • Aligned WHAT table with the Encyclopedia & Firmware Oracle (1#K Call request kinds 1–7, 2#1/2#2 Audio/Video answer, 3 End call / hang up, 4#1–4#5 Call completion status, 5 Paging / general announcement, 6 Answer call / pick up, 10 Open primary door lock, 11/12 Open auxiliary locks 2/3, 21 Turn on camera / cycle video, 22 Turn off camera).
    • Documented WHERE (0 General / broadcast, 1–99 Internal unit (IU) / handset ID, 101–199 External unit / entrance panel ID) and DIMENSION 1 (*#8*WHERE*1## Read call / handset state).

3. Semantic Frame Validation for WHO 6 & WHO 8 (src/openwebnet_mcp/frame_parser.py)

  • _validate_who6 & _validate_who6_where:
    • Rejects DIMENSION_READ / DIMENSION_WRITE frames on WHO 6 (consistent with Firmware Oracle all_nack verdicts across all 7 firmwares).
    • Validates WHO 6 WHERE ranges (0, 1–99, 4000–4099, 4100) and #2 riser suffix rules (rejecting invalid suffixes such as #1/#3 and 0#2/4100#2).
    • Enforces the Encyclopedia / Firmware Oracle rule that WHAT=11 requires a #2 riser suffix (*6*11*WHERE#2##; bare *6*11*1## is NACKed on all gateways).
  • _validate_who8 & _validate_who8_where:
    • Validates parameterized WHATs (1#1..1#7, 2#1..2#2, 4#1..4#5), WHERE ranges (0, 1–99, 101–199), and DIMENSION 1.

4. Tests & Golden Set (tests/)

  • Updated tests/golden/kb_golden.json and tests/kb_eval.py for machine-kb-v0.2.0 (2026.05.0) record IDs (WHO-0016-SPEC, WHO-0001-DIM-0001).
  • Added unit tests in tests/test_frame_parser.py covering WHO 6 (WHAT=10, WHAT=11 with/without #2, invalid WHERE/DIMENSION) and WHO 8 (1#1..1#7, 2#1..2#2, 4#1..4#5, DIMENSION 1, invalid call kinds/WHERE/DIMENSION).
  • Added unit tests in tests/test_kb.py covering schema 2.0.0 loading and provenance.sources[] / firmware_oracle formatting.

Verification

  • pytest -q: 165 passed
  • pytest -q -m kb_eval tests/test_kb_golden.py: 1 passed (Recall@1 ≥ 0.72, Recall@3 ≥ 0.90, MRR ≥ 0.82, 0 rank regressions)

@GreenGrassBlueOcean GreenGrassBlueOcean changed the title feat(kb,parser): support Machine KB schema 2.0.0 and align WHO 6/8 wi… feat(kb,parser): support Machine KB schema 2.0.0 and align WHO 6/8 with Encyclopedia Oct 18, 2026
@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit a428fb3 into main Oct 18, 2026
16 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.

1 participant