Skip to content

ci: pin bun to 1.3.14 — latest silently made CI a coin flip - #71

Closed
ivndev001 wants to merge 1 commit into
mainfrom
ci/pin-bun
Closed

ivndev001 wants to merge 1 commit into
mainfrom
ci/pin-bun

Conversation

@ivndev001

@ivndev001 ivndev001 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What

Pins bun-version to 1.3.14 in ci.yml and release.yml, replacing latest.

Why

latest means the gate can change with no commit and no review. It did.

a persona whose credentials are wrong fails the run instead of opening it signed out (src/services/session-builder.test.ts, ceiling STORY_TIMEOUT_MS = 30_000), duration from each run's own log:

run commit bun duration result
31238151616 d8affa0b 1.3.14 1,962 ms pass
33641952951 9c5a7541 1.4.x 30,018 ms FAIL
33647731476 06ec3a07 1.4.x 30,027 ms FAIL
33963265619 e032d666 1.4.x 29,955 ms pass
33964715003 45abb1a8 1.4.2 29,772 ms pass
33965471840 77081f8d 1.4.2 30,016 ms FAIL

Plus five more failures on 77081f8d from re-runs, all 30,0xx ms.

Every 1.3.x run is about 2 seconds. Every 1.4.x run is between 29.6 and 30.0. The passes win by 30 to 420 ms under the ceiling, which is noise, not health — so re-running until green merges a suite sitting milliseconds from the edge. Two of eight recent attempts passed, main is red, and release PR #69 has burned nine CI runs without merging.

The break is the toolchain, not a commit. 9c5a7541, the first slow run, is a config-loader branch that cannot make a login test 15x slower, and the two commits blamed since are both exonerated by the same table (details in #70).

release.yml is pinned to match because it runs bun run build and publishes the result with no test step — a toolchain regression there reaches npm with nothing in between.

Changes

  • .github/workflows/ci.yml: bun-version: latest to 1.3.14, with a comment naming the measurement, the run id, and the condition for bumping it.
  • .github/workflows/release.yml: same pin, pointing at that note.

Verification

The proof is this PR's own CI run. If the diagnosis is right, a persona whose credentials are wrong returns to roughly 2 seconds instead of landing within 400 ms of its ceiling. A green that still takes 29-plus seconds would mean the pin is not the fix and this should not merge.

actionlint reports only the pre-existing unknown-label warning for the Blacksmith runner, unchanged by this diff. Both files parse as YAML.

What this deliberately does not do

  • It does not raise STORY_TIMEOUT_MS and does not skip or quarantine the story. Either would go green over a path that still takes 30 seconds, converting a visible regression into an invisible one.
  • It does not diagnose what in bun 1.4.x is slow. That stays open as ci: bun-version: latest silently took CI from 2s to 30s on a 30s ceiling — main is red and every PR is a coin flip #70, and it matters beyond CI: it is a 15x slowdown on the product's login path on that runner, not only in a test.
  • It does not pin npm install -g npm@latest in release.yml. Trusted publishing needs npm >= 11.5.1 and that line exists to satisfy it; narrowing it is a separate decision.

Closes #70 only in part — the pin, not the diagnosis. Leaving #70 open.


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

Summary by CodeRabbit

  • Chores
    • Standardized automated checks and release builds on Bun version 1.3.14.
    • Improved consistency between testing and release environments.
    • Documented toolchain compatibility considerations for future updates.

bun-version: latest let the gate change with no commit and no review, and it
did. bun 1.4.x takes `a persona whose credentials are wrong`
(session-builder.test.ts, ceiling STORY_TIMEOUT_MS = 30_000) from ~2s to ~30s.
Every 1.4.x run lands between 29.6s and 30.0s, so a pass wins by 30-420ms and
is noise rather than health: 2 of 8 recent attempts passed, main is red, and
release PR #69 burned nine runs without a merge.

1.3.14 is the last version measured fast here, at 1,962ms on run 31238151616.
The break is the toolchain and not a commit: every 1.3.x run is ~2s and every
1.4.x run is ~30s, across unrelated branches.

release.yml is pinned to match. That job runs `bun run build` and publishes the
result with no test step, so a toolchain regression there reaches npm with
nothing in between.

This pins the version; it does not diagnose the 1.4.x slowdown, which stays
open as #70. Deliberately NOT done: raising STORY_TIMEOUT_MS or quarantining
the story, either of which would go green over a path that still takes 30
seconds and turn a visible 15x regression into an invisible one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: c149aba1-9b19-4f20-b6fd-e680a3f3eacb

📥 Commits

Reviewing files that changed from the base of the PR and between 06ec3a0 and 77c6c28.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: bun (lint + typecheck + test)
🧰 Additional context used
🪛 zizmor (1.29.0)
.github/workflows/release.yml

[error] 45-45: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default

(cache-poisoning)

.github/workflows/ci.yml

[warning] 19-28: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 13-79: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

🔇 Additional comments (3)
.github/workflows/ci.yml (1)

21-31: LGTM!

.github/workflows/release.yml (2)

41-44: LGTM!


45-45: 🔒 Security & Privacy

No cache-boundary change is required. setup-bun@v2 enables caching by default, but pull-request caches are scoped to the pull-request merge ref and cannot be restored by this release workflow. This workflow runs only for published releases or manual dispatches.


📝 Walkthrough

Walkthrough

The CI and release workflows replace Bun latest with Bun 1.3.14. The CI workflow documents the 1.4.x slowdown and controlled upgrade criteria. The release workflow documents toolchain alignment.

Changes

Bun toolchain pinning

Layer / File(s) Summary
Pin Bun in CI and release workflows
.github/workflows/ci.yml, .github/workflows/release.yml
Both workflows use Bun 1.3.14 instead of latest. CI comments document the 1.4.x timeout behavior and upgrade criteria. Release comments document toolchain alignment.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 77c6c

CI and release now use the known-good Bun 1.3.14 toolchain, restoring deterministic behavior without changing test timeouts or release publishing configuration.

Suggested reviewers: sebyx07

Poem

A rabbit pins Bun in place,
CI runs with steady pace,
Releases follow the same trail,
Version drift can no longer sail,
Green checks bloom across the space.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The workflows pin Bun to exact version 1.3.14, preserve STORY_TIMEOUT_MS, and do not skip or quarantine the affected test. The provided context does not verify ten consecutive green CI runs or confirm… Provide evidence of ten consecutive green main-branch runs with the persona test well below its timeout. Confirm that issue #70 tracks the Bun 1.4.x slowdown investigation as a follow-up.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: pinning Bun to version 1.3.14 to prevent nondeterministic CI behavior.
Out of Scope Changes check ✅ Passed The changes are limited to pinning Bun in the CI and release workflows and documenting the related toolchain decision. No unrelated code or configuration changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The workflows pin Bun to exact version 1.3.14, preserve STORY_TIMEOUT_MS, and do not skip or quarantine the affected test. The provided context does not verify ten consecutive green CI runs or confirm the follow-up tracking for the Bun 1.4.x slowdown.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pin-bun

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

@ivndev001

Copy link
Copy Markdown
Contributor Author

Holding this rather than merging, and correcting what I claimed in the description.

The pin does what it says: a persona whose credentials are wrong went from ~30 s to 1,945 ms and 2,156 ms across two runs on 1.3.14, and the suite went from ~45 s to ~15 s. That part is solid.

But it does not make CI reliably green. On the second pinned run, the other persona story — a persona signs the run in before the first step, ~800 ms in every previous run — took 30,008 ms. So there is a second, rarer hang that is not a bun-version problem, and this PR would land under a promise it does not keep. Full table in #70.

Worth landing on its own merits once someone decides that, but it is not the unblock I opened it as.

@ivndev001

Copy link
Copy Markdown
Contributor Author

Closing. The pin is the wrong fix and the evidence is now in #70.

Pinning to 1.3.14 does remove the bun 1.4.x hang in a persona whose credentials are wrong — that part held up, 1,945 ms and 2,045 ms across runs. But on 1.3.14 the OTHER story, a persona signs the run in before the first step, hangs at 30,008 ms and 30,010 ms with no margin, 2 of 2 attempts. On 1.4.2 that story is ~800 ms and the wrong-cred hang at least clears its ceiling sometimes, 2 of 8.

So this trades an occasional red for a reliable one. Keeping latest is the better of two bad options until the login-path fragility itself is fixed.

The isolation experiment behind that conclusion was #72, now closed: pre-dual-read tree on bun 1.4.2 still hangs, which exonerates the dual-read for the 1.4.x half and implicates it for the 1.3.14 half.

@ivndev001 ivndev001 closed this Sep 5, 2026
@ivndev001
ivndev001 deleted the ci/pin-bun branch September 5, 2026 13:41
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.

ci: bun-version: latest silently took CI from 2s to 30s on a 30s ceiling — main is red and every PR is a coin flip

1 participant