Skip to content

test: isolate historical hourly build version inputs - #23274

Closed
OrcaWin wants to merge 4 commits into
mainfrom
ci/fix-hourly-version-fixture
Closed

OrcaWin wants to merge 4 commits into
mainfrom
ci/fix-hourly-version-fixture

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

A historical hourly-build test started failing when the repository version advanced past its fixture. Pin the historical package input so releases cannot change that test's result.

What Changed

The test supplies package version 1.4.201 for its historical unpublished-release scenario and retains the exact 1.4.203 version and build-number assertions. A second case verifies that package version 1.4.214 remains the minimum even when published tags are older.

Why

The production calculation correctly treats the package version as a minimum. Updating the expected historical result on every release would lose the original regression coverage. The existing build-identity options now accept an explicit package version; ordinary callers still read package.json.

Linked Issue

None. Found in current CI on #23054, #23062, and #23270.

Visual Proof

N/A — test input isolation only.

Testing

  • Reproduced the original exact version mismatch on package 1.4.214.
  • All 28 hourly-build and version-selection tests pass with ORCA_BACKGROUND_LAUNCH=1.
  • Focused lint, the dedicated anti-slop check, formatting, and every changed-code quality scan pass.

Review

Both cases call the actual build-identity function with explicit package versions. Omitted input still reads package.json, including its existing failure when the file is missing. No module mocks or relaxed assertions are used.

Agent skill upstream boundary

  • Not applicable.

Notes

Existing build-command behavior, platform support, SSH, and workspace handling are unchanged. No application was launched.

Checklist

  • Focused change with before/after, mechanism, and rationale.
  • Visual proof is not applicable.
  • Self-reviewed; original failure reproduced and corrected locally.
  • Focused tests and code-quality checks pass; CI covers the final branch.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 7394fda4-b19b-46c4-b482-528df4a9be42

📥 Commits

Reviewing files that changed from the base of the PR and between f7abecd and 8864259.

📒 Files selected for processing (2)
  • config/scripts/hourly-build-version.mjs
  • config/scripts/hourly-build-version.test.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • getHourlyBuildIdentity gains an optional packageVersion seam — config/scripts/hourly-build-version.mjs:82 now accepts { packageVersion, publishedVersions, releaseNames } and falls back to reading package.json only when it is omitted, so the CLI entry and every ordinary caller keep their exact behavior.
  • Historical tests inject the version instead of mocking node:fs — config/scripts/hourly-build-version.test.mjs:136,154 supply packageVersion: '1.4.201' and '1.4.214', removing the partial readFileSync mock and the coupling to the repo's drifting version.
  • New package-as-floor case — config/scripts/hourly-build-version.test.mjs:154 pins that a newer package version stays the hourly base even when the published tags are older, asserting both version and buildNumber exactly.

The seam mirrors the injection style already used in this module family (resolveDevChannelBaseVersion(packageVersion, …), readPublishedVersionsFromEnv(value)), and the first case is genuinely discriminating: with the injection removed the real package.json (1.4.214) would change the expected 1.4.203, so the test would fail rather than silently pass. I ran the focused suite at head — 17 tests pass.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

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