Skip to content

Milestone 1 — Foundation, contracts, and access control

Status: implemented and locally verified. This milestone stops before agent execution and the rest of the product views.

Delivered

  • Modular Python/Node monorepo with apps/web, apps/api, packages/contracts, infra, tests, and docs.
  • Python 3.12 / uv API with FastAPI, Pydantic v2, async SQLAlchemy, Alembic, PostgreSQL 16, and Redis.
  • Next.js 16 App Router UI with sign-in, project list/create, repository registration, Tailwind v4, and shadcn/ui component conventions.
  • Pydantic task stages, independent run status, task state, event, error, identity, authorization context, specification revision, artifact metadata, project, and repository schemas. Domain code guards lifecycle transitions and optimistic versions. All canonical server schemas are published in OpenAPI and TypeScript types are generated from that document; the web app consumes generated project/repository types.
  • Initial migration for organizations, users, memberships, projects, project memberships, repositories, tasks, and idempotency records. Task records reserve branch return stage and keep lifecycle stage independent from run status. Migration history is recorded by Alembic and organizations carry a schema version.
  • FastAPI Users cookie authentication, one-time administrator bootstrap, 12-character password floor, organization and project authorization, HttpOnly cookie, SameSite=Lax, production Secure-cookie requirement, double-submit CSRF on login and mutations, exact Origin allowlist, and transactionally idempotent project/repository POSTs.
  • A shared project authorization service scopes repository operations and project discovery to local organization/project memberships. Milestone 1 has no task or artifact HTTP endpoints or artifact storage; those resources remain inaccessible until their later API surfaces are implemented with this same project-scope check.
  • Repository registration is restricted to exact administrator-configured target IDs. No GitHub authorization, repository fetch, clone, or scan occurs.
  • Podman Compose services, health/readiness endpoints, .env.example, and startup instructions.

Verification performed (2026-10-22)

  • uv lock — resolved 55 packages; uv sync --all-groups succeeded with Python 3.12.15.
  • CI=true pnpm install --frozen-lockfile — succeeded using pnpm 10.34.7.
  • podman compose -f infra/compose.yaml config — valid Compose configuration.
  • podman compose -f infra/compose.yaml up --build -d — API, web, PostgreSQL, and Redis images built and services started. Host ports 3000 and 8010 were already occupied, so this verification used WEB_PORT=3001 and API_PORT=8011 without stopping the existing services.
  • Fresh PostgreSQL migration — 0001_foundation applied; confirmed alembic_version and all eight application tables. A second alembic upgrade head succeeded as a no-op.
  • GET /health/ready — returned HTTP 200 with {"status":"ready"}.
  • Live API flow — administrator bootstrap (201), CSRF cookie/token (200), login without CSRF rejected (403), cookie sign-in with Origin and CSRF (204), project creation (201), matching idempotency retry replay (201 with Idempotency-Replayed: true), explicit repository registration (201), unconfigured target rejection (422), unauthenticated project list (401). An organization operator without project membership sees an empty project list and receives 403 for another project’s repository route.
  • Generated contracts — HARNESSA_API_URL=http://localhost:8011 pnpm contracts:generate passed; verified generated types include task stages, run status, event, error, identity, authorization, task state, specification revision, and artifact metadata.
  • pnpm --filter @harnessa/web typecheck — passed with generated API response/request types.
  • pnpm --filter @harnessa/web lint — passed.
  • uv run ruff check apps/api tests — passed.
  • pnpm test / uv run pytest — 6 passed. Starlette emitted an upstream BlockingPortal deprecation warning.
  • pnpm --filter @harnessa/web build and the Next.js production image build — passed; routes /, /login, and /projects prerendered.

Setup still required

  • Copy .env.example to .env; set unique secret values and exact repository target allowlist before use. Source the file into the shell before Compose so configured host ports are applied. The local .env used during development verification is not committed.
  • Expose the web/API through a TLS proxy and set COOKIE_SECURE=true for production.
  • Use a new database or existing compatible database before first bootstrap. Bootstrap can run once per database.
  • Update image/library pins through a reviewed compatibility cycle before upgrades.

Milestone 2 boundary

No worker job execution, agent/provider adapter, OpenSpec task workflow, GitHub App/webhooks, event stream, task API, artifact storage, verification runner, Harness² integration, routing/budgets, or later UI views are implemented or claimed here. Their extension points and future entity reservations are recorded in architecture.md.

Design-system reference follow-up

The original milestone 1 report and prompt refer to docs/design-system.md, but that artifact was missing from the repository when the report was written. The parallel web foundation now supplies the shared design system, semantic tokens, and React/Svelte component packages in design-system.md. This follow-up repairs the missing reference for later frontend adoption; it does not change milestone 1's original implementation or verification claims.