mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-19 20:04:22 +01:00
Run dependency-freshness locally only
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
Python tests / test (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
Python tests / test (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
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 <noreply@anthropic.com>
This commit is contained in:
parent
e43500a950
commit
b889a8e2d6
2
.dep-freshness-no-workflow
Normal file
2
.dep-freshness-no-workflow
Normal file
@ -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.
|
||||
63
.github/workflows/dependency-freshness.yml
vendored
63
.github/workflows/dependency-freshness.yml
vendored
@ -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
|
||||
14
.github/workflows/pre-commit.yml
vendored
14
.github/workflows/pre-commit.yml
vendored
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
@ -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 <LAN> 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"
|
||||
]
|
||||
}
|
||||
@ -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.
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#
|
||||
# Usage:
|
||||
# scripts/check_dependency_freshness.sh <file> [<file> ...] # 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)
|
||||
# ============================================================================
|
||||
|
||||
Loading…
Reference in New Issue
Block a user