From db65c208d940b5970f0b13ae397e9e3581017e0c Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 28 Aug 2026 13:24:00 +0200 Subject: [PATCH] Exclude the shared-gate checkout from dependency discovery Every CI workflow clones kuhyx/utils into `.utils/` *inside* the repo being checked, so `--all` walked utils' own manifests and failed the consuming repo for staleness in a directory that repo does not own and cannot fix. Caught by punchme's very first CI run: locally `--all --strict` exited 0, and the same command on the runner reported twenty findings, all of them in `.utils/web_ui/package.json` and `.utils/ts_core/package.json`. Exactly the kind of local/CI divergence the gate exists to prevent, in the gate itself. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK --- dep_freshness/_tables.py | 6 +++++- dep_freshness/tests/test_discover.py | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dep_freshness/_tables.py b/dep_freshness/_tables.py index cd2e354..c165241 100644 --- a/dep_freshness/_tables.py +++ b/dep_freshness/_tables.py @@ -77,11 +77,15 @@ MANIFEST_GLOBS: Final = ( ) REQUIREMENTS_PATTERN: Final = r"^requirements.*\.txt$" +# `.utils` is where every CI workflow checks the shared gate out, INSIDE the +# repo being checked. Without it `--all` walks utils' own manifests and fails +# the consuming repo for staleness in a directory that repo does not own -- +# which is exactly how punchme's first green local run turned red in CI. EXCLUDED_DIRS: Final = frozenset({ ".git", "node_modules", "build", "dist", ".dart_tool", ".venv", "venv", "__pycache__", "target", "vendor", ".gradle", "ios", "macos", "windows", ".mypy_cache", ".pytest_cache", ".ruff_cache", "coverage", "htmlcov", - ".idea", ".vscode", "Pods", ".fvm", + ".idea", ".vscode", "Pods", ".fvm", ".utils", }) # --- Constraint policy ------------------------------------------------------ diff --git a/dep_freshness/tests/test_discover.py b/dep_freshness/tests/test_discover.py index aed7ff0..a569ffe 100644 --- a/dep_freshness/tests/test_discover.py +++ b/dep_freshness/tests/test_discover.py @@ -43,6 +43,18 @@ def test_excluded_directories_are_skipped(repo): assert find_manifests(repo) == [] +def test_the_shared_gate_checkout_is_not_part_of_the_repo(repo): + """CI clones kuhyx/utils into `.utils/` inside the repo being checked. + + Without this exclusion `--all` walks utils' own manifests and fails the + consuming repo for staleness in a directory it does not own -- which is + how punchme's first green local run turned red in CI. + """ + write(repo, ".utils/design_system/pubspec.yaml", PUBSPEC) + write(repo, "pubspec.yaml", PUBSPEC) + assert [str(p) for p in find_manifests(repo)] == [str(repo / "pubspec.yaml")] + + def test_git_ignored_manifests_are_skipped(repo): write(repo, ".gitignore", "generated/\n") write(repo, "generated/pubspec.yaml", PUBSPEC)