Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#: The agent CLIs whose base variants `make build` builds (ADR 0014 §4). The claude variant must
#: match DEFAULT_IMAGE. Override to build a subset, e.g. `make build AGENT_CLIS=codex`.
AGENT_CLIS ?= claude codex
#: The freshness stamp shared with ImageBuilder.build_base_if_missing. Keep this overridable so
#: callers can select an explicit package identity (and tests can dry-run without invoking Python).
PANOPTICON_VERSION ?= $(shell uv run python -c 'import panopticon; print(panopticon.__version__)')

help: ## List available targets
@grep -h -E '^[a-z][a-z-]*:.*## ' $(MAKEFILE_LIST) | sort | awk -F':.*## ' '{printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -58,6 +61,7 @@ build: ## Build the per-CLI base task-container images (override CLIs with AGEN
for cli in $(AGENT_CLIS); do \
docker build \
--tag panopticon-base-$$cli \
--label org.panopticon.version=$(PANOPTICON_VERSION) \
--build-arg PANOPTICON_WHEEL=$$wheel \
--build-arg AGENT_CLI=$$cli \
--file src/panopticon/docker/Dockerfile \
Expand Down
24 changes: 24 additions & 0 deletions tests/test_makefile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Regression tests for developer commands emitted by the Makefile."""

from __future__ import annotations

import subprocess


def test_build_stamps_base_image_with_panopticon_version() -> None:
result = subprocess.run(
[
"make",
"--dry-run",
"build",
"AGENT_CLIS=claude",
"PANOPTICON_VERSION=9.8.7",
],
check=True,
capture_output=True,
text=True,
)

assert "docker build" in result.stdout
assert "--tag panopticon-base-$cli" in result.stdout
assert "--label org.panopticon.version=9.8.7" in result.stdout
Loading