test: add diagnostic schema conformance snapshots#232
Open
bradhallett wants to merge 1 commit into
Open
Conversation
|
@bradhallett is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Deployment failed with the following error: |
Add conformance snapshot tests for 11 core diagnostic codes. Each test is a minimal .0 source file paired with an .expected.json that asserts the exact diagnostic output schema. Diagnostic codes covered: app001, bld004, err001, imp001, nam003, par100, std002, typ001, typ002, typ009, plus a duplicate nam003 (unknown-name fixture). The title assertion compares the actual compiler diagnostic against the expected snapshot (not a tautological self-comparison). Rebased onto latest main after upstream split CGEN004 into BLD004/CGEN004.
d88b7ac to
767c346
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add conformance snapshot tests for 10 core diagnostic codes. Each test is a minimal
.0source file paired with an.expected.jsonfile that asserts the exact diagnostic output schema.Diagnostic codes covered
app001,cgen004,err001,imp001,nam003,par100,std002,typ001,typ002,typ009How it works
conformance/diagnostics/<code>.0is a minimal program that triggers that diagnosticconformance/diagnostics/<code>.expected.jsonasserts the diagnostic code, severity, and message patternconformance/run.mjsis extended with a newdiagnosticstest type that validates snapshotsValidation
All existing conformance tests continue to pass. New diagnostic snapshots are verified on each run.
Motivation
The diagnostic schema is a core agent-facing contract (see #173). Having snapshot tests for each code makes it easy to catch regressions when diagnostic output format changes across versions.