mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-22 21:32:26 +01:00
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK
This commit is contained in:
parent
1c98d39ddb
commit
db65c208d9
@ -77,11 +77,15 @@ MANIFEST_GLOBS: Final = (
|
|||||||
)
|
)
|
||||||
REQUIREMENTS_PATTERN: Final = r"^requirements.*\.txt$"
|
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({
|
EXCLUDED_DIRS: Final = frozenset({
|
||||||
".git", "node_modules", "build", "dist", ".dart_tool", ".venv", "venv",
|
".git", "node_modules", "build", "dist", ".dart_tool", ".venv", "venv",
|
||||||
"__pycache__", "target", "vendor", ".gradle", "ios", "macos", "windows",
|
"__pycache__", "target", "vendor", ".gradle", "ios", "macos", "windows",
|
||||||
".mypy_cache", ".pytest_cache", ".ruff_cache", "coverage", "htmlcov",
|
".mypy_cache", ".pytest_cache", ".ruff_cache", "coverage", "htmlcov",
|
||||||
".idea", ".vscode", "Pods", ".fvm",
|
".idea", ".vscode", "Pods", ".fvm", ".utils",
|
||||||
})
|
})
|
||||||
|
|
||||||
# --- Constraint policy ------------------------------------------------------
|
# --- Constraint policy ------------------------------------------------------
|
||||||
|
|||||||
@ -43,6 +43,18 @@ def test_excluded_directories_are_skipped(repo):
|
|||||||
assert find_manifests(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):
|
def test_git_ignored_manifests_are_skipped(repo):
|
||||||
write(repo, ".gitignore", "generated/\n")
|
write(repo, ".gitignore", "generated/\n")
|
||||||
write(repo, "generated/pubspec.yaml", PUBSPEC)
|
write(repo, "generated/pubspec.yaml", PUBSPEC)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user