Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens XLS validation to catch more non-compliant specs (notably cases like #451), by centralizing and expanding preamble metadata validation and strengthening Amendment template enforcement.
Changes:
- Added shared preamble validation (
validate_xls_preamble) with stricter required fields, enums, and date-format checks. - Updated the template validator to reuse shared preamble validation and added heuristics to detect “existing XRPL primitive” sections that should use Amendment template headings.
- Updated several existing XLS READMEs to comply with the stricter metadata requirements (status, description, withdrawal reason, etc.).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/xls_parser.py | Introduces shared preamble validation and uses it during full-repo XLS parsing validation. |
| scripts/validate_xls_template.py | Reuses shared preamble validation; adds stricter structure checks and heuristic enforcement for legacy-style Amendment specs. |
| XLS-0101-smart-contracts/README.md | Adjusts status to comply with allowed status values. |
| XLS-0051-nftoken-escrow/README.md | Adds required description metadata and reorganizes preamble fields. |
| XLS-0017-xfl/README.md | Fixes misspelled description metadata key. |
| XLS-0016-nft-metadata/README.md | Normalizes metadata formatting and adds required description. |
| XLS-0015-concise-tx-id/README.md | Adds required withdrawal-reason for Withdrawn status. |
| XLS-0010-non-transferable-tokens/README.md | Adds required description metadata. |
| XLS-0008-tickets/README.md | Adds required withdrawal-reason for Withdrawn status. |
Comments suppressed due to low confidence (2)
scripts/validate_xls_template.py:193
- The section-number stripping regex only matches single-level numbering like
1. Title. Many specs use nested numbering (e.g.1.1. Abstract), which will prevent required-section checks like"Abstract" not in section_titlesfrom working and can yield false validation errors. Consider updating the regex to strip\d+(\.\d+)*.prefixes (or relaxing required-section matching to use substring checks).
def _parse_sections(self):
"""Parse all sections from the markdown content using markdown-it-py."""
scripts/validate_xls_template.py:658
- 'except' clause does nothing but pass and there is no explanatory comment.
print("Validation complete:")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Collaborator
Author
|
The template checker is expected to fail here |
Tapanito
requested changes
Feb 10, 2026
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Tapanito
approved these changes
Feb 11, 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.
High Level Overview of Change
This PR improves the XLS validator to better catch non-compliant specs.
Checking XLS headers is now cleaner and DRY-er, lots of code cleanup (removing unused variables etc) as well.
Context of Change
It didn't flag on #451 when it should have
Type of Change