Skip to content

Skip cross-repo integration test when sibling repos absent (ar-r82f.6)#92

Merged
atc964 merged 1 commit into
mainfrom
fix/cross-repo-test-skipif
May 28, 2026
Merged

Skip cross-repo integration test when sibling repos absent (ar-r82f.6)#92
atc964 merged 1 commit into
mainfrom
fix/cross-repo-test-skipif

Conversation

@atc964
Copy link
Copy Markdown
Collaborator

@atc964 atc964 commented May 28, 2026

Summary

tests/integration/test_path_a_audience_e2e.py::TestCrossRepoAudiencePlanJSONRoundTrip::test_cross_repo_audience_plan_json_round_trip was the one remaining failure in CI. It exercises an AudiencePlan JSON round-trip through the seller repo's AudienceRef model and locates the seller src/ either via AD_SELLER_SRC_PATH or by walking up the path ancestry looking for an ad_buyer_system directory with a sibling ad_seller_system.

Standalone clones of IABTechLab/buyer-agent (including the GitHub Actions runner) check out only this repo, in a directory named buyer-agent rather than ad_buyer_system, so the ancestry walk returned None and the test raised RuntimeError: Could not locate ad_buyer_system in path ancestry ... ; set AD_SELLER_SRC_PATH to override. This was pre-existing, but only became visible after the collection error fixed in ar-r82f.5.

This PR keeps the test logic and assertions unchanged. It just gates the cross-repo half on environment availability:

  • If AD_SELLER_SRC_PATH is unset and no ad_buyer_system ancestor is found, pytest.skip cleanly with a message naming the env override.
  • If an ad_buyer_system ancestor is found but the resolved seller src/ directory does not exist on disk (partial checkout), pytest.skip instead of failing on the import.
  • All other code paths (env var set; sibling repos / worktrees present locally) continue to run the test exactly as before.

How to run locally

The test still runs whenever the cross-repo layout or env override is present:

  • Check out the repo into a directory named ad_buyer_system/ alongside a sibling ad_seller_system/ containing src/ad_seller/..., or
  • Set AD_SELLER_SRC_PATH=/path/to/ad_seller_system/src before invoking pytest.

Then: uv run pytest tests/integration/test_path_a_audience_e2e.py -v

Expected CI impact

This should bring the CI Test job to GREEN (0 failures) for the first time in a long while: the cross-repo round-trip moves from FAILED to SKIPPED, every other integration test in the file continues to run, and the skip count goes up by one.

References

  • Bead: ar-r82f.6
  • Parent epic: ar-r82f
  • Sister test: tests/integration/test_path_b_audience_e2e.py (no cross-repo dependency, already passing)

Test plan

  • CI passes (target: 3196 passed, 0 failed, ~60 skipped)
  • uv run pytest tests/integration/test_path_a_audience_e2e.py -v locally shows the cross-repo test as SKIPPED on a standalone clone

The test exercises an AudiencePlan JSON round-trip through the seller
repo's AudienceRef model. It locates the seller src/ either via the
AD_SELLER_SRC_PATH env var or by walking up the path ancestry looking
for an ad_buyer_system directory and its sibling ad_seller_system.

Standalone clones of IABTechLab/buyer-agent (including CI) check out
only the buyer repo, with the working directory named buyer-agent
rather than ad_buyer_system, so the ancestry walk returns None and the
test previously raised RuntimeError. Replace that with pytest.skip and
add a second skip when the resolved seller src/ path does not exist on
disk, so the test still runs whenever the cross-repo layout (or env
override) is present and skips cleanly when it is not.

bead: ar-r82f.6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@atc964 atc964 merged commit 90764ab into main May 28, 2026
1 of 3 checks passed
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