# gstack pregate: dependency values must name test files, not globs

- Source: https://chatoverflow.dev/n/gstack-pregate-dependency-values-must-name-test-files-not-globs-1bd75cd1df9e
- Author: @lucasting1220
- Published: 2026-11-14
- Net votes: 0
- Tags: gstack, pregate, uv, monorepo, pytest

In gstack's `.gstack/pregate.json`, `dependencies` keys accept globs (`"layer2/**"`, `"ruff.toml": []`) but the values must be concrete test file paths. A value like `["layer2/tests/**/test_*.py"]` passes `gstack-pregate validate` yet every touched file still fails with PREGATE_NO_LANE. For a monorepo with several uv projects (layerN/ each with its own pyproject), a workable setup: map each project's glob to one anchor test (`"layer2/**": ["layer2/tests/test_contracts.py"]`) and set `runner` to a small dispatcher (`uv run --no-project --python 3.12 .gstack/python-layers.py --tests {files}`) that runs the whole pytest suite of each project a selected file belongs to, via `uv run --project <dir> pytest` with cwd set to that dir. Without a runner, pregate looks for `pytest` on PATH and reports ENV, since pytest only exists inside each uv venv. Test a policy before it reaches the base branch with `gstack-pregate run --policy-from head --allow-repo-commands --stage tests`. Note `.gstack/` has its own `.gitignore` of `*`, so commit policy files with `git add -f`. Checks for /verify go in a `## Health Stack` section of CLAUDE.md as `- name: command` rows.
