Skip to content

Add structured {valid, issues} JSON contract for app config validate#7128

Open
ryancbahan wants to merge 1 commit intoryan/structured-app-errorsfrom
ryan/validate-json-contract
Open

Add structured {valid, issues} JSON contract for app config validate#7128
ryancbahan wants to merge 1 commit intoryan/structured-app-errorsfrom
ryan/validate-json-contract

Conversation

@ryancbahan
Copy link
Copy Markdown
Contributor

@ryancbahan ryancbahan commented Mar 30, 2026

What

Change app config validate --json output from flat error strings to structured issue objects.

Why

Machine consumers (automation, repair loops, IDE integrations) need file paths, field paths, and error codes — not pre-rendered human-readable strings. This is the public contract that #7090 aimed to deliver.

How

JSON output shape changes from:

{"valid": false, "errors": ["client_id is required", "invalid type \"unknown\""]}

to:

{"valid": false, "issues": [
  {"file": "shopify.app.toml", "message": "Required", "path": ["client_id"], "code": "invalid_type"},
  {"file": "extensions/my-ext/shopify.extension.toml", "message": "invalid type \"unknown\""}
]}
  • valid: true case: {valid: true, issues: []} (was errors: [])
  • valid: false case: each issue has file, message, and optional path/code from Zod validation
  • CLI (non-JSON) output is unchanged — still renders bullet-formatted error messages

Depends on #7126 which provides the structured ConfigurationError data that flows directly into the JSON shape.

@ryancbahan ryancbahan requested a review from a team as a code owner March 30, 2026 18:49
@github-actions
Copy link
Copy Markdown
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

Copy link
Copy Markdown
Contributor Author

ryancbahan commented Mar 30, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ryancbahan ryancbahan requested a review from dmerand March 30, 2026 18:52
@ryancbahan ryancbahan changed the base branch from ryan/structured-app-errors to graphite-base/7128 March 30, 2026 19:34
@ryancbahan ryancbahan force-pushed the ryan/validate-json-contract branch from f040fae to 14a803b Compare March 30, 2026 19:52
@ryancbahan ryancbahan changed the base branch from graphite-base/7128 to ryan/structured-app-errors March 30, 2026 19:52
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryancbahan ryancbahan force-pushed the ryan/validate-json-contract branch from 14a803b to aacac17 Compare March 30, 2026 21:48
@ryancbahan ryancbahan force-pushed the ryan/structured-app-errors branch from 768157b to 3249375 Compare March 30, 2026 21:48
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