Skip to content

Commit 3231d90

Browse files
hyperpolymathclaude
andcommitted
fix(ci): Bun-first runtime policy; retire two gates that enforced the 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 <noreply@anthropic.com>
1 parent b5c8701 commit 3231d90

3 files changed

Lines changed: 71 additions & 67 deletions

File tree

.github/workflows/npm-bun-blocker.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Runtime and package-manager policy check.
3+
#
4+
# Authority: hyperpolymath/standards LANGUAGE-POLICY.adoc §1.
5+
# Ordering: Bun (1st) > Deno (2nd) > pnpm (3rd) > npm (last resort).
6+
#
7+
# REPLACES npm-bun-blocker.yml, which failed any build carrying `bun.lockb` with
8+
# the message "npm/bun artifacts detected. Use Deno instead." That gate blocked
9+
# what is now the FIRST-choice runtime and mandated the second. It was present in
10+
# 55 repositories.
11+
#
12+
# What this fails on, deliberately:
13+
# MIXED TOOLCHAINS -- two different package managers' lockfiles in one repo.
14+
# That is real, actionable drift: two dependency graphs that can disagree.
15+
# What it does NOT fail on:
16+
# Using bun, deno, pnpm or npm. npm is LAST but PERMITTED; the check reports
17+
# the tier in use so drift is visible without blocking legitimate work.
18+
name: Runtime Policy
19+
on:
20+
push:
21+
branches: [main, master]
22+
pull_request:
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
runtime-policy:
33+
name: Runtime Policy
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
permissions:
37+
contents: read
38+
steps:
39+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40+
41+
- name: Report runtime tier and reject mixed toolchains
42+
run: |
43+
set -euo pipefail
44+
45+
bun=0; deno=0; pnpm=0; npm=0
46+
[ -f bun.lockb ] || [ -f bun.lock ] && bun=1 || true
47+
[ -f deno.lock ] || [ -f deno.json ] || [ -f deno.jsonc ] && deno=1 || true
48+
[ -f pnpm-lock.yaml ] && pnpm=1 || true
49+
[ -f package-lock.json ] && npm=1 || true
50+
51+
total=$((bun + deno + pnpm + npm))
52+
53+
if [ "$total" -eq 0 ]; then
54+
echo "::notice::No JS/TS package manager in use — nothing to check."
55+
exit 0
56+
fi
57+
58+
# Report the tier actually in use (LANGUAGE-POLICY.adoc §1).
59+
[ "$bun" -eq 1 ] && echo "Bun — tier 1 (preferred)"
60+
[ "$deno" -eq 1 ] && echo "Deno — tier 2 (accepted; existing projects are grandfathered)"
61+
[ "$pnpm" -eq 1 ] && echo "pnpm — tier 3"
62+
[ "$npm" -eq 1 ] && echo "::warning::npm lockfile present. npm is tier 4, the last resort — permitted, never preferred. See LANGUAGE-POLICY.adoc §1."
63+
64+
if [ "$total" -gt 1 ]; then
65+
echo "::error::Mixed toolchains: $total package managers have lockfiles in this repository."
66+
echo "Two dependency graphs that can disagree is real drift. Pick one — preferring the"
67+
echo "highest tier present — and delete the others' lockfiles."
68+
exit 1
69+
fi
70+
71+
echo "✅ Single package manager in use."

.github/workflows/ts-blocker.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)