WP-0001-T001: service scaffold (Python, FastAPI, uv, ruff, mypy, pytest)
Lands the smallest credible foundation per ADR-0005:
- pyproject.toml: hatchling build, runtime deps (FastAPI, uvicorn, SQLAlchemy 2.0,
asyncpg, aiosqlite, alembic, blake3, cbor2, typer, structlog, pydantic,
pydantic-settings); dev deps (pytest, pytest-asyncio, httpx, hypothesis, ruff,
mypy); ruff + mypy --strict + pytest configured.
- uv.lock committed.
- Makefile thin shims: install / dev / test / lint / format / type / migrate / clean.
- src/artifactstore/ package skeleton with placeholder __init__.py per concern:
identity, manifest, events, retention, audit, storage, dataplane, registry,
api/http (minimal FastAPI app, GET / scaffold banner), cli (typer app with
version subcommand), config (pydantic-settings).
- tests/{unit,integration}/conftest.py present; unit smoke tests assert package
imports, HTTP root route, CLI version round-trip, settings defaults.
- .env.example documents ARTIFACTSTORE_DATABASE_URL,
ARTIFACTSTORE_STORAGE_LOCAL_ROOT, ARTIFACTSTORE_LOG_LEVEL.
- README updated with install / dev / test instructions.
- .gitignore: claude local state, local runtime data (var/, sqlite db).
make lint && make type && make test pass on a clean checkout (4 tests, 20
source files type-clean under mypy --strict).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 01:30:22 +02:00
|
|
|
# artifact-store environment configuration
|
|
|
|
|
#
|
|
|
|
|
# Copy to .env for local development. All keys are prefixed with
|
|
|
|
|
# ARTIFACTSTORE_; pydantic-settings reads them automatically.
|
|
|
|
|
|
|
|
|
|
# Database connection string. SQLite (with aiosqlite) for dev; PostgreSQL
|
|
|
|
|
# (with asyncpg) for shared deployments.
|
|
|
|
|
# sqlite+aiosqlite:///./var/artifactstore.db
|
|
|
|
|
# postgresql+asyncpg://user:pass@host:5432/artifactstore
|
|
|
|
|
ARTIFACTSTORE_DATABASE_URL=sqlite+aiosqlite:///./var/artifactstore.db
|
|
|
|
|
|
|
|
|
|
# Local filesystem storage root. Used by the LocalBackend (WP-0001-T003).
|
|
|
|
|
ARTIFACTSTORE_STORAGE_LOCAL_ROOT=./var/storage
|
|
|
|
|
|
|
|
|
|
# Python logging level: DEBUG | INFO | WARNING | ERROR
|
|
|
|
|
ARTIFACTSTORE_LOG_LEVEL=INFO
|
2026-05-16 23:10:21 +02:00
|
|
|
|
|
|
|
|
# Shared-secret bearer tokens for the HTTP API. Comma- or newline-separated.
|
|
|
|
|
# Protected endpoints return 401 until at least one token is configured.
|
|
|
|
|
ARTIFACTSTORE_AUTH_TOKENS=dev-token
|
|
|
|
|
|
|
|
|
|
# Read endpoints are authenticated by default. Set true only for local demos.
|
|
|
|
|
ARTIFACTSTORE_ANON_READ=false
|
|
|
|
|
|
|
|
|
|
# Defaults used by `artifactstore push` and `artifactstore manifest`.
|
|
|
|
|
ARTIFACTSTORE_API_URL=http://127.0.0.1:8000
|
|
|
|
|
ARTIFACTSTORE_API_TOKEN=dev-token
|
|
|
|
|
|
2026-05-17 00:09:11 +02:00
|
|
|
# Guide-board pilot helper defaults.
|
|
|
|
|
ARTIFACTSTORE_GUIDE_BOARD_SCHEMA=schemas/guide-board.run.v1.json
|
|
|
|
|
STATE_HUB_URL=http://127.0.0.1:8000
|
|
|
|
|
STATE_HUB_AUTHOR=artifact-store
|
|
|
|
|
STATE_HUB_WORKSTREAM_ID=
|
|
|
|
|
STATE_HUB_TASK_ID=
|
|
|
|
|
GUIDE_BOARD_RUN_DIR=
|
|
|
|
|
ARTIFACTSTORE_INGEST_RESULT_PATH=
|
|
|
|
|
|
2026-05-16 23:10:21 +02:00
|
|
|
# Optional TOML file overriding retention class default durations.
|
|
|
|
|
ARTIFACTSTORE_RETENTION_CONFIG_PATH=
|
|
|
|
|
|
|
|
|
|
# Default interval for external schedulers that run `artifactstore retention sweep`.
|
|
|
|
|
ARTIFACTSTORE_RETENTION_SWEEP_INTERVAL_SECONDS=3600
|
2026-05-16 23:26:03 +02:00
|
|
|
|
|
|
|
|
# Storage backend selection. `local` is always available; `s3` requires the
|
|
|
|
|
# optional S3 dependency and the S3 settings below.
|
|
|
|
|
ARTIFACTSTORE_STORAGE_BACKENDS=local
|
|
|
|
|
ARTIFACTSTORE_STORAGE_DEFAULT_BACKEND=local
|
|
|
|
|
# Format: producer:retention_class=backend_id, with * wildcards.
|
|
|
|
|
# Example: guide-board:release-evidence=s3,*:*=local
|
|
|
|
|
ARTIFACTSTORE_STORAGE_BACKEND_ROUTES=
|
|
|
|
|
|
|
|
|
|
# S3-compatible backend settings for Ceph RGW / MinIO / AWS S3.
|
|
|
|
|
ARTIFACTSTORE_S3_ENDPOINT_URL=
|
|
|
|
|
ARTIFACTSTORE_S3_REGION=us-east-1
|
|
|
|
|
ARTIFACTSTORE_S3_BUCKET=
|
|
|
|
|
ARTIFACTSTORE_S3_KEY_PREFIX=artifact-store
|
|
|
|
|
# Secret refs must be env:NAME or file:/mounted/path.
|
|
|
|
|
ARTIFACTSTORE_S3_ACCESS_KEY_REF=
|
|
|
|
|
ARTIFACTSTORE_S3_SECRET_KEY_REF=
|
|
|
|
|
ARTIFACTSTORE_S3_STORAGE_CLASS=
|
|
|
|
|
ARTIFACTSTORE_S3_SSE=
|
|
|
|
|
ARTIFACTSTORE_S3_MULTIPART_THRESHOLD_BYTES=67108864
|
|
|
|
|
ARTIFACTSTORE_S3_MULTIPART_CHUNK_BYTES=8388608
|