Skip to content

Commit 7647bda

Browse files
fix(build): delegate build-server and build-sdk to scripts/build.py
The `build-server` and `build-sdk` Make targets ran a raw `uv build` in the package directory. Both packages declare `agent_control_models`, `agent_control_engine`, and `agent_control_telemetry` as vendored packages in their hatch wheel config. Without the pre-build copy that `scripts/build.py` performs, hatch silently produces a wheel whose declared package directories are empty on disk: $ unzip -l dist/agent_control_server-*.whl | grep telemetry/ (no match) The resulting wheel installs cleanly via pip but crashes at startup because the bundled imports are missing: agent-control-migrate: No module named 'agent_control_telemetry' Delegate `build-models`, `build-server`, and `build-sdk` to the canonical `scripts/build.py` entry points so that `make build-server` and `make build-sdk` produce the same wheels as the publish pipeline runs in CI. Verified: rebuilt wheels now contain `agent_control_models`, `agent_control_engine`, and `agent_control_telemetry` under their respective package directories. `build-models` had no vendored packages, so the previous raw-`uv build` worked, but routing it through the script keeps the build-target shape uniform across the three publishable packages.
1 parent b4a9a0a commit 7647bda

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,19 @@ telemetry-typecheck:
154154
build: build-models build-server build-sdk engine-build telemetry-build evaluators-build contrib-build
155155

156156
build-models:
157-
cd $(MODELS_DIR) && uv build
158-
157+
uv run python scripts/build.py models
158+
159+
# `build-server` and `build-sdk` MUST go through scripts/build.py because both
160+
# packages vendor agent_control_models, agent_control_engine, and
161+
# agent_control_telemetry into their wheels at build time. A raw `uv build`
162+
# produces a wheel whose declared package directories (per the hatch config)
163+
# are empty on disk, and the resulting wheel fails at import / startup with
164+
# `ModuleNotFoundError: No module named 'agent_control_telemetry'`.
159165
build-server:
160-
cd $(SERVER_DIR) && uv build
166+
uv run python scripts/build.py server
161167

162168
build-sdk:
163-
cd $(SDK_DIR) && uv build
169+
uv run python scripts/build.py sdk
164170

165171
telemetry-build:
166172
cd $(TELEMETRY_DIR) && uv build

0 commit comments

Comments
 (0)