Three pull requests from sakinaroufid land today adding comprehensive CI infrastructure for UCP schema validation — automated checks that ensure the specification's JSON schemas stay in sync with the source of truth and that documentation builds don't break silently.
UCP is a schema-driven protocol. The JSON schemas in the repository define the contract between AI agents and commerce providers. When those schemas drift from the canonical source (or from each other), bad things happen:
Today's PRs address all three failure modes.
A new GitHub Actions workflow that validates the JSON schemas on every push and PR:
name: Schema Validation
on:
push:
paths:
- 'schema/**'
pull_request:
paths:
- 'schema/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Schemas
run: npm run schema:validate
This catches malformed schemas before they merge — no more "the schema is valid JSON but not valid JSON Schema" bugs.
A pre-commit hook that verifies generated schemas match the source:
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: schema-sync-check
name: Check schema generation is in sync
entry: npm run schema:check-sync
language: system
pass_filenames: false
How it works: The hook runs the schema generator, then diffs the output against committed files. If they don't match, the commit fails with a message explaining which schemas need regeneration.
This catches a common mistake: editing a source file that generates schemas, but forgetting to run the generator before committing.
Updates to the existing CI workflows to trigger on the right file paths:
Previously, some workflows ran on every commit regardless of what changed. The refined triggers reduce CI time and resource usage while ensuring the right checks run for each change type.
UCP's schemas follow a generation pipeline:
The new CI infrastructure validates steps 2-3 automatically.
From the earlier commit (ba636a2 by Daniel Dittenhafer), error handling in the doc build was also improved:
// Before: silent failures
try {
buildDocs();
} catch (e) {
// ignored
}
// After: propagate errors
try {
buildDocs();
} catch (e) {
console.error('Doc build failed:', e);
process.exit(1);
}
Combined with the new workflow triggers, this means documentation build failures are now visible in CI.
As more organizations implement UCP, the quality of the specification becomes critical:
Google's investment in CI infrastructure signals that UCP is moving from "interesting proposal" to "production specification."
Looking at the broader UCP repository, several related improvements are in flight:
For protocol designers and implementers, today's PRs represent best practices: automated validation, sync checks, and targeted CI triggers. These patterns apply to any schema-driven API.
For implementers: If you're building UCP clients, the improved CI gives you higher confidence that published schemas are correct. Consider pinning to specific schema versions and watching the repository for breaking change notifications.