You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
harness: the validate pass never runs under the harness #682
internal/harness compiles each spec through its compile seam (internal/harness/harness.go:96), which calls the OpenAPI compiler alone. engine.Run also runs pass.Validate, and the harness doesn't, so a spec whose lowered IR the pass rejects sweeps ok.
Concretely, #593 fails morphic compile with pass/discriminator-missing-variant and passes the harness.
Expected
An oracle, in the existing order, that runs pass.Validate on the compiled document and fails on any error the compiler didn't report itself.
Now that #805 gives the engine an ordered pass list, the fix should compile through the engine rather than call pass.Validate beside the compiler. Every oracle then judges what morphic compile returns, including the output of any transform that joins the list, and a pass's error finding reaches the error-diagnostic oracle the way the compiler's do.
engine.Run takes a path while Check holds bytes. Run already builds a compilers.Source from the file it reads, so the change is a source-taking entry point that Run delegates to and the harness's compile seam calls, rather than a temporary file per input. It is the single-source case of the entry point #74 plans.
Still true at c387e25c. internal/harness also compiles with openapi.New() alone, so a second compiler gets none of the oracles either (#968).
What the missing Validate run hides is small today. Of 1,839 compiled documents, only 3 produce any Validate diagnostic: 5 discriminator-missing-variant in all.
Activity
OmarAlJarrah commentedon Oct 13, 2026
Now that #805 gives the engine an ordered pass list, the fix should compile through the engine rather than call
pass.Validatebeside the compiler. Every oracle then judges whatmorphic compilereturns, including the output of any transform that joins the list, and a pass's error finding reaches the error-diagnostic oracle the way the compiler's do.engine.Runtakes a path whileCheckholds bytes.Runalready builds acompilers.Sourcefrom the file it reads, so the change is a source-taking entry point thatRundelegates to and the harness'scompileseam calls, rather than a temporary file per input. It is the single-source case of the entry point #74 plans.OmarAlJarrah commentedon Oct 19, 2026
Still true at
c387e25c.internal/harnessalso compiles withopenapi.New()alone, so a second compiler gets none of the oracles either (#968).What the missing
Validaterun hides is small today. Of 1,839 compiled documents, only 3 produce anyValidatediagnostic: 5discriminator-missing-variantin all.