Skip to content

test: add CLI coverage for fix-plan repair safety metadata#52

Open
gke0op wants to merge 4 commits into
vercel-labs:mainfrom
gke0op:fix-plan-test-coverage
Open

test: add CLI coverage for fix-plan repair safety metadata#52
gke0op wants to merge 4 commits into
vercel-labs:mainfrom
gke0op:fix-plan-test-coverage

Conversation

@gke0op
Copy link
Copy Markdown

@gke0op gke0op commented May 17, 2026

Summary

Adds CLI test coverage for the agent-facing TYP009 repair contract
in zero fix --plan --json.

What's tested

  • Plan mode emits appliesEdits: false
  • Diagnostics include fixSafety and repair.id
  • Fixes preserve id, diagnosticCode, safety, and appliesEdits
  • End-to-end coverage of the zero fix --plan --json path

Testing

  • All 10 CLI tests pass (9 existing + 1 new)
  • Docs tests pass

Closes #1

gke0op added 4 commits May 17, 2026 20:56
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
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@gke0op is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant