Repository navigation
fix(submission): tell submitters what the correct values would be - #392
Merged
Merged
Conversation
Validation errors from the firmware submission bot only said what was wrong. They now also include the expected values: - invalid region: list the valid region values (and match case-insensitively) - version range mismatch / partial device match: list the device entries and firmware version ranges of the existing files next to the submitted ones - undetectable firmware format: name the downloaded file and list the supported formats, noting that archives like .zip are not supported - duplicate upgrade variants: list the upgrades already in the target file Multi-line errors are indented so they nest under their list item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Case-insensitive region validation still mishandles all regions and surrounding whitespace.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Improves firmware submission validation errors by showing expected values and relevant configuration details.
Changes:
- Adds descriptive mismatch, region, format, and upgrade-variant messages.
- Indents multi-line validation errors.
- Adds regression tests for the new diagnostics.
| File | Summary |
|---|---|
.github/scripts/firmware-submission/process-submission.mts |
Implements enhanced validation messages and region normalization; all regions handling still requires correction. |
test/firmware-submission-regressions.ts |
Adds regression tests for the new diagnostic helpers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… quoting them Single quotes around accepted values could suggest they have to be typed. Rendered as code spans, only the value itself is shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
Normalize the region input before checking for the unscoped value, so e.g. 'all regions' is no longer rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
Items numbered 10 or higher need a 4-space continuation indent to stay nested in Markdown, so derive the indent from the prefix length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
…rades Replace the repeated NonNullable<ReturnType<typeof normalizeUpgradeVariant>> references with a named interface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
…ters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkGhicUs6N56kAwigFxNMf
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.

Validation errors from the firmware submission bot only said what was
wrong. They now also include the expected values:
and firmware version ranges of the existing files next to the submitted ones
supported formats, noting that archives like .zip are not supported
Multi-line errors are indented so they nest under their list item.