-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): the invisible-character gate never matched anything #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,38 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| name: npm/bun Blocker | ||
| on: [push, pull_request] | ||
| # | ||
| # Authored replacement, 2026-08-28. The previous file contained a literal | ||
| # backspace byte (0x08) inside a regex, which made the YAML unloadable - so | ||
| # this workflow NEVER RAN in its entire history, while reporting nothing. | ||
| # Removing the byte exposed further structural errors, so it was rewritten | ||
| # against the corrected estate template rather than patched. | ||
| name: npm/pnpm/yarn Blocker | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
|
||
| - name: Check for npm/bun usage in new files | ||
| - uses: actions/checkout@v7.0.1 | ||
| - name: Block npm/pnpm/yarn lockfiles | ||
| run: | | ||
| # Check for new bun.lockb files | ||
| NEW_BUN=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E 'bun\.lockb$' || true) | ||
|
|
||
| # Check for npm scripts calling npm/bun in new or modified files | ||
| NPM_CALLS=$(git diff HEAD~1 2>/dev/null | grep -E '^\+.*(npm|bun)\s+(run|install|start|test|build)' | grep -v '#' || true) | ||
|
|
||
| ERRORS="" | ||
|
|
||
| if [ -n "$NEW_BUN" ]; then | ||
| ERRORS="${ERRORS}New bun.lockb detected. Use Deno instead. | ||
| ${NEW_BUN} | ||
| " | ||
| fi | ||
|
|
||
| if [ -n "$NPM_CALLS" ]; then | ||
| ERRORS="${ERRORS}npm/bun commands in new code. Use Deno tasks instead. | ||
| ${NPM_CALLS} | ||
| " | ||
| fi | ||
|
|
||
| if [ -n "$ERRORS" ]; then | ||
| echo -e "$ERRORS" | ||
| echo "" | ||
| echo "Per language policy, use Deno instead of npm/bun for:" | ||
| echo " - Package management: deno.json imports" | ||
| echo " - Task running: deno task <name>" | ||
| echo " - Scripts: deno run script.ts" | ||
| # Bun is tier 1 (owner ruling 2026-08-26): package.json + bun.lock are | ||
| # EXPECTED. Only npm/pnpm/yarn lockfiles are rejected. .npmrc is | ||
| # allowed - Bun reads it for private-registry auth. | ||
| if [ -f "package-lock.json" ] || [ -f "pnpm-lock.yaml" ] || [ -f "yarn.lock" ]; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
find . -path './.git' -prune -o -type f \
\( -name package-lock.json -o -name pnpm-lock.yaml -o -name yarn.lock \) \
-print
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
mkdir -p "$tmp/rescript-ecosystem/packages/tooling/evangeliser"
touch "$tmp/rescript-ecosystem/packages/tooling/evangeliser/package-lock.json"
(
cd "$tmp"
if [ -f package-lock.json ] || [ -f pnpm-lock.yaml ] || [ -f yarn.lock ]; then
exit 1
fi
)
printf '%s\n' 'The current root-only condition misses a nested lockfile.'Repository: hyperpolymath/developer-ecosystem Length of output: 229 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-developer-ecosystem-676f233f \
-type f -name '*.md' -print
printf '%s\n' '--- workflow ---'
cat -n rescript-ecosystem/packages/tooling/evangeliser/.github/workflows/npm-bun-blocker.yml
printf '%s\n' '--- package policy references ---'
rg -n -C 4 'npm-bun-blocker|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|working-directory|npm/pnpm/yarn Blocker' \
rescript-ecosystem/packages/tooling/evangeliser/config.ncl \
rescript-ecosystem/packages/tooling/evangeliser/SECURITY.adoc \
rescript-ecosystem/packages/tooling/evangeliser/.github 2>/dev/null || trueRepository: hyperpolymath/developer-ecosystem Length of output: 24027 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- applicable repository convention ---'
cat -n /tmp/coderabbit-repo-knowledge/hyperpolymath-developer-ecosystem-676f233f/conventions/rescript-ecosystem-packages-tooling-evangeliser.md
printf '%s\n' '--- scoped lockfiles ---'
find rescript-ecosystem/packages/tooling/evangeliser -type f \
\( -name package-lock.json -o -name pnpm-lock.yaml -o -name yarn.lock \) -print
printf '%s\n' '--- package and required-check context ---'
sed -n '1,90p' rescript-ecosystem/packages/tooling/evangeliser/config.ncl
find rescript-ecosystem/packages/tooling/evangeliser -maxdepth 2 -type f \
\( -name package.json -o -name bun.lock -o -name bun.lockb \) -printRepository: hyperpolymath/developer-ecosystem Length of output: 4390 Scan all protected paths for prohibited lockfiles. The 🤖 Prompt for AI Agents |
||
| echo "❌ npm/pnpm/yarn artifacts detected. Use Bun (package.json + bun.lock) instead." | ||
|
Comment on lines
+31
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Reconcile the documented lockfile policy.
🤖 Prompt for AI Agents |
||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Deno policy enforced (no new npm/bun usage)" | ||
|
|
||
| - name: Verify deno.json exists | ||
| run: | | ||
| if [ ! -f "deno.json" ]; then | ||
| echo "Warning: deno.json not found" | ||
| echo "Consider adding deno.json for Deno configuration" | ||
| else | ||
| echo "deno.json found" | ||
| fi | ||
| echo "✅ No npm/pnpm/yarn violations" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Remove U+202F from both bidi-control ranges.
The range currently includes U+202F, a legitimate NARROW NO-BREAK SPACE. This can produce false positives for valid documentation. (unicode.org)
.github/workflows/dogfood-gate.yml#L127-L127: change\x{202a}-\x{202f}to\x{202a}-\x{202e}.rescript-ecosystem/idaptik-rescript13-staging/.github/workflows/dogfood-gate.yml#L115-L115: change\x{202a}-\x{202f}to\x{202a}-\x{202e}.📍 Affects 2 files
.github/workflows/dogfood-gate.yml#L127-L127(this comment)rescript-ecosystem/idaptik-rescript13-staging/.github/workflows/dogfood-gate.yml#L115-L115🤖 Prompt for AI Agents
Source: MCP tools