feat: add effectsSummary to graph JSON#49
Open
gke0op wants to merge 3 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
|
@gke0op is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
gke0op
added a commit
to gke0op/zero
that referenced
this pull request
May 17, 2026
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.
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.
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 a normalized
effectsSummarysection tozero graph --jsonoutput,providing a high-level view of capability requirements.
Shape
{ "effectsSummary": { "required": ["world"], "availableOnTarget": ["args", "env", "fs", "memory", "time", "rand"], "missingOnTarget": ["world"] } }required: capabilities the program requiresavailableOnTarget: capabilities the target supportsmissingOnTarget: required capabilities not available on targetWhy
Agents and editors can quickly assess portability without deep graph parsing.
Start with the narrow implementation (required, availableOnTarget, missingOnTarget)
as suggested in the issue.
Testing
Closes #7