diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index b5e8cfd..25f4ad1 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -41,4 +41,3 @@ jobs: prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://code.claude.com/docs/en/cli-reference for available options - diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 6b15fac..eb9719e 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -47,4 +47,3 @@ jobs: # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://code.claude.com/docs/en/cli-reference for available options # claude_args: '--allowed-tools Bash(gh pr *)' - diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 33f7983..8017094 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -16,6 +16,9 @@ jobs: with: python-version: "3.12" + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y zsh + - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/docs/superpowers/evidence/ci-pipeline-and-lint-backlog-fix-2026-06-22.json b/docs/superpowers/evidence/ci-pipeline-and-lint-backlog-fix-2026-06-22.json new file mode 100644 index 0000000..63b7b9a --- /dev/null +++ b/docs/superpowers/evidence/ci-pipeline-and-lint-backlog-fix-2026-06-22.json @@ -0,0 +1,52 @@ +{ + "intent": "Fix the CI environment so it actually runs: re-enabled GitHub Actions repo-wide (was disabled, explaining why python-tests/pre-commit/Claude Code workflows had zero runs ever), then clear the pre-existing lint/test backlog the first real run surfaced.", + "scope": [ + "meta/requirements.txt (drop unused, broken pylama dependency)", + ".github/workflows/pre-commit.yml (install zsh for the zsh-syntax hook)", + ".github/workflows/claude-code-review.yml, claude.yml (trailing blank line at EOF)", + "phone_focus_mode/lib/adb_common.sh (shellcheck SC2120 dead optional-arg)", + "Non-goal: anything related to the wake_alarm gatelock migration, already committed separately" + ], + "changes": [ + "Set actions/permissions enabled=true for kuhyx/testsAndMisc via the GitHub API (was enabled:false, the actual root cause of zero CI runs)", + "Removed pylama>=8.4.0 from meta/requirements.txt: grep confirmed it is referenced nowhere in the repo, and its pytest plugin auto-loads via setuptools entry points, crashing the entire pytest-coverage pre-commit hook with ModuleNotFoundError: pkg_resources on the CI runner's newer setuptools", + "Added an 'Install system dependencies' step (apt-get install zsh) to pre-commit.yml so the zsh-syntax hook's `zsh -n` check has a binary to run, instead of failing with 'zsh: command not found'", + "Simplified _load_trusted_device_values() in adb_common.sh to drop its unused optional ${1:-...} parameter (grep confirmed it is never called with an argument anywhere, including tests), resolving shellcheck SC2120", + "Stripped the extra trailing blank line from claude-code-review.yml and claude.yml that the trailing-whitespace/end-of-file-fixer hooks had been silently flagging since CI never ran to enforce them" + ], + "verification": [ + { + "command": "gh api repos/kuhyx/testsAndMisc/actions/permissions", + "result": "pass", + "evidence": "enabled:true, allowed_actions:all (was enabled:false before the fix); confirmed by pushing an empty commit and observing 'Pre-commit checks' run for the first time ever in the repo's history" + }, + { + "command": "shellcheck --severity=warning phone_focus_mode/lib/adb_common.sh", + "result": "pass", + "evidence": "clean, no SC2120 warning" + }, + { + "command": "bash phone_focus_mode/lib/tests/test_adb_common.sh", + "result": "pass", + "evidence": "13 passed, 0 failed -- the simplified function is unchanged in behavior" + }, + { + "command": "python -m pytest (full repo suite, after removing pylama and reinstalling requirements.txt)", + "result": "pass", + "evidence": "949 passed, TOTAL coverage 100.00%" + }, + { + "command": "pre-commit run --all-files", + "result": "pass", + "evidence": "every hook passed including shellcheck and pytest-coverage, which were previously broken in CI" + } + ], + "risks": [ + "Enabling Actions repo-wide is a GitHub account/repo setting change with broader effect than just this commit -- confirmed with the user before applying via the API", + "zsh installed via apt-get in CI adds a small amount of job time; acceptable tradeoff for the zsh-syntax hook to actually function" + ], + "rollback": [ + "git revert this commit for the code/workflow changes", + "Re-disable Actions via `gh api -X PUT repos/kuhyx/testsAndMisc/actions/permissions -F enabled=false` if re-disabling is ever desired (not expected)" + ] +} diff --git a/meta/requirements.txt b/meta/requirements.txt index 2b63eaa..3a06f47 100644 --- a/meta/requirements.txt +++ b/meta/requirements.txt @@ -56,7 +56,6 @@ pycodestyle>=2.11.0 pydocstyle>=6.3.0 pyflakes>=3.2.0 pygame>=2.0 -pylama>=8.4.0 pylint>=3.0.0 pyright>=1.1.350 pytest>=8.0.0 diff --git a/phone_focus_mode/lib/adb_common.sh b/phone_focus_mode/lib/adb_common.sh index 8a9a995..c154aec 100755 --- a/phone_focus_mode/lib/adb_common.sh +++ b/phone_focus_mode/lib/adb_common.sh @@ -44,7 +44,7 @@ adb_list_serials() { } _load_trusted_device_values() { - local file_path="${1:-${TRUSTED_DEVICE_FILE}}" + local file_path="${TRUSTED_DEVICE_FILE}" local -a loaded_values=() [[ -f "${file_path}" ]] || return 1