Skip to content

fix(submission): tell submitters what the correct values would be - #392

Merged
AlCalzone merged 6 commits into
mainfrom
claude/submission-flow-bot-responses-g6ib30
Oct 7, 2026
Merged

AlCalzone merged 6 commits into
mainfrom
claude/submission-flow-bot-responses-g6ib30

Conversation

@AlCalzone

@AlCalzone AlCalzone commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

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.

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

Copilot AI 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.

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 Medium severity

Open (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.

Comment thread .github/scripts/firmware-submission/process-submission.mts Outdated
… 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

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Sanitize display values and derive continuation indentation for correctly nested multi-line errors.

Review effort: Lite
Findings: None

Resolved since last review (1)

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
@AlCalzone
AlCalzone merged commit 855f2a8 into main Oct 7, 2026
8 checks passed
@AlCalzone
AlCalzone deleted the claude/submission-flow-bot-responses-g6ib30 branch October 7, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants