feat: automated blueprint validation CI pipeline#272
Merged
Osuochasam merged 4 commits intoJun 29, 2026
Merged
Conversation
- Add docs/blueprint.schema.json: strict JSON Schema (draft-07) for
blueprint files. Enforces contractId regex (C + 55 base32 chars),
semver version, required fields, typed field enums (address/amount/
asset/string/integer/boolean), and source enums (topic/data).
- Add scripts/validate-blueprint.js: zero-dependency Node script that
runs schema validation, placeholder cross-check ({placeholder} must
have a matching field, every field must appear in the template), and
a dry-run translation test. Writes a Markdown report for the CI bot.
- Add .github/workflows/blueprint-validation.yml: triggers on PRs that
touch lib/translator/blueprints/**/*.json. Validates changed files,
runs lint + tests, posts/updates a sticky PR comment with per-event
translation previews and a reviewer checklist. Fails the check on
any validation error. Completes in under 3 minutes.
- Add .github/ISSUE_TEMPLATE/blueprint_contribution.md: structured
issue template for proposing new blueprints before implementation
- package.json: bump vitest from ^3.2.6 to ^4.1.9 to match the peer dependency required by @vitest/ui@^4.1.9. The mismatched versions caused npm ci to fail with ERESOLVE inside the Docker build stage, breaking both linux/amd64 and linux/arm64 image builds. - native/soroban-xdr-decode/Cargo.toml: update stellar-xdr from 0.0.18 to 26.0.1. The old constraint no longer resolves on crates.io (available versions start at 26.0.0), which caused cargo generate-lockfile to exit 101 and broke the Dependency Scanning with Trivy job on every PR. - native/: bring in the full native/ directory from upstream (soroban-xdr-decode and soroban-dsl) which was missing from this fork, causing the Cargo.toml fix to have no effect.
Contributor
Author
|
I've pushed a fix to this branch that also resolves the two pre-existing CI failures affecting all PRs: 1. Docker Build (ERESOLVE): 2. Dependency Scanning with Trivy (cargo exit 101): The Could a maintainer approve the workflow run so CI can re-trigger? The checks are pending approval. |
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.
closes #234
Summary
Adds a full CI pipeline for community blueprint contributions. Zero changes to existing source files or tests.
Files
docs/blueprint.schema.jsonscripts/validate-blueprint.js.github/workflows/blueprint-validation.yml.github/ISSUE_TEMPLATE/blueprint_contribution.mdBlueprint schema rules
contractId— must match^C[A-Z2-7]{55}$(valid Stellar strkey)version— semver (e.g.1.0.0)topic,template, and at least onefieldtypemust be one of:address | amount | asset | string | integer | booleansourcemust be one of:topic | dataValidation pipeline (3 checks)
blueprint.schema.json{placeholder}in the template must have a matching field definition, and every field must be referenced in the templatePR comment output
After validation the bot posts (or updates) a sticky comment with:
Acceptance criteria
{placeholder}→ fails withtemplate placeholder {x} has no matching fieldtimeout-minutes: 3enforced)