Skip to content

[Language] Expand conformance corpus to full construct coverage #304

@cssbruno

Description

@cssbruno

Follow-up from #295 and PR #300.

Problem

#295 added the conformance corpus runner and a seed of seven accept/reject cases
(internal/lang/testdata/conformance/). The contract is now pinned where cases
exist, but coverage is partial: most blocks, g: directives, metadata keywords,
and endpoint forms have no corpus case, and nothing asserts that every documented
construct is exercised. docs/language/conformance.md describes the mechanism;
the breadth is still to fill.

Relevant code:

  • internal/lang/conformance_test.go: the runner
  • internal/lang/testdata/conformance/{accept,reject}
  • docs/language/spec.md, docs/language/grammar.md: the constructs to cover
  • lang.MetadataKeywords, view.SupportedDirectiveNames: construct registries

Scope

Expand the corpus to at least one accept case per stable/partial construct and
one reject case per planned/deprecated construct, and add a coverage assertion
that fails when a construct in the code registries has no corpus case. Optionally
add a machine-checked EBNF grammar and assert the corpus exercises every
production.

Acceptance Criteria

  • Every metadata keyword, supported g: directive, supported top-level block,
    and endpoint form has at least one accept case.
  • Every planned/deprecated construct has a reject case asserting its code.
  • A coverage test fails when a registry construct has no corpus case.
  • docs/language/conformance.md documents the coverage guarantee.

Verification

go test ./internal/lang

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation workparser.gwdk parser and syntax handling

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions