Skip to content

fix: 1.32.1 — doctor.py UTF-8 su Windows (bump per far arrivare il fi… #46

fix: 1.32.1 — doctor.py UTF-8 su Windows (bump per far arrivare il fi…

fix: 1.32.1 — doctor.py UTF-8 su Windows (bump per far arrivare il fi… #46

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
# Regola imparata sul campo (2026-07-17): l'updater dei plugin confronta
# VERSIONI, non commit — un cambiamento runtime senza bump di plugin.json
# non raggiunge MAI gli utenti installati. Qui la regola diventa un check.
version-bump-guard:
name: "Version bump guard (runtime change => version bump)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Runtime changed => plugin.json version must change
run: |
BASE="${{ github.event.pull_request.base.sha || github.event.before }}"
case "$BASE" in ""|0000000000000000000000000000000000000000) BASE="";; esac
if [ -z "$BASE" ] || ! git cat-file -e "$BASE" 2>/dev/null; then
BASE=$(git rev-parse HEAD~1 2>/dev/null || echo "")
fi
if [ -z "$BASE" ]; then echo "nessuna base: skip"; exit 0; fi
python3 - "$BASE" <<'EOF'
import json, subprocess, sys
base = sys.argv[1]
RUNTIME = ("claude-context-kernel/hooks/", "claude-context-kernel/mcp/",
"claude-context-kernel/skills/", "claude-context-kernel/agents/",
"claude-context-kernel/.mcp.json")
PJ = "claude-context-kernel/.claude-plugin/plugin.json"
changed = subprocess.run(
["git", "diff", "--name-only", base, "HEAD"],
capture_output=True, text=True, check=True).stdout.split()
touched = [f for f in changed if f.startswith(RUNTIME)]
if not touched:
print("nessun file runtime toccato: ok"); sys.exit(0)
def ver(rev):
out = subprocess.run(["git", "show", f"{rev}:{PJ}"],
capture_output=True, text=True)
return json.loads(out.stdout)["version"] if out.returncode == 0 else None
vb, vh = ver(base), ver("HEAD")
if vb is None or vb != vh:
print(f"runtime toccato ({len(touched)} file), versione {vb} -> {vh}: ok")
sys.exit(0)
print(f"ERRORE: {len(touched)} file runtime modificati ma plugin.json "
f"resta {vh}. L'updater confronta versioni, non commit: senza "
f"bump questo cambiamento non raggiunge nessun utente installato.")
print("File:", *touched[:10], sep="\n ")
sys.exit(1)
EOF
python-suite:
name: "Python contract tests (${{ matrix.os }}, ${{ matrix.python }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.9", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Suite stdlib-only: niente pip install, il contratto e' subprocess
# JSON su stdin -> JSON su stdout, esattamente come nell'harness.
- name: Run suite
run: python -m unittest discover -s claude-context-kernel/tests -v
pi-bridge:
name: "Pi bridge tests (node)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Syntax check extension
run: node --check pi/extensions/context-kernel.js
- name: Run bridge tests
run: node --test pi/tests/*.test.js