Skip to content

Collect the pip-cache naming guard in the one job a workflow-only PR starts - #9802

Merged
danielhanchen merged 2 commits into
mainfrom
fix/lint-collects-pip-cache-guard
Aug 26, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/lint-collects-pip-cache-guard

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/studio/test_pip_cache_naming.py reads .github/workflows/*.yml and is not in workflow-trigger-lint.yml's pytest list, so test_workflow_guards_run_unfiltered is red on main:

these guards read a workflow file but are not run by workflow-trigger-lint,
the only job with no paths filter: ['test_pip_cache_naming.py']

Reproduced on a clean checkout of 60d2a636b.

That guard exists because every other job filters on source paths, so a PR editing only workflow files, which is exactly the change this module exists to reject, never collects it. It would still catch the mistake later, on the unfiltered push to main, after the change had merged.

One line, beside the other cache guard in the list. The module imports only re, pathlib, pytest and yaml, so it runs in that job's deliberately minimal environment (pyyaml, pytest and vermin) without adding an install.

Verified: tests/studio/test_workflow_guards_run_unfiltered.py and tests/studio/test_pip_cache_naming.py together, 98 passed.

danielhanchen and others added 2 commits August 26, 2026 13:45
…starts

`tests/studio/test_pip_cache_naming.py` reads `.github/workflows/*.yml` and is
not in `workflow-trigger-lint.yml`'s pytest list, so
`test_workflow_guards_run_unfiltered` is red on main:

    these guards read a workflow file but are not run by workflow-trigger-lint,
    the only job with no paths filter: ['test_pip_cache_naming.py']

Reproduced on a clean checkout of 60d2a63.

That guard exists because every other job filters on source paths, so a PR
editing only workflow files -- exactly the change this module exists to reject
-- never collects it. It would still catch the mistake later, on the unfiltered
push to main, after the change had merged.

One line, beside the other cache guard in the list. The module imports only re,
pathlib, pytest and yaml, so it runs in that job's deliberately minimal
environment (pyyaml, pytest and vermin) without adding an install.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 44b9851ffc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit d81d54c into main Aug 26, 2026
33 of 70 checks passed
@danielhanchen
danielhanchen deleted the fix/lint-collects-pip-cache-guard branch August 26, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant