feat: Add validate command - #307
Open
eberle1080 wants to merge 4 commits into
Open
Conversation
eberle1080
force-pushed
the
feat/validate-command
branch
2 times, most recently
from
July 23, 2026 18:03
71d0bce to
4b6d6a4
Compare
amp validate checks an amp.yaml manifest without deploying it: schema and best-practice checks via amp-yaml-validator, backed by the live provider catalog and, when a project is configured, API-backed destination and provider-app checkers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eberle1080
force-pushed
the
feat/validate-command
branch
from
July 23, 2026 18:31
4b6d6a4 to
4da9af0
Compare
laurenzlong
requested changes
Jul 23, 2026
laurenzlong
left a comment
Contributor
There was a problem hiding this comment.
For all CLI PRs, please attach screenshot showing the command in action.
Contributor
Author
Attached |
connectors uses Git LFS; proxy.golang.org serves LFS pointer files, which fails go.sum verification against the real content hash. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Default setup can't set GOPRIVATE or install git-lfs, so its Go autobuild fails module verification. Same languages and schedule, Go built manually. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds
amp validate [ampYamlSourcePath]— validates anamp.yamlmanifest without deploying it.The path argument can be a directory containing
amp.yaml/amp.ymlor a path to the manifest file itself; it defaults to the current directory.Flags:
--strict— treat warnings as errors--skip-provider— skip provider-specific validation--skip-async— skip async error-prevention validationExits non-zero when validation fails, so it can gate CI. Output lists each error/warning with its rule, YAML path, line/column, and a suggestion when available.
How
Validation logic lives in the new
amp-labs/amp-yaml-validatorlibrary (shared so the same rules can run client-side and server-side). The CLI supplies it with live data through the library's dependency-injection hooks:validate/catalog.go— acatalog.CatalogProviderbacked by the live ("dynamic") provider catalog fetched from the public/v1/providersendpoint, so provider/module/capability checks stay current instead of relying on the catalog compiled into the connectors library. Fetched once per run and served from that snapshot.validate/checkers.go—DestinationChecker/ProviderAppCheckerverify that destinations and provider apps referenced by the manifest actually exist in the project, backed by one-time snapshots fromListDestinations/ListProviderApps.request/api.go— newFetchProviderCatalogfor the catalog endpoint (public, unauthenticated, not project-scoped; honorsAMP_API_URL).files/zip.go— newFindManifestFilehelper: explicit file paths are used as-is, directories are searched for the conventional manifest names.Graceful degradation
The command never requires network or a project to be useful:
--projectconfigured → destination and provider-app checks are skipped (the validator emits reminder warnings instead of hard errors).Dependencies
Adds
amp-labs/amp-yaml-validatorandamp-labs/connectors(plus their transitive tree — AWS SDK v2, OpenTelemetry, etc. — all indirect).Screenshots
Example of valid YAML:

Example of invalid YAML:

🤖 Generated with Claude Code