Skip to content

test: CI stays the exact-pin authority for Bun while local gates run one Bun per machine - #451

Merged
Blind-Striker merged 1 commit into
masterfrom
test/bun-mismatch-ci-guard
Oct 17, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
test/bun-mismatch-ci-guard

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

What

The maintainer's rule is now one Bun per machine. Every machine runs Bun 1.4.3 in ~/.bun, while the pinned upstream (external/opencode/package.json) names bun@1.4.2.

Local gates therefore run on the machine's Bun through the existing OPENCODE_SDK_TESTS_BUN_MISMATCH=allow switch, and their results are local evidence only. CI stays the exact-pin authority. This PR adds a guard that keeps it so, and updates every piece of canon and every message that still told a host to put the pinned Bun first on PATH.

The change

  • Guard: RepositoryGates/CiPinnedBunTests.
    • Ci_Should_Never_Set_The_Bun_Mismatch_Switch: no file under .github/ mentions the switch. The scanned set is asserted non-empty.
    • Ci_Should_Install_The_Bun_The_Pinned_Checkout_Names: setup-pinned-bun keeps bun-version-file: external/opencode/package.json.
  • Canon.
    • quality-gates.md: "a host the maintainer has named" becomes the one-Bun-per-machine rule. The switch is set per command and never as a default, and its result is local evidence only. CI never sets it and is the exact-pin authority. The clone-gate paragraph says jscpd installs with the machine's Bun.
    • developing-on-windows.md: "the pinned Bun goes first on PATH" becomes "a workstation keeps one Bun and uses the switch".
  • Messages.
    • PinnedServerPrerequisites: the version refusal no longer says "Put bun X first on PATH", which would mean installing a second Bun. It now names the switch. The missing-install refusal drops "with the pinned bun".
    • CloneDetector: its not-installed error and its summary say the machine's Bun, as does tools/jscpd/package.json's description.
    • A grep of tools/ and docs/ finds no "first on PATH" or "pinned Bun first" advice left.

Evidence that Bun 1.4.3 behaves like the pin

These runs were made on dev-01, which has only Bun 1.4.3, with the switch on, at RT-E2 C's head 656db84f for #442's investigation (#447):

  • Launcher namespace on net10.0: 166 passed. The 4 failures were environmental: the service fixture was not built.
  • Launcher namespace on net11.0: 170 of 170.
  • All of OpenCode.Sdk.Tests on net11.0, run alone: 2798 of 2800. The 2 failures were environmental: the netstandard2.0 and net472 assets were not built.
  • CI's exact parallel command, all modules: OpenCode.Sdk.Tests 2800 of 2800 on net10.0 and on net11.0. These are the pinned-server simulation and live rows.

No row behaved differently from the 1.4.2 runs.

Proof

  • Red proofs for the guard rows. Appending the variable to ci.yml turns the first row red, and it names .github\workflows\ci.yml. Replacing bun-version-file with bun-version: 1.4.3 turns the second row red. Both files were restored.
  • The new refusal assertion. FindAsync_Should_Name_Both_Versions_When_The_Bun_On_Path_Is_Not_The_Pinned_One gains "names the switch". Against the old message, PinnedServerPrerequisitesTests is 1 failed of 15; with the new message it is 15 of 15 on net10.0 and on net472.
  • Checks. Whole-solution Release build: 0 warnings, 0 errors. The whole OpenCode.Sdk.Tools.Tests project: 2045 of 2045. verify-clones: 0 new. Slopwatch: 0. Format: clean.
  • Local check: GATE PASS on eb004b16 (master 3f90dc7e): all 8 steps, and 10,514 tests with 0 failed.

Follow-ups


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…one Bun per machine

The maintainer's rule is one Bun per machine, so a local gate host runs its
own Bun with the mismatch switch and its result is local evidence only. A
repository gate keeps CI installing the Bun the pinned checkout names and
never setting the switch.
@Blind-Striker
Blind-Striker added this pull request to the merge queue Oct 17, 2026
Merged via the queue into master with commit 1945796 Oct 17, 2026
12 checks passed
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