webref icon indicating copy to clipboard operation
webref copied to clipboard

Validate CDDL extracts during curation step

Open tidoust opened this issue 1 year ago • 1 comments

Reffy now produces CDDL extracts (see #1353). These CDDL extracts are provided as-is with no guarantee whatsoever. Ideally, we'd be able to provide additional guarantees:

  1. Syntax-wise, the CDDL extracts should be valid. This requires making sure that the CDDL can be parsed. cddlparser could perhaps be used but then it's in Python. The main other alternatives are cddl written in Rust and cddlc written in Ruby.
  2. Semantic-wise, the CDDL should "make sense". Additional checks could be done directly by the CDDL parser (e.g. no duplicate rules) and we probably don't need to go much deeper than that. Ideally though, the semantic checks would also consider the combination of CDDL extracts that share the same namespace. This requires a mechanism to tell how CDDL extracts need to be combined. For example, the CDDL defined in WebDriver BiDi is extended by Permissions and Web Bluetooth but these extensions are only noted informatively in WebDriver BiDi. The extension mechanism could perhaps leverage CDDL Module Structure.

tidoust avatar Dec 17 '24 19:12 tidoust

Syntax-wise, the CDDL extracts should be valid.

CDDL syntax is now guaranteed to be valid (according to cddlparser) in curated extracts.

tidoust avatar Jan 07 '25 09:01 tidoust