Skip to content

fix(ci): include lib in PYTHONPATH for legacy run-tests#401

Closed
captainsafia wants to merge 1 commit intomainfrom
oz-agent/fix-legacy-pythonpath
Closed

fix(ci): include lib in PYTHONPATH for legacy run-tests#401
captainsafia wants to merge 1 commit intomainfrom
oz-agent/fix-legacy-pythonpath

Conversation

@captainsafia
Copy link
Copy Markdown
Collaborator

Summary

The webhook control-plane migration in #400 relocates the shared oz_workflows package from .github/scripts/oz_workflows to a new top-level lib/oz_workflows.

While that PR is open, pr-hooks.yml on main keeps invoking the legacy reusable run-tests.yml against every open PR's merge ref. Because that workflow sets PYTHONPATH=.github/scripts, the python -m unittest discover -s .github/scripts/tests step fails with ModuleNotFoundError: No module named 'oz_workflows' once a PR has performed the move (e.g. #400 itself):

ERROR: test_verification (unittest.loader._FailedTest.test_verification)
ImportError: Failed to import test module: test_verification
ModuleNotFoundError: No module named 'oz_workflows'
...
Ran 63 tests in 0.063s
FAILED (errors=21)

Change

Add lib to the PYTHONPATH the legacy reusable workflow exports before python -m unittest discover -s .github/scripts/tests. Python silently ignores non-existent entries on PYTHONPATH, so PRs that have not migrated yet (where lib/ does not exist) keep behaving exactly as they do today.

This unblocks PR #400's run_tests_on_push / Run tests check without modifying the migration PR. Once #400 lands, pr-hooks.yml and the legacy reusable workflow will be retired entirely.

Validation

Conversation: https://staging.warp.dev/conversation/1b6aa5c7-03cf-46a0-82a5-b9fe805e2fb6
Run: https://oz.staging.warp.dev/runs/019dd6af-d7da-7f05-a8c1-4da156024d76

This PR was generated with Oz.

The webhook control-plane migration relocates the shared
`oz_workflows` package from `.github/scripts/oz_workflows` to a
new top-level `lib/oz_workflows`. While that migration PR (#400)
is open, the legacy reusable `run-tests.yml` on main keeps
running against the merge ref of every open PR, and the
`PYTHONPATH=.github/scripts` it sets fails to import
`oz_workflows` once a PR has performed the move.

Add `lib` to `PYTHONPATH` so the reusable workflow tolerates
both the pre- and post-migration repo layouts. Non-existent path
entries are ignored by Python, so PRs that have not migrated
yet are unaffected.

Co-Authored-By: Oz <oz-agent@warp.dev>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oz-for-oss Error Error Apr 29, 2026 0:57am

Request Review

@captainsafia captainsafia requested review from Copilot and removed request for Copilot April 29, 2026 00:59
@captainsafia captainsafia deleted the oz-agent/fix-legacy-pythonpath branch May 1, 2026 01:34
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.

2 participants