Check SCSpecType is a superset of SCValType - #314
Merged
Conversation
leighmcculloch
force-pushed
the
check-scspectype-superset
branch
2 times, most recently
from
August 13, 2026 21:32
f4d34da to
5ef8ba8
Compare
leighmcculloch
force-pushed
the
check-scspectype-superset
branch
from
August 13, 2026 21:33
5ef8ba8 to
147f1ac
Compare
leighmcculloch
marked this pull request as ready for review
August 13, 2026 21:34
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI validation intended to ensure contract-visible SCValType variants have matching SCSpecType variants.
Changes:
- Adds an XDR type-comparison script.
- Runs the check through GitHub Actions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.scripts/check-scspectype-superset.ts |
Implements the superset check. |
.github/workflows/scspectype-superset.yml |
Adds CI execution for the check. |
Suppressed comments (1)
.scripts/check-scspectype-superset.ts:20
- This check is guaranteed to fail on the current tree:
SCV_EXECUTABLE_TAGis present inSCValType, is not excluded here, andSC_SPEC_TYPE_EXECUTABLE_TAGdoes not exist. Because the new workflow runs this on every push and pull request, it introduces permanently failing CI. Add the corresponding spec type (and required XDR handling/generated updates), or exclude it here only if it truly cannot cross a contract boundary, before enabling the workflow.
const missing = [...new Set(val.map((name) => name.slice("SCV_".length)))]
.filter((name) => !EXCLUDED.includes(name))
.filter((name) => !new RegExp(`\\bSC_SPEC_TYPE_${name}\\b`).test(spec));
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dmkozh
approved these changes
Aug 13, 2026
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
Add a CI check that every
SCValTypevariant has a matchingSC_SPEC_TYPE_counterpart, excluding the three internal values that cannot cross a contract function boundary.Why
Nothing catches a new
SCValTypelanding without a correspondingSCSpecType, which leaves a value type that contracts can pass but cannot declare in their spec — the check fails today onSCV_EXECUTABLE_TAG.