Skip to content

fix: prevent Emulator archive dates from masking version rollback - #97

Merged
inferjay merged 2 commits into
masterfrom
fix/emulator-numeric-latest
Oct 8, 2026
Merged

inferjay merged 2 commits into
masterfrom
fix/emulator-numeric-latest

Conversation

@inferjay

@inferjay inferjay commented Oct 8, 2026

Copy link
Copy Markdown
Owner

PR #96 introduces an official archive entry for Canary 37.3.1 dated Oct 07, after Canary 37.3.3 dated Oct 06. The updater preserves archive order for rendering/reporting; its existing date-first key only guards transitions. This makes a lower Canary revision appear as latest and permits a newer date to hide a downgrade.

This change sorts only Emulator entries by numeric revision (date/name break ties), preserving every validated entry and its official dates/download metadata. Rollback checks compare maximum numeric revisions within every previously present channel, including unsorted legacy pages; loss of a channel also fails closed. Studio ordering, download validation, Repository XML policies, generated markers, write allowlist, and review-PR workflow remain intact. Numeric revision is the site's latest-version policy; archive dates are metadata, not an installation-upgrade order. Existing Emulator history will be reordered under that policy.

Validation: 23 offline tests pass, including an official two-release fixture, 37.3.10 vs 37.3.9, channel loss/regression hidden by a newer stable, unsorted old pages, date corrections, generated homepage/archive order, no-change reruns, and zero page writes on rollback. A check against PR #96 using downloaded official Studio/Emulator/XML snapshots retains all 217 Emulator entries, reports 37.3.3 as latest, and changes only android-emulator.html/index.html.

PR #96 audit (2026-10-08 UTC)

File Bytes SHA-256
emulator-linux_x64-16373887.zip 353795619 e8f46e19b8dedad03f2387caa2676a6d9b0ddbb3db850202167346da75098260
emulator-darwin_x64-16373887.zip 492796833 903400cabc3d684c8a7d463524990e508412de849a78a00772c22e865d0241e6
emulator-darwin_aarch64-16373887.zip 419849447 9d0f6ae4f27a886d947098bb6f5f3148a3f2217ce4a58cb81dbec0222da68d21
emulator-windows_x64-16373887.zip 459169650 b294385071f0dad738308b91c60f605c4a817c617352136a0b5625e1f800e359
emulator-linux_x64-16489710.zip 353959232 a0da0fa20903a69ae52ab501f30fc5c768dcce31434cd2f55d52addc1a2c0495
emulator-darwin_x64-16489710.zip 493027673 1829806279af5365812cc2d22c9d292a535b2157c99575378d2e8e6ede2704b5
emulator-darwin_aarch64-16489710.zip 420070680 c2efd240c708f7f900a100d398faa606cc96ff1b1932805df78b8c4cc272fdd4
emulator-windows_x64-16489710.zip 459469167 b9c90996c4ebca457e3e5dfd61ed2c74227a6f7ffc3a382db5ced8d37da15cbe

Recommendation: hold PR #96 at 9116ea2. Its download data is valid, but its latest-version presentation/report is misleading. Review/merge this independent script fix first, then regenerate the update PR and review the corrected ordering/report. This PR does not merge or modify #96 and does not change scheduling.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-10-08T09:23:40.400876Z 3513e1b PR opened
ℹ️ 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.

@inferjay
inferjay merged commit 7905790 into master Oct 8, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3513e1bfc3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Archive insertion dates are not monotonic with Emulator revisions
# (37.3.1 was listed after 37.3.3). Keep every validated entry, but
# use numeric revision for pages, summaries and channel selection.
unique.sort(key=_emulator_order_key, reverse=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid exceeding the workflow's diff-size guard

On the first run against the existing source/date-ordered gh-pages archive, sorting the entire Emulator history rewrites most historical blocks rather than only correcting the latest entries. Using tests/fixtures/emulator-frame.html to compare the prior rendered order with this order produces 1,023 additions plus 1,023 deletions for android-emulator.html alone, so the subsequent Fail if the update escaped its allowlist step in .github/workflows/update-android-downloads.yml rejects the change because it caps the combined diff at 2,000 lines; the workflow therefore never reaches PR creation. Limit numeric ordering to latest-version selection or coordinate this migration with the workflow guard.

Useful? React with 👍 / 👎.

@inferjay
inferjay deleted the fix/emulator-numeric-latest branch October 9, 2026 07:52
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