Skip to content

Commit 1fed8ed

Browse files
claudehyperpolymath
authored andcommitted
fix(ci): make the LSP/DAP/BSP gate real + policy-compliant
The "ABI Specification Check (Idris2)" job never ran Idris2 — it only grepped, and the grep matched each abi/README.adoc's own "Zero believe_me..." prose, so the gate red-flagged every run (it broke #196's CI). The Zig install curled ziglang.org/builds/...0.15.2 (the nightly dir, not releases) and died. The panel check used python3 against the repo's no-Python policy. - abi-check: scope the banned-axiom grep to *.idr (no more README false positive); the full idris2 --check of every ABI is proofs.yml's job. - ffi-build: replace the dead curl with goto-bus-stop/setup-zig at .tool-versions' 0.15.1, matching e2e.yml. - panel-validation: python3 json.tool/json.load -> jq (no-Python policy). - add timeout-minutes to all 4 jobs + a concurrency group. Resolves several #199 items. Real proof verification lives in proofs.yml. https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa
1 parent 582fbb4 commit 1fed8ed

1 file changed

Lines changed: 29 additions & 13 deletions

File tree

.github/workflows/lsp-dap-bsp.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ on:
2121

2222
permissions: read-all
2323

24+
concurrency:
25+
group: lsp-dap-bsp-${{ github.ref }}
26+
cancel-in-progress: true
27+
2428
jobs:
2529
abi-check:
2630
name: ABI Specification Check (Idris2)
2731
runs-on: ubuntu-latest
32+
timeout-minutes: 10
2833
steps:
2934
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3035
- name: Validate ABI modules exist
@@ -43,9 +48,13 @@ jobs:
4348
echo "ERROR: No .idr files in $abi_dir"
4449
exit 1
4550
fi
46-
# Check for banned patterns
47-
if grep -r 'believe_me\|assert_total\|sorry' "$abi_dir" 2>/dev/null; then
48-
echo "ERROR: Banned pattern found in $abi_dir"
51+
# Scan ONLY .idr sources (not README/docs) for axioms in leaf
52+
# cartridge proofs. Previously a recursive grep matched the abi/
53+
# README's own "Zero believe_me..." prose — a false positive that
54+
# red-flagged every run. The full idris2 --check of every ABI is
55+
# proofs.yml's job (this is just a fast leaf-axiom guard).
56+
if grep -rn --include='*.idr' 'believe_me\|assert_total\|sorry' "$abi_dir" 2>/dev/null; then
57+
echo "ERROR: Banned axiom found in $abi_dir/*.idr (leaf proofs must be axiom-free)"
4958
exit 1
5059
fi
5160
echo " No banned patterns — OK"
@@ -54,12 +63,17 @@ jobs:
5463
ffi-build:
5564
name: FFI Build & Test (Zig)
5665
runs-on: ubuntu-latest
66+
timeout-minutes: 15
5767
steps:
5868
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59-
- name: Install Zig 0.15.2
60-
run: |
61-
curl -L https://ziglang.org/builds/zig-linux-x86_64-0.15.2.tar.xz | tar -xJ
62-
echo "$PWD/zig-linux-x86_64-0.15.2" >> "$GITHUB_PATH"
69+
# The old step curled ziglang.org/builds/...0.15.2... — that path is the
70+
# nightly dir, not release downloads, so it returned an error page and
71+
# `tar` died ("File format not recognized"). Use the pinned action +
72+
# .tool-versions' canonical 0.15.1, matching e2e.yml.
73+
- name: Install Zig
74+
uses: goto-bus-stop/setup-zig@9566bb3e8749893055694249726756f25e099b30 # v2
75+
with:
76+
version: 0.15.1
6377
- name: Build LSP/DAP/BSP cartridge FFI
6478
run: |
6579
for cart in lsp-mcp dap-mcp bsp-mcp; do
@@ -94,8 +108,12 @@ jobs:
94108
panel-validation:
95109
name: Panel Manifest Validation
96110
runs-on: ubuntu-latest
111+
timeout-minutes: 10
97112
steps:
98113
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
114+
# jq (pre-installed on ubuntu-latest) — the repo's no-Python policy
115+
# (dogfood-gate) bans the previous json.tool/json.load approach.
116+
# Same checks: valid JSON + required fields + panel count.
99117
- name: Validate LSP/DAP/BSP panel manifests
100118
run: |
101119
for cart in lsp-mcp dap-mcp bsp-mcp; do
@@ -106,25 +124,23 @@ jobs:
106124
exit 1
107125
fi
108126
# Validate JSON
109-
python3 -m json.tool "$manifest" > /dev/null 2>&1 || {
110-
echo "ERROR: Invalid JSON in $manifest"
111-
exit 1
112-
}
127+
jq empty "$manifest" 2>/dev/null || { echo "ERROR: Invalid JSON in $manifest"; exit 1; }
113128
# Check required fields
114129
for field in cartridge domain version panels; do
115-
if ! python3 -c "import json; d=json.load(open('$manifest')); assert '$field' in d" 2>/dev/null; then
130+
if ! jq -e --arg f "$field" 'has($f)' "$manifest" >/dev/null 2>&1; then
116131
echo "ERROR: Missing field '$field' in $manifest"
117132
exit 1
118133
fi
119134
done
120135
# Count panels
121-
panel_count=$(python3 -c "import json; print(len(json.load(open('$manifest'))['panels']))")
136+
panel_count=$(jq '.panels | length' "$manifest")
122137
echo " Valid JSON, $panel_count panels defined"
123138
done
124139
125140
completeness:
126141
name: Cartridge Completeness Check
127142
runs-on: ubuntu-latest
143+
timeout-minutes: 10
128144
needs: [abi-check, ffi-build, panel-validation]
129145
steps:
130146
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

0 commit comments

Comments
 (0)