Repository navigation
ci: add new CI jobs to check correct vendoring of libsimplicity - #392
Merged
apoelstra merged 2 commits intoOct 16, 2026
Merged
Conversation
vendor-simplicity.sh prefixes every libsimplicity symbol with the crate's major/minor version so incompatible versions can be linked together. Fail CI if any file carries a different prefix, e.g. one copied in by hand.
Re-run vendor-simplicity.sh at the commit in simplicity-HEAD-revision.txt and fail if the vendored tree differs, catching hand-edited or grafted files. Also restrict the workflow's GITHUB_TOKEN to read-only contents access, since no job needs to write.
Collaborator
As a general rule, I never give Github CI jobs any credentials to do "real" stuff. At worst the runners can create new PRs. But it would be nice if we could, say, verify a gpg signature from one of us before running the vendoring script, or something. |
apoelstra
reviewed
Oct 15, 2026
| # Check that every versioned symbol prefix in simplicity-sys matches the crate version. | ||
| # | ||
| # vendor-simplicity.sh renames every libsimplicity symbol to `rustsimplicity_<major>_<minor>_*` | ||
| # and the allocator hooks to `rust_<major>_<minor>_*`, so that semver-incompatible versions of |
Collaborator
There was a problem hiding this comment.
In 0316258:
This is fine, but the pattern is really rust_0_<minor>_*. When the major version changes to 1, if ever, we would change the pattern to rust_<major>_*, dropping the minor version which would no longer indicate a semver-incompatible release.
Basically the rule is that we try to encode the "major version according to Rust's semver rules" and nothing more than that.
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.
Adds two jobs:
One worry is that outside users might edit vendor.sh and execute code, but that can't really be prevented in CI, since that check could also be edited. Github does, by default, prevent running of outsider contributor's jobs, but we should be vigilant to not just click the approve before reviewing code.