Skip to content

Compare script: cover ranges, older versions and extra SKUs - #76

Merged
adamshiervani merged 1 commit into
devfrom
chore/compare-releases-coverage
Sep 18, 2026
Merged

adamshiervani merged 1 commit into
devfrom
chore/compare-releases-coverage

Conversation

@adamshiervani

@adamshiervani adamshiervani commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

scripts/compare-releases.sh covered 180 request shapes, all built from the live baseline versions and the two JetKVM SKUs. Three gaps: no old versions, no ranges, no SKUs outside the registered pair. This adds 36 cases.

Range and older-version constraints (24 cases), derived from the live stable versions:

appVersion=^0.5.0     newest patch of the current minor
appVersion=<0.5.9     newest release before the current one
systemVersion=^0.2.0
systemVersion=<0.2.8  reaches the pre-skus/ layout

Per device ID, per default SKU, one axis at a time.

Expected-difference SKUs (12 cases). EXTRA_SKUS, default jetkvm-mini-ethernet jetkvm-mini-wireless jetkvm-v3. /releases with and without prerelease, plus both redirects. For these SKUs a run accepts any pair of 4xx error responses: the SKU table says 400 Unknown SKU or 404 No release found for type mini, the code before it said 400 Unsupported SKU or 404 is not available for version. Both mean nothing for this SKU. A 200 on one side against a 4xx on the other still fails.

The accepted-deviation check now returns its reason, so the report says which rule fired instead of one fixed string.

Run against staging (dev at 2dbc67b) versus production:

cases: 216   pass: 206   accept: 10   fail: 0

All 10 accepted are the extra-SKU cases. All 24 range cases pass outright.


Note

Low Risk
Changes only affect the release comparison shell script and its acceptance rules; no production API or runtime behavior.

Overview
scripts/compare-releases.sh grows local-vs-production release API comparison from ~180 to 216 cases, targeting version ranges, older constraints, and SKUs that legitimately differ during the SKU-table rollout.

Range / older-version cases (24): From live stable appVersion / systemVersion, the script derives caret (^major.minor.0) and less-than (<stable) constraints and hits GET /releases per device and default SKU, one version axis at a time—including paths into pre-skus/ layout.

EXTRA_SKUS (default: Mini ethernet/wireless + jetkvm-v3, overridable via env): Adds 12 requests across /releases and both latest redirects. is_accepted_deviation treats matching 4xx on both sides as accepted when the SKU is in that list (status/message may differ between SKU table and legacy checks). Accepted rules now print their reason in the report instead of a single hard-coded string.

Comparison helpers: Another 404 message pattern for “no release found” is canonicalized like existing no-compat errors; TOTAL_CASES and usage docs document the new env var.

Reviewed by Cursor Bugbot for commit 8848592. Bugbot is set up for automated code reviews on this repo. Configure here.

The comparison only requested the live baseline versions for the two
registered JetKVM SKUs, so the pre-skus/ layout, semver ranges and the
SKU table's handling of other SKUs were never exercised.

Add, per device and default SKU, a caret range and a "<stable" range on
each version axis, which reach the newest older release. Add EXTRA_SKUS
(both Mini variants and one unregistered SKU) on /releases and both
redirects, accepting any pair of 4xx error responses for them: the SKU
table and the code before it refuse those SKUs with different status
and wording, and a 200 on either side still fails.

The accepted-deviation check returns its reason so the report names the
rule that fired.
@adamshiervani

Copy link
Copy Markdown
Contributor Author

bugbot run

@adamshiervani
adamshiervani marked this pull request as ready for review September 18, 2026 20:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T20:34:47.220843Z 8848592 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@adamshiervani
adamshiervani merged commit fde6e3a into dev Sep 18, 2026
3 checks passed
@adamshiervani
adamshiervani deleted the chore/compare-releases-coverage branch September 18, 2026 20:32
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.

1 participant