From c4a5db8ebc85c8503fd028791e5f004beaf3e040 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 28 Aug 2026 13:51:28 +0200 Subject: [PATCH] Enforce dependency freshness in utils' own CI Deliberately the last step, not the first. All eleven manifests here are now on latest stable -- four Dart libs, two Python packages, two TypeScript packages -- so `--all --strict` exits 0 and this can be a gate rather than a permanent red light. Installing it any earlier would have taught everyone to ignore it. Unlike every other repo's copy, this one runs `scripts/check_dependency_freshness.sh` directly instead of checking kuhyx/utils out into `.utils`: this repo IS the gate. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK --- .github/workflows/dependency-freshness.yml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/dependency-freshness.yml diff --git a/.github/workflows/dependency-freshness.yml b/.github/workflows/dependency-freshness.yml new file mode 100644 index 0000000..452408c --- /dev/null +++ b/.github/workflows/dependency-freshness.yml @@ -0,0 +1,52 @@ +name: dependency freshness + +# Every dependency on its ecosystem's newest STABLE release, enforced on push +# as well as at commit time. This repo OWNS the gate, so unlike every other +# repo it runs its own copy directly instead of checking one out. +# +# Deliberately added last, after all eleven manifests here were brought +# current: installing the gate on a repo before its dependencies are upgraded +# makes it instantly and permanently red, which teaches people to ignore it. 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 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - 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', '**/package.json', '**/requirements*.txt', '**/pyproject.toml') }} + restore-keys: dep-freshness- + + - name: Every dependency is on newest stable + run: bash scripts/check_dependency_freshness.sh --all --strict