Skip to content

Skip cross-repo round-trip when the sibling buyer repo is absent (fresh clone pytest fails)#25

Open
aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:skip-cross-repo-roundtrip-standalone-clone
Open

Skip cross-repo round-trip when the sibling buyer repo is absent (fresh clone pytest fails)#25
aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:skip-cross-repo-roundtrip-standalone-clone

Conversation

@aleksUIX

@aleksUIX aleksUIX commented Jul 6, 2026

Copy link
Copy Markdown

Summary

A fresh git clone + pip install -e ".[dev]" + pytest tests/unit fails out of the box:

E  RuntimeError: Could not locate ad_seller_system in path ancestry of
   .../seller-agent/tests/unit/test_openrtb_parser.py; set AD_BUYER_SRC_PATH to override.
tests/unit/test_openrtb_parser.py:250

The cross-repo round-trip test walks parent directories looking for one literally named ad_seller_system (a default clone is named seller-agent), then needs a sibling ad_buyer_system checkout. CI stays green only because ci.yml checks out buyer-agent and sets AD_BUYER_SRC_PATH; every standalone contributor clone gets a red suite.

buyer-agent hit the mirror image of this and fixed it in buyer-agent#92 ("Skip cross-repo audience plan round-trip when sibling repos absent"). This PR ports that exact pattern:

  • skip (with the same explanatory message style) instead of raising when the seller repo root cannot be located
  • skip when the resolved buyer src/ directory does not exist (partial checkout)

Verification

  • Standalone clone: the test now reports SKIPPED, file exit code 0, 12 others pass.
  • Opt-in still works: with AD_BUYER_SRC_PATH pointing at a real buyer-agent checkout's src/, the round-trip runs and passes.
  • ruff check clean.

test_round_trip_builder_then_parser_recovers_refs raised
RuntimeError on any standalone clone: it walks parents looking for
a directory named ad_seller_system (a default clone is named
seller-agent) and then needs a sibling ad_buyer_system checkout.
Fresh clone plus pytest failed out of the box; CI only stays green
because ci.yml checks out buyer-agent and sets AD_BUYER_SRC_PATH.

Ports the fix buyer-agent merged in PR #92 for its mirror-image
test: skip instead of raise when the seller repo root cannot be
located, and skip when the resolved buyer src directory does not
exist. The test still runs when AD_BUYER_SRC_PATH is set or the
sibling layout exists; verified both ways (skips on a standalone
clone, passes with AD_BUYER_SRC_PATH pointing at a buyer checkout).
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