Skip cross-repo integration test when sibling repos absent (ar-r82f.6)#92
Merged
Conversation
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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/integration/test_path_a_audience_e2e.py::TestCrossRepoAudiencePlanJSONRoundTrip::test_cross_repo_audience_plan_json_round_tripwas the one remaining failure in CI. It exercises an AudiencePlan JSON round-trip through the seller repo'sAudienceRefmodel and locates the sellersrc/either viaAD_SELLER_SRC_PATHor by walking up the path ancestry looking for anad_buyer_systemdirectory with a siblingad_seller_system.Standalone clones of
IABTechLab/buyer-agent(including the GitHub Actions runner) check out only this repo, in a directory namedbuyer-agentrather thanad_buyer_system, so the ancestry walk returnedNoneand the test raisedRuntimeError: 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 inar-r82f.5.This PR keeps the test logic and assertions unchanged. It just gates the cross-repo half on environment availability:
AD_SELLER_SRC_PATHis unset and noad_buyer_systemancestor is found,pytest.skipcleanly with a message naming the env override.ad_buyer_systemancestor is found but the resolved sellersrc/directory does not exist on disk (partial checkout),pytest.skipinstead of failing on the import.How to run locally
The test still runs whenever the cross-repo layout or env override is present:
ad_buyer_system/alongside a siblingad_seller_system/containingsrc/ad_seller/..., orAD_SELLER_SRC_PATH=/path/to/ad_seller_system/srcbefore invoking pytest.Then:
uv run pytest tests/integration/test_path_a_audience_e2e.py -vExpected 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
ar-r82f.6ar-r82ftests/integration/test_path_b_audience_e2e.py(no cross-repo dependency, already passing)Test plan
uv run pytest tests/integration/test_path_a_audience_e2e.py -vlocally shows the cross-repo test as SKIPPED on a standalone clone