Milestone M1: Project Bootstrap and CI¶
Status: Completed Owner: Core Maintainers Duration: 1–2 days
Overview Establish the repository scaffold, development workflow, and CI guardrails to enable rapid, consistent iteration. This milestone sets conventions (SRP/DRY, ~200 LOC per file), pins toolchain versions, and ensures all contributors can build, lint, type-check, and test locally and in CI using uv.
Goals (EARS) - The system shall be bootstrapped as a Python 3.11+ project managed by uv. [DONE] - The system shall provide a deterministic local dev loop: uv lock → uv sync → uv run / uvx. [DONE] - The system shall enforce code quality via linting and formatting checks. [DONE] - The system shall enforce typing via static analysis. [DONE] - The system shall run tests with coverage reports and thresholds. [DONE — TEMPORARY RELAXATION] - When code is pushed or a PR is opened, the CI shall run lint, type, and tests across supported Python versions (initially 3.11). [DONE] - If coverage thresholds are not met (≥90% core, ≥80% overall), the CI shall fail. [TEMPORARILY RELAXED FOR M1] - The system shall publish a minimal README, LICENSE, and CHANGELOG skeletons. [DONE]
Deliverables - pyproject.toml configured for: - Python 3.11 - uv-managed dev loop - ruff (lint), black (format), mypy (types), pytest + coverage (tests) [DONE] - Repo structure: - src/meridian/… (package skeletons: core/, observability/, utils/) [DONE] - examples/ (placeholder) [DONE] - tests/unit/, tests/integration/ (smoke scaffolds) [DONE] - docs/ (existing), docs/plan/ (this file) [DONE] - .github/workflows/ci.yml [DONE] - Baseline configuration: - ruff.toml [DONE] - mypy.ini [DONE] - .editorconfig [DONE] - .gitignore (Python + uv caches) [DONE] - Documentation: <<<<<<< HEAD - README.md (quickstart/dev loop) [UPDATED] - CHANGELOG.md (Keep a Changelog format, SemVer) [UPDATED] - LICENSE (BSD 3-Clause) [ADDED] - Verified CI run passing on main branch with the scaffold. [DONE]
Scope and Tasks 1) Repository and tooling - Create pyproject.toml: - Project metadata (name: meridian-runtime, version: 0.0.0, license: BSD 3-Clause) - Dependencies: none (runtime) for M1 - Dev dependencies: ruff, black, mypy, pytest, pytest-cov, types-* - [tool.ruff], [tool.black], [tool.pytest.ini_options] sections - Initialize uv workflow: - uv init, uv lock, uv sync - Doc quickstart commands in README
2) Codebase layout - Create packages: - src/meridian/init.py - src/meridian/core/init.py - src/meridian/observability/init.py - src/meridian/utils/init.py - examples/init.py - Add placeholder modules with TODO headers so imports resolve in tests.
3) Static checks and quality gates - Configure ruff: - Enable common rule sets (E, F, I, UP, B) - Line length 100–120; exclude generated artifacts - Configure black: - Line length consistent with ruff - Configure mypy: - Python version 3.11 - disallow_untyped_defs = True (at least in src/) - warn_unused_ignores = True - strict Optional handling~ - separate section for tests with relaxed rules - Add EditorConfig and .gitignore: - Normalize whitespace, end-of-line, utf-8 - Ignore .venv, .python-version, .mypy_cache, .ruff_cache, .pytest_cache, .coverage, dist, build
4) Testing scaffold
- tests/unit/test_smoke.py:
- Verifies package import and versions [DONE]
- tests/integration/test_examples_smoke.py:
- Placeholder to run a no-op example and import examples
package [DONE]
- Configure pytest.ini (inside pyproject):
- testpaths = ["tests"] [DONE]
- addopts = "-q --cov=src --cov-report=term-missing --cov-fail-under=0" (temporary for M1) [DONE]
- pythonpath = ["src", "."] to allow importing examples
[DONE]
- markers for unit and integration [DONE]
5) CI pipeline - Workflow triggers: push and pull_request on main and feature branches [DONE] - Jobs: - setup: checkout, set up Python 3.11, install uv [DONE] - deps: uv lock && uv sync [DONE] - lint: ruff check ., black --check . [DONE] - type: mypy src [DONE] - test: uv run pytest [DONE] - package: build sdist/wheel and upload artifacts [DONE] - Artifacts: - Upload coverage xml and dist/ artifacts [DONE]
6) Documentation updates - README sections: - Quickstart (uv commands) - Development (lint, type, test) - Contributing conventions (SRP/DRY, ~200 LOC/file, typing) - CHANGELOG.md initialized with Unreleased section - LICENSE file added
Acceptance Criteria - Running the following locally works without errors: - uv lock && uv sync [PASS] - uvx ruff check . [PASS] - uvx black --check . [PASS] - uvx mypy src [PASS] - uv run pytest (coverage gate temporarily relaxed for M1) [PASS] - CI runs the same checks and passes on a fresh clone. [PASS] - Coverage gate temporarily relaxed for M1; to be raised in subsequent milestones. [PASS] - Repository contains README, LICENSE, CHANGELOG, and baseline scaffolds. [PASS]
Risks and Mitigations - Divergent local dev environments: - Mitigation: Use uv exclusively; document commands in README; provide .editorconfig. - Slow CI feedback: - Mitigation: Cache uv artifacts; split jobs; run lint/type before tests to fail fast. - Overly strict typing blocking progress: - Mitigation: Strict in src/, relaxed in tests/; allow per-file overrides with justification.
Out of Scope (future milestones) - Core runtime modules (message, ports, edge, node, subgraph, scheduler) - Observability exporters and tracing hooks - Examples beyond smoke - Release automation
Notes/Deviations for M1 - Coverage threshold relaxed to fail-under=0 to allow scaffolding to pass before core runtime work lands; will be raised later (target ≥90% core, ≥80% overall). - examples/ is a placeholder; integration smoke ensures import shape only. - Dev tooling can be invoked via uvx locally; CI uses uv run to mirror a synced environment.
Traceability - Supports Implementation Plan M1 in the technical blueprint. - Satisfies EARS operational requirements for bootstrap, dev loop, and CI quality gates.
Checklist - [ ] pyproject.toml created and configured - [ ] uv lock/sync completes cleanly - [ ] ruff, black, mypy, pytest configs added - [ ] src/, tests/, examples/ scaffolds exist - [ ] CI workflow defined and passing - [ ] README, LICENSE, CHANGELOG present - [ ] Coverage threshold configured and enforced