mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 13:27:32 +01:00
**The two shared Python libraries were four minor versions behind and the gate could not see it.** They are PEP 508 direct references (`gatelock @ git+...@gatelock-v0.4.1`), which parsed as unpinned PyPI packages that do not exist on PyPI -- an undeterminable answer, not a stale one. utils@7a682a4 teaches the gate that shape; this repo is the first to benefit: gatelock v0.4.1 -> v0.7.2, crdt-sync v0.5.1 -> v0.9.1. The system install was already on 0.7.1/0.9.0, so only the manifests were adrift. Python side: bandit 1.7 -> 1.9.4, mypy 1 -> 2.3.1, pylint 3 -> 4.0.7, pytest 8 -> 9.1.1, pytest-cov 4 -> 7.1.0, pytest-randomly 3 -> 4.1.0, ruff 0.8 -> 0.16.5, python-kasa 0.7 -> 0.10.2, and the rest exact-pinned. Five majors and not one lint or type finding: `scripts/ci_mirror.sh` builds a clean venv from requirements.txt and runs the whole CI set, 465 tests at 100% branch coverage. phone_app takes crdt_sync_dart v0.11.1 and the flutter_secure_storage 11 chain (compileSdk 37 / AGP 9.3.2 / Gradle 9.7.1). 79 tests green, analyzer clean, release APK builds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK
58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
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
|
|
|
|
- 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', '**/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
|