From b889a8e2d6fcfd6639b65f7e846ab0d399fe7c41 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Thu, 19 Nov 2026 18:14:56 +0100 Subject: [PATCH] Run dependency-freshness locally only Delete the dependency-freshness GitHub workflow and skip the hook in the pre-commit CI job. The marker .dep-freshness-no-workflow keeps the utils installer from re-adding it. Prune the oldest evidence artifact to stay under the 60-file cap. Co-Authored-By: Claude Opus 5.5 --- .dep-freshness-no-workflow | 2 + .github/workflows/dependency-freshness.yml | 63 ------------------- .github/workflows/pre-commit.yml | 14 +++-- .pre-commit-config.yaml | 3 +- .../dep-freshness-local-only-2026-11-19.json | 35 +++++++++++ ...firewall-workout-poke-8774-2026-10-10.json | 31 --------- meta/requirements.txt | 2 +- scripts/check_dependency_freshness.sh | 2 +- 8 files changed, 49 insertions(+), 103 deletions(-) create mode 100644 .dep-freshness-no-workflow delete mode 100644 .github/workflows/dependency-freshness.yml create mode 100644 docs/superpowers/evidence/dep-freshness-local-only-2026-11-19.json delete mode 100644 docs/superpowers/evidence/wg-firewall-workout-poke-8774-2026-10-10.json diff --git a/.dep-freshness-no-workflow b/.dep-freshness-no-workflow new file mode 100644 index 00000000..8a3ff7ed --- /dev/null +++ b/.dep-freshness-no-workflow @@ -0,0 +1,2 @@ +# Dependency freshness runs locally only (pre-commit hook); no GitHub Actions +# workflow. This marker stops the fleet installer from re-adding it. diff --git a/.github/workflows/dependency-freshness.yml b/.github/workflows/dependency-freshness.yml deleted file mode 100644 index 2c087080..00000000 --- a/.github/workflows/dependency-freshness.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: dependency freshness - -# Every dependency on its ecosystem's newest STABLE release, enforced on push -# as well as at commit time. The local pre-commit hook only sees the manifests -# in a commit and can be skipped entirely by a fresh clone that never ran -# `pre-commit install`; this runs `--all` over the whole repo. -# -# `--strict` is CI-only. Offline the gate degrades to its cached answer and -# passes, because `--no-verify` is banned locally and a hook that hard-failed -# on a flaky connection would leave no way to commit. A runner is always -# online, so here an undeterminable answer is a real failure. -# -# Expect this to go red for reasons this repo's commit did not cause: an -# upstream release overnight is enough. That is the chosen behaviour -- the -# alternative is a gate that only notices staleness when someone remembers to -# look. - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -jobs: - dependency-freshness: - name: dependencies on newest stable - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # The gate lives in the shared utils repo so every repo resolves the - # same "latest stable" the same way. Checking it out beats vendoring a - # copy, which is exactly how a gate and its survey start disagreeing. - - name: Check out the shared gate - uses: actions/checkout@v4 - with: - repository: kuhyx/utils - path: .utils - - # "3.x", never a pinned minor: the Python target IS the interpreter the - # gate runs under (registries/toolchain.python_installed), so a runner - # held a release behind this machine reports a repo's `requires-python` - # as excluding "latest" while the same check passes locally. flax-docs-mcp - # hit exactly that -- `>=3.14` green here, red on a 3.13 runner. - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Install the gate's two runtime dependencies - run: python -m pip install --upgrade pyyaml packaging - - - name: Cache registry lookups - uses: actions/cache@v4 - with: - path: ~/.cache/dep-freshness - key: - dep-freshness-${{ hashFiles('**/pubspec.yaml', '**/pyproject.toml', - '**/requirements*.txt', '**/package.json', '**/Cargo.toml', '**/go.mod') }} - restore-keys: dep-freshness- - - - name: Every dependency is on newest stable - run: bash .utils/scripts/check_dependency_freshness.sh --all --strict diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index b8ebb4e2..29bcf854 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -39,11 +39,12 @@ jobs: UTILS_ROOT: ${{ github.workspace }}/.utils # SKIP=pytest-coverage: the Python tests workflow already runs the # whole suite with the same 100% coverage gate, so running it again - # here doubled the cost of this job for no extra signal. It is the - # only hook skipped, and it is skipped because it is DUPLICATED, not - # because it is slow -- if that workflow is ever removed, drop this. + # here doubled the cost of this job for no extra signal. It is + # skipped because it is DUPLICATED, not because it is slow -- if that + # workflow is ever removed, drop this. # `rest` also skips the three hooks that run in their own group above. - SKIP: ${{ matrix.group == 'rest' && 'pytest-coverage,mypy,pylint,shellcheck' || 'pytest-coverage' }} + # dependency-freshness runs locally only (see .dep-freshness-no-workflow). + SKIP: ${{ matrix.group == 'rest' && 'pytest-coverage,mypy,pylint,shellcheck,dependency-freshness' || 'pytest-coverage' }} steps: - uses: actions/checkout@v4 @@ -64,8 +65,9 @@ jobs: - uses: astral-sh/setup-uv@v10.2.0 # Every hook brings its own environment except the `language: system` - # ones, and of those only dependency-freshness imports third-party code - # (pyyaml, packaging); check_requirements_sync.py, the evidence/contract + # ones. pyyaml and packaging were for dependency-freshness, which CI now + # skips; they stay because the shared utils gates are not audited for + # them and cost under a second. check_requirements_sync.py, the evidence/contract # validators and the session_autopsy mutation hook are stdlib-only. The # full requirements.txt (~90 packages, a pygame source build included) # used to be installed here for nothing: 49 s of every run. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 00f7fefd..d9ad6735 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -621,7 +621,8 @@ repos: # Runs WITHOUT --strict on purpose. Offline it degrades to the cached # answer and passes with a loud banner; `--no-verify` is banned here, so # a hook that hard-failed on a flaky connection would leave no way to - # commit at all. CI, always online, is the strict authority. + # commit at all. Local only: GitHub Actions does not run this gate + # (see .dep-freshness-no-workflow); `--all --strict` is the manual sweep. - id: dependency-freshness name: dependencies on newest stable entry: scripts/check_dependency_freshness.sh diff --git a/docs/superpowers/evidence/dep-freshness-local-only-2026-11-19.json b/docs/superpowers/evidence/dep-freshness-local-only-2026-11-19.json new file mode 100644 index 00000000..073e2517 --- /dev/null +++ b/docs/superpowers/evidence/dep-freshness-local-only-2026-11-19.json @@ -0,0 +1,35 @@ +{ + "intent": "Run the dependency-freshness gate only locally (pre-commit hook), never in GitHub Actions.", + "scope": [ + ".github/workflows/dependency-freshness.yml (deleted)", + ".github/workflows/pre-commit.yml (CI skips the dependency-freshness hook)", + ".dep-freshness-no-workflow (opt-out marker for the fleet installer)", + "Non-goal: the local hook and the shared gate logic stay unchanged" + ], + "changes": [ + "Deleted the dependency-freshness CI workflow", + "Added dependency-freshness to the rest group's SKIP list in the pre-commit CI workflow", + "Added .dep-freshness-no-workflow so kuhyx/utils dep_freshness.install does not re-add the workflow", + "Bumped ruff 0.17.5 -> 0.17.6 in meta/requirements.txt (gate was red before the change)" + ], + "verification": [ + { + "command": "bash scripts/check_dependency_freshness.sh --all", + "result": "pass", + "evidence": "exit 0, no pins behind latest stable" + }, + { + "command": "pre-commit run --all-files", + "result": "pass", + "evidence": "all hooks passed in the worktree" + } + ], + "risks": [ + "A stale pin can now reach main from a clone without pre-commit installed", + "CI no longer notices overnight upstream releases" + ], + "rollback": [ + "git revert the commit to restore the workflow and drop the marker", + "Check that the dependency freshness workflow runs on the next push" + ] +} diff --git a/docs/superpowers/evidence/wg-firewall-workout-poke-8774-2026-10-10.json b/docs/superpowers/evidence/wg-firewall-workout-poke-8774-2026-10-10.json deleted file mode 100644 index e13d76e6..00000000 --- a/docs/superpowers/evidence/wg-firewall-workout-poke-8774-2026-10-10.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "intent": "The phone's instant workout poke reaches screen-locker on tcp/8774; tcp/8773 is left to book-guard's desktop wrapper (loopback), whose window the poke server had been answering.", - "scope": [ - "linux_configuration/features/lib/wg_firewall.sh, wg_sshd.sh, tests/test_wg_firewall.sh", - "Non-goal: any other firewall rule; the poke stays LAN-only with no wg0 rule" - ], - "changes": [ - "LAN-only poke rule renders 'ip saddr tcp dport 8774 accept' instead of 8773", - "allow-workout-poke help and confirmation text name tcp/8774" - ], - "verification": [ - { - "command": "bash linux_configuration/features/lib/tests/test_wg_firewall.sh", - "result": "pass", - "evidence": "18 passed, 0 failed (nft -c skipped: not permitted unprivileged)" - }, - { - "command": "vm run pokefw 'echo y | sudo bash ~/lc/features/setup_wireguard_ssh.sh allow-workout-poke'", - "result": "pass", - "evidence": "vmbox: exit 0, live ruleset has 'ip saddr 192.168.1.0/24 tcp dport 8774 accept', no 8773 rule, sshd active, second ssh session connects. Not verified on the host at commit time." - } - ], - "risks": [ - "Until the host re-applies, the live ruleset still opens 8773 (nothing listens on the LAN there) and blocks 8774, so the poke fails fast and the regular sync credits workouts", - "nftables-drift reports drift until the host re-applies" - ], - "rollback": [ - "git revert, then sudo bash linux_configuration/features/setup_wireguard_ssh.sh allow-workout-poke", - "Check: sudo nft list ruleset | grep 877 shows the restored port" - ] -} diff --git a/meta/requirements.txt b/meta/requirements.txt index 7ee6475f..cb7e30fc 100644 --- a/meta/requirements.txt +++ b/meta/requirements.txt @@ -78,7 +78,7 @@ radon==6.0.1 reorder-python-imports==3.19.0 requests==2.34.2 rich==15.0.0 -ruff==0.17.5 +ruff==0.17.6 # safety is deliberately not pinned: its only reference in this repo is a # commented-out pre-commit hook, and safety 3.8.1 declares `typer<0.26`, # which would hold the typer this repo actually imports below latest. diff --git a/scripts/check_dependency_freshness.sh b/scripts/check_dependency_freshness.sh index 6e45dd0c..755f9e2a 100755 --- a/scripts/check_dependency_freshness.sh +++ b/scripts/check_dependency_freshness.sh @@ -11,7 +11,7 @@ # # Usage: # scripts/check_dependency_freshness.sh [ ...] # pre-commit -# scripts/check_dependency_freshness.sh --all --strict # CI +# scripts/check_dependency_freshness.sh --all --strict # full local sweep # # Exit: 0 current | 1 behind | 2 allowlist wrong | 3 undeterminable (offline) # ============================================================================