diff --git a/.github/workflows/cross-repo-python-integration.yml b/.github/workflows/cross-repo-python-integration.yml index 0b507b1801..838ebd1abe 100644 --- a/.github/workflows/cross-repo-python-integration.yml +++ b/.github/workflows/cross-repo-python-integration.yml @@ -92,11 +92,7 @@ jobs: test_command: xvfb-run --auto-servernum pytest tests/shared_contracts/ --timeout=60 --timeout-method=thread -v --tb=short env_name: REQUIRE_REAL_TOOLS_REPO sparse_checkout: | - src/chat - src/contracts.py - src/python/src/utils src/shared - src/sidekick tests/shared_contracts tests/support diff --git a/tests/ops/test_cross_repo_python_integration.py b/tests/ops/test_cross_repo_python_integration.py index cbd7b17175..684cb1ae4b 100644 --- a/tests/ops/test_cross_repo_python_integration.py +++ b/tests/ops/test_cross_repo_python_integration.py @@ -14,12 +14,10 @@ "tests/shared_contracts", }, "D-sorganization/UpstreamDrift": { - "chat", - "contracts.py", - "python/src/utils", - "shared", - "sidekick", - "src/shared/python", + # UpstreamDrift moved its consumed packages under src/shared/python, so + # this is the narrow root that carries them. Deliberately NOT bare `src` + # -- see the assertions in the test below. + "src/shared", "tests/shared_contracts", "tests/support", }, @@ -75,13 +73,11 @@ def test_upstream_scope_includes_every_release_build_package_root() -> None: ) scope = set(upstream["sparse_checkout"].splitlines()) - assert { - "chat", - "contracts.py", - "python/src/utils", - "shared", - "sidekick", - } <= scope + # `src/shared` is the package root that actually carries the code this repo + # provides to UpstreamDrift; `pip install -e .` there resolves through + # hatchling's `packages = ["src"]`, and cone-mode sparse checkout gives it a + # populated `src/shared` without pulling all of `src`. + assert {"src/shared"} <= scope def test_downstream_checkout_keeps_sparse_checkout_authoritative() -> None: diff --git a/tests/rotation_converter/test_scripting_env.py b/tests/rotation_converter/test_scripting_env.py index 65f06d49c0..58be4d8986 100644 --- a/tests/rotation_converter/test_scripting_env.py +++ b/tests/rotation_converter/test_scripting_env.py @@ -112,7 +112,10 @@ def test_refresh_user_functions_system_exit_propagates(self) -> None: self.env.set_user_library_path(user_lib_path) # Save code that raises SystemExit - self.env.save_user_code("import sys; sys.exit(1)") + # `import sys` is blocked by the scripting sandbox, so importing it to + # reach sys.exit never raises. SystemExit is a builtin, so raise it + # directly to test what this case is actually about: propagation. + self.env.save_user_code("raise SystemExit(1)") # Should propagate instead of being caught and logged with self.assertRaises(SystemExit):