Skip to content

fix: fix videoAlpha being in percentage in older files, so loosen val… - #142

Merged
KFilosofov merged 1 commit into
masterfrom
fix/fix-strict-validation-for-older-file-types
Aug 12, 2026
Merged

fix: fix videoAlpha being in percentage in older files, so loosen val…#142
KFilosofov merged 1 commit into
masterfrom
fix/fix-strict-validation-for-older-file-types

Conversation

@KFilosofov

Copy link
Copy Markdown
Contributor

The purpose of this PR is to loosen the validation schema for the sb2 file types, the videoAlpha field is in percentage in older files so they fail being validated.

@github-actions

github-actionsBot commented Aug 7, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Scratch 2.0 (SB2) JSON Schema definitions to accept older projects where the videoAlpha field is stored as a percentage rather than a 0–1 alpha value, preventing valid legacy SB2 files from failing validation.

Changes:

  • Loosen SB2 schema constraint for videoAlpha by increasing its allowed maximum from 1 to 100.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 174 to 178
"videoAlpha": {
"type": "number",
"minimum": 0,
"maximum": 1
"maximum": 100
},

@cwillisfcwillisf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof... this seems like the right change here, but I'm uncomfortable with the idea of this field being exactly 1 in an older project 😅

@KFilosofov

Copy link
Copy Markdown
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

@KFilosofov
KFilosofov merged commit a9b466f into masterAug 12, 2026
3 of 4 checks passed
@KFilosofov
KFilosofov deleted the fix/fix-strict-validation-for-older-file-types branch August 12, 2026 12:19
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 12, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@KFilosofov@georgyangelov@cwillisf