Phase A: Declarative deploy bundle and walking skeleton#1
Open
dealzguy wants to merge 3 commits into
Open
Conversation
Resolves the two repo-init liquids (repo layout; SDK/dependency pins) per Doc 12 §11 and Doc 13 Phase A, then implements the declarative deploy bundle and Temporal walking skeleton: - deploy/compose.yaml: 4-pod provisional compose manifest (persistence, orchestration, inference, harness); two Postgres instances with separate volumes enforcing the hard two-database rule; three-way software/config/data separation throughout; secrets delivered through .env.example contract seam - src/harness/: Python harness with mode-visible layout (operations/ vs commissioning/); infer contract interface + Phase A stub; HelloWorkflow + greet_activity demonstrating the determinism boundary; Temporal worker entry point reading address/queue/namespace from env - tests/: 5 in-process tests (no containers) — hello workflow (2), infer stub (3); all passing against temporalio 1.28.0 / Python 3.12.3 - docs/ENVIRONMENT.md: confirmed temporalio 1.28.0 pin, all license tiers verified green per Doc 8, host assumptions, open liquids recorded Phase A exit gate: `make test` passes; `deploy/README.md` documents the kill-the-worker durability procedure and three-way separation inspection. https://claude.ai/code/session_01UmuJ49V2JCWgYpbqrfn8kT
Docker is not available on the development machine. Revert to podman compose / podman-compose as the local dev runtime. - Makefile: `docker compose` → `podman compose` - deploy/README.md: Podman-native prerequisites; install podman-compose via pip; note GPL-2.0 "separate process" status per Doc 8 - docs/ENVIRONMENT.md: update dev tooling row accordingly compose.yaml syntax is unchanged (standard Docker Compose v3 works with both runtimes). https://claude.ai/code/session_01UmuJ49V2JCWgYpbqrfn8kT
Review pass against the approved Phase A plan found six defects, all fixed: - compose.yaml: remove stale docker-compose/DOCKER_HOST header text; drop env_file blanket injection (each pod now receives only its own credentials via per-service environment); drop the temporal healthcheck (the `temporal` CLI is not guaranteed inside the auto-setup image — a failing check would wedge dependents); use short-form depends_on throughout for podman-compose compatibility - worker.py: bounded connection retry (30 x 2s) replaces healthcheck- conditioned startup ordering - workflows/hello.py: activity start-to-close 30s -> 10s so the post-kill retry fires quickly in the durability demo - deploy/README.md: durability demo rewritten around the containerized worker (one-paste trigger + podman compose kill); the previous procedure started a second host worker on the same task queue, which could absorb the workflow and void the demonstration; Temporal CLI added to prerequisites; three-way separation inspection now uses podman commands - .dockerignore: keep .git/.venv out of the image build context - docs/ENVIRONMENT.md: stale Docker host assumptions replaced with podman-native ones; Temporal CLI (MIT, green) recorded - Makefile: add `make ps` - pyproject.toml: harness license metadata (Proprietary, outbound EULA) Tests: 5/5 passing. https://claude.ai/code/session_01UmuJ49V2JCWgYpbqrfn8kT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This commit implements the Phase A infrastructure and walking skeleton as specified in the approved Phase A plan. It establishes the declarative deploy bundle (Docker Compose), the harness package structure, and smoke tests demonstrating durable execution through Temporal.
Key Changes
Deploy Bundle
deploy/compose.yaml: Four-service declarative manifest (business Postgres + pgvector, Temporal + its own Postgres, Ollama, harness worker)deploy/.env.example: Secrets contract template for environment configurationdeploy/postgres/init.sql: pgvector extension initialization (CRM schema deferred to Phase B)deploy/temporal/dynamicconfig/development.yaml: Temporal dynamic config for local devdeploy/README.md: Lay-down, smoke test, and durability demonstration proceduresHarness Package Structure
src/harness/worker.py: Temporal worker entry point readingTEMPORAL_ADDRESS,TEMPORAL_TASK_QUEUE,TEMPORAL_NAMESPACEfrom environmentsrc/harness/operations/workflows/hello.py: Hello-world workflow withworkflow.patched()versioning patternsrc/harness/operations/activities/hello.py: Hello-world activity with 2-second sleep (enables kill-the-worker durability test)src/harness/contracts/infer.py: Infer contract seam with stub implementation; real Ollama + LiteLLM backend deferred to Phase Csrc/harness/substrate/andsrc/harness/commissioning/: Placeholder directories for Phase B and Phase D respectivelyTests
tests/test_hello_workflow.py: In-process workflow test using Temporal's time-skipping test environment (no containers required)tests/test_infer_stub.py: Smoke test through the infer contract stub interface (no model call, no containers)Project Configuration
pyproject.toml: Python 3.12+,temporalio>=1.7.0,<2.0, dev extras for pytest and pip-licensesDockerfile: Multi-stage build using uv for dependency management; runs harness workerMakefile: Targets forup,down,test,logs,shell,licenses.gitignore: Secrets, Python artifacts, data volumes, editor filesdocs/ENVIRONMENT.md: Phase A build document recording resolved liquids, dependency pins with license tiers, and host assumptionsImplementation Details
workflow.patched()established in hello-world workflow to support safe versioning of in-flight executionsinfer()raisesNotImplementedError;infer_stub()returns canned response for smoke testing.envviadeploy/.env.examplecontractAll dependency pins are recorded in
docs/ENVIRONMENT.mdwith license tiers per Doc 8. Temporal Python SDK 1.28.0 (resolved by uv) is verified against server 1.25.2.https://claude.ai/code/session_01UmuJ49V2JCWgYpbqrfn8kT