Skip to content

test: the harness and the conformance matrix assume the OpenAPI compiler #968

Closed

Description

@OmarAlJarrah

Problem

The repository's oracles reach only one compiler at c387e25c:

  • internal/harness compiles every spec with openapi.New() (internal/harness/harness.go). A second compiler gets none of its checks: no panics, no error diagnostics, irverify, the round-trip, determinism and order invariance.
  • compilers/openapi/conformance_matrix_test.go reads the OpenAPI column of docs/ir-spec-matrix.md, and its comment leaves moving it to whoever adds the next format.
  • The CLI's help names OpenAPI as the input (cmd/morphic/compile.go, validate.go).

Direction

A proposal:

  • The harness takes the engine's compiler set, or a registry, and runs each spec through whichever compiler claims it.
  • The matrix test reads every format column that has a compiler.
  • The CLI help lists what engine.New registers, as the engine's own served() message already does.

Done when a second compiler registered in engine.New is swept by the harness and held to its matrix column with no other change.

Out of scope

The compiler contract's own checks (#967).

Related: #469, #470, #682, #967

Priority: P4, rule 1 (test infrastructure; it unblocks #469 and #470, which are P4). grep -n 'openapi.New' internal/harness/harness.go → the one compiler the harness runs (morphic @c387e25c).

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P4Refactors, tests, CI, hostile-input hardening, cosmetic diagnostics, other formatstype:testTests only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions