- tests/integration: frontend served by backend, runtime error mapping, backend + real pi image with scripted model/Confluence (shared example, variants, failure paths, cancellation/busy gate, isolation canaries, HTTP download ownership, 16 MiB prompt round trip), real OpenAI-compatible adapter + real image over a scripted transport, real Chrome against the real backend with a scripted runtime peer, backend crash/restart reconciliation, and an opt-in live model check (marker: live). - backend: map runtime terminal codes (model_output_limit, model_context_exceeded, query_timeout, connectivity_failed) to the contract's HTTP statuses; make the artifact 404 body identical for no-session, wrong-session, unknown and expired IDs. - Makefile, scripts/run-backend.sh, deploy/confluence-web.env.example, root README for the integrated application; integration pytest marker.
63 lines
2.3 KiB
Makefile
63 lines
2.3 KiB
Makefile
# Confluence Research Web UI: integration entry points.
|
|
# Subsystem guides: agent/README.md, backend/README.md, frontend/README.md.
|
|
|
|
PYTHON ?= .venv/bin/python
|
|
IMAGE ?= confluence-pi-agent:rev1
|
|
FAKE_IMAGE ?= confluence-fake-agent:test
|
|
ENV_FILE ?= deploy/confluence-web.env
|
|
|
|
.PHONY: install check check-python check-agent check-frontend check-docker check-browser build-image build-fake-image image-checks run run-dev clean-containers
|
|
|
|
install:
|
|
$(PYTHON) -m pip install -r requirements.txt
|
|
npm --prefix agent ci --ignore-scripts
|
|
npm --prefix frontend ci
|
|
|
|
## Deterministic checks (no Docker, no network, no browser).
|
|
check: check-python check-agent check-frontend
|
|
|
|
check-python:
|
|
CONFLUENCE_PAT=synthetic-token-no-network CONFLUENCE_URL=https://approved.example.com \
|
|
$(PYTHON) -m pytest --ignore=tests/backend/test_docker_live.py --ignore=tests/integration/test_real_image.py \
|
|
--ignore=tests/integration/test_real_provider_adapter.py --ignore=tests/integration/test_browser_backend.py
|
|
|
|
check-agent:
|
|
npm --prefix agent run build
|
|
npm --prefix agent test
|
|
|
|
check-frontend:
|
|
npm --prefix frontend test
|
|
|
|
## Real rootless Docker checks: backend fake image, runtime image checks, backend+runtime integration.
|
|
check-docker: build-fake-image
|
|
$(PYTHON) -m pytest tests/backend/test_docker_live.py tests/integration/test_real_image.py tests/integration/test_real_provider_adapter.py -p no:cacheprovider
|
|
npm --prefix agent run test:image
|
|
|
|
## Real Chrome (DevTools on 127.0.0.1:9444) against the real backend and the frontend's own e2e suite.
|
|
check-browser:
|
|
$(PYTHON) -m pytest tests/integration/test_browser_backend.py -p no:cacheprovider
|
|
npm --prefix frontend run test:e2e
|
|
|
|
build-image:
|
|
docker build -t $(IMAGE) agent
|
|
@docker image inspect --format 'Image ID: {{.Id}}' $(IMAGE)
|
|
|
|
build-fake-image:
|
|
docker build -t $(FAKE_IMAGE) -f backend/dev/Dockerfile.fake .
|
|
|
|
image-checks:
|
|
npm --prefix agent run build
|
|
node agent/dist/dev/image-checks.js
|
|
node agent/dist/dev/boundary-checks.js
|
|
|
|
run:
|
|
scripts/run-backend.sh $(ENV_FILE)
|
|
|
|
## Network-free UI development against explicit fakes (no Docker).
|
|
run-dev:
|
|
CONFLUENCE_WEB_DEV_MODE=true CONFLUENCE_WEB_FRONTEND_DIST_DIR=$(CURDIR)/frontend \
|
|
$(PYTHON) -m uvicorn backend.app:create_app --factory --workers 1 --host 127.0.0.1 --port 8000
|
|
|
|
clean-containers:
|
|
docker ps -aq --filter label=com.confluence_web.app | xargs -r docker rm -f
|