test: add CLI coverage for fix-plan repair safety metadata#52
Open
gke0op wants to merge 4 commits into
Open
Conversation
Adds --all flag to zero explain, emitting the full diagnostic catalog
as a structured JSON envelope. Text mode lists all codes with category
and title. Single-code explain is unchanged.
JSON envelope shape:
{
"schemaVersion": 1,
"command": "explain",
"mode": "all",
"count": 26,
"diagnostics": [...]
}
Text mode:
Diagnostic catalog (26 codes):
TAR001 target Unknown target
...
Also updates help text and allows explain to proceed without input
when --all is set.
Closes vercel-labs#2
Adds a normalized effectsSummary section to zero graph --json output, providing a high-level view of capability requirements: - required: capabilities the program requires - availableOnTarget: capabilities the target supports - missingOnTarget: required capabilities not available on target This helps agents and editors quickly assess portability without deep graph parsing. Start with the narrow implementation (required, availableOnTarget, missingOnTarget) as suggested in the issue. Closes vercel-labs#7
The --all JSON path was using wrong repair IDs for several diagnostic codes (ERR002, ERR003, STD003, CGEN004, etc.) and was missing entries for TYP025, TYP026, PUB001, IFC001-005, STC001-003, SHM001-002, RCV001-002. Now uses the exact same mapping as print_explain_json. Fixes Vercel Agent Review finding on PR vercel-labs#49.
Adds test coverage for the agent-facing TYP009 repair contract: - Verifies plan mode emits appliesEdits: false - Verifies diagnostics include fixSafety and repair.id - Verifies fixes preserve id, diagnosticCode, safety, and appliesEdits - Covers the zero fix --plan --json path end-to-end Closes vercel-labs#1
|
@gke0op is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
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
Adds CLI test coverage for the agent-facing TYP009 repair contract
in
zero fix --plan --json.What's tested
appliesEdits: falsefixSafetyandrepair.idid,diagnosticCode,safety, andappliesEditszero fix --plan --jsonpathTesting
Closes #1