Skip to content

Commit abf1451

Browse files
MTSistemiclaude
andcommitted
Quality gates: ruff + shellcheck in CI, skillfish-base package
- CI: ruff pyflakes/E9 now BLOCKING on every app (bugbear informational), shellcheck on the bash helpers (informational). Current tree: zero findings. - New package skillfish-base: hardware watchdog config + the boot freeze detector/notifier, so these protections reach every install via apt instead of living only on the build box. Built+verified in CI like the other five. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 76a9216 commit abf1451

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ jobs:
3838
esac
3939
done
4040
41+
- name: Lint (ruff — pyflakes blocking, bugbear informational)
42+
run: |
43+
pip install -q ruff
44+
PYAPPS="apps/tuner/skillfish-tuner apps/tuner/skillfish-tuner-helper \
45+
apps/hub/skillfish-hub apps/monitor/skillfish-monitor \
46+
apps/kernel-manager/skillfish-kernel-manager apps/ai-panel/skillfish-ai-panel"
47+
ruff check --select F,E9 --no-cache $PYAPPS
48+
ruff check --select B,PLE --no-cache $PYAPPS || true
49+
50+
- name: ShellCheck (informational)
51+
run: |
52+
sudo apt-get -qq install -y shellcheck >/dev/null
53+
shellcheck -S warning apps/hub/skillfish-hub-helper apps/kernel-manager/skillfish-kernel-helper \
54+
apps/ai-panel/skillfish-gtt system/usr/local/bin/skillfish-freeze-check.sh \
55+
system/usr/local/bin/skillfish-freeze-notify.sh scripts/build-debs-ci.sh || true
56+
4157
- name: apps/ vs system/ mirror drift check
4258
run: |
4359
set -e

scripts/build-debs-ci.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,20 @@ put $P 0644 system/usr/share/applications/os.skillfish.ai.desktop usr/share/appl
7070
shot $P apps/ai-panel/os.skillfish.ai.metainfo.xml
7171
ctrl $P "python3, python3-pyqt6, polkitd | policykit-1" "SkillFish AI - on-device LLM control panel"
7272

73+
P=skillfish-base
74+
put $P 0755 system/usr/local/bin/skillfish-freeze-check.sh usr/local/bin/skillfish-freeze-check.sh
75+
put $P 0755 system/usr/local/bin/skillfish-freeze-notify.sh usr/local/bin/skillfish-freeze-notify.sh
76+
put $P 0644 system/etc/systemd/system/skillfish-freeze-check.service etc/systemd/system/skillfish-freeze-check.service
77+
put $P 0644 system/etc/xdg/autostart/skillfish-freeze-notify.desktop etc/xdg/autostart/skillfish-freeze-notify.desktop
78+
put $P 0644 system/etc/modules-load.d/skillfish-watchdog.conf etc/modules-load.d/skillfish-watchdog.conf
79+
put $P 0644 system/etc/systemd/system.conf.d/10-skillfish-watchdog.conf etc/systemd/system.conf.d/10-skillfish-watchdog.conf
80+
ctrl $P "systemd, libnotify-bin" "SkillFishOS base - hardware watchdog + freeze detector"
81+
# base needs its own postinst: enable the watchdog and the freeze check
82+
printf '#!/bin/sh\nset -e\nif [ -d /run/systemd/system ]; then\n systemctl daemon-reload || true\n systemctl enable --now skillfish-freeze-check.service || true\n modprobe sp5100_tco 2>/dev/null || true\n systemctl daemon-reexec || true\nfi\nexit 0\n' > "$OUT/$P/DEBIAN/postinst"
83+
chmod 0755 "$OUT/$P/DEBIAN/postinst"
84+
7385
echo "== building =="
74-
for P in skillfish-tuner skillfish-hub skillfish-monitor skillfish-kernel-manager skillfish-ai-panel; do
86+
for P in skillfish-tuner skillfish-hub skillfish-monitor skillfish-kernel-manager skillfish-ai-panel skillfish-base; do
7587
find "$OUT/$P" -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true
7688
dpkg-deb --root-owner-group --build "$OUT/$P" "$OUT/out/${P}_${VER}_all.deb" >/dev/null
7789
done
@@ -85,4 +97,6 @@ check skillfish-tuner_${VER}_all.deb ./usr/local/bin/skillfish-tuner
8597
check skillfish-hub_${VER}_all.deb ./usr/local/bin/skillfish-hub "return None"
8698
check skillfish-kernel-manager_${VER}_all.deb ./usr/local/bin/skillfish-kernel-manager skillfish
8799
check skillfish-ai-panel_${VER}_all.deb ./usr/local/bin/skillfish-ai-panel skillfish
100+
check skillfish-base_${VER}_all.deb ./usr/local/bin/skillfish-freeze-check.sh unclean-shutdown
101+
check skillfish-tuner_${VER}_all.deb ./usr/local/bin/skillfish-tuner _silicon
88102
echo "ALL DEBS VERIFIED"

0 commit comments

Comments
 (0)