Skip to content

fix(ci): Bun-first runtime policy; retire two gates that enforced the opposite - #33

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/runtime-policy-bun-first
Jul 29, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/runtime-policy-bun-first

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Authority: standards/LANGUAGE-POLICY.adoc §1 — Bun > Deno > pnpm > npm.

Replaced npm-bun-blocker.yml → runtime-policy.yml. The old gate failed any build carrying bun.lockb with "Use Deno instead" — blocking the new first choice and mandating the second. It was in 55 repos, and zero repos had adopted Bun, because doing so would have turned them red.

The replacement fails on something real — mixed toolchains (two package managers' lockfiles, i.e. two dependency graphs that can disagree) — and reports the tier in use otherwise. npm is tier 4 but permitted, so it warns rather than blocks. Red-teamed both ways: none/bun/deno/npm alone → exit 0; bun+npm and deno+pnpm → exit 1.

Deleted ts-blocker.yml. It enforced "use ReScript instead" — ReScript is itself retired — and it could not fail: git diff HEAD~1 on a depth-1 checkout, error to /dev/null, || true. 20/20 runs green, never once fired.

Neither is a required status check anywhere, so this creates no phantom context.

🤖 Generated with Claude Code

… opposite

Authority: standards LANGUAGE-POLICY.adoc §1 (added 2026-07-29) --
Bun > Deno > pnpm > npm.

REPLACED npm-bun-blocker.yml -> runtime-policy.yml
  The old gate failed any build carrying bun.lockb with 'npm/bun artifacts
  detected. Use Deno instead.' It blocked what is now the FIRST-choice runtime
  and mandated the second. Present in 55 repos; zero repos had adopted Bun,
  because adopting it would have turned them red.

  The replacement fails on something real -- MIXED TOOLCHAINS, two package
  managers' lockfiles in one repo, i.e. two dependency graphs that can disagree
  -- and reports the tier in use otherwise. npm is tier 4 but PERMITTED, so it
  warns rather than blocks.

  Red-teamed both directions before shipping: none/bun/deno/npm alone -> exit 0;
  bun+npm and deno+pnpm -> exit 1.

DELETED ts-blocker.yml
  It enforced 'use ReScript instead'. ReScript is itself retired estate-wide, so
  it policed a dead alternative. Worse, it could not fail: it diffed
  git diff HEAD~1 on a depth-1 checkout, where HEAD~1 does not exist, sent the
  error to /dev/null and used || true -- so the match set was ALWAYS empty.
  Measured 20/20 runs green; it has never once fired.

Neither workflow is a required status check in any ruleset, so removing them
creates no phantom context.

Co-Authored-By: Claude Opus 5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit b488d8f into main Jul 29, 2026
31 of 36 checks passed
@hyperpolymath
hyperpolymath deleted the fix/runtime-policy-bun-first branch July 29, 2026 05:55
Comment thread .github/workflows/runtime-policy.yml Resolved
Comment thread .github/workflows/runtime-policy.yml Resolved
Comment thread .github/workflows/runtime-policy.yml Resolved
@gitar-bot

gitar-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Note

Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime.
Learn more

Code Review ✅ Approved 3 resolved / 3 findings

Adopts a Bun-first runtime policy by replacing the npm blocker with a multi-toolchain validator and retiring the outdated ReScript gate. However, the implementation misses Yarn lockfiles and monorepo subdirectory lockfiles, and inconsistently counts Deno configuration files.

✅ 3 resolved
✅ Edge Case: Yarn lockfile not detected — escapes mixed-toolchain gate

📄 .github/workflows/runtime-policy.yml:45-49 📄 .github/workflows/runtime-policy.yml:51
The detector only counts bun, deno, pnpm and npm, but never checks for yarn.lock (nor npm-shrinkwrap.json). A repo using Yarn — or, worse, a genuinely mixed yarn.lock + package-lock.json setup — passes with exit 0, silently defeating the gate's stated purpose of catching two dependency graphs that can disagree. Add a yarn check and include it in the total, e.g. [ -f yarn.lock ] && yarn=1 || true plus total=$((bun + deno + pnpm + npm + yarn)) and a report line.

✅ Edge Case: Detection is repo-root only; monorepo subdir lockfiles missed

📄 .github/workflows/runtime-policy.yml:46-49
All [ -f ... ] tests run against the working-directory root, so lockfiles under packages/ or apps/* in a monorepo are neither reported nor counted toward mixed-toolchain detection. Given this policy is deployed across many repos, monorepos will pass regardless of their actual toolchain drift. Consider globbing/find-based detection if monorepo coverage is intended, or document the root-only limitation in the header comment.

✅ Quality: Deno counted via config files, not just lockfiles

📄 .github/workflows/runtime-policy.yml:12-13 📄 .github/workflows/runtime-policy.yml:47 📄 .github/workflows/runtime-policy.yml:64-68
The header comment defines the failure condition as "two different package managers' lockfiles," but Deno is detected via deno.json/deno.jsonc, which are config files that projects sometimes keep for tooling/tasks even when the actual package manager is npm/bun. This can produce a false-positive "mixed toolchains" failure — the exact kind of illegitimate red build this PR aims to eliminate. Either restrict Deno detection to deno.lock, or update the comment to state that Deno presence is inferred from config, not only lockfiles.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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