You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .planning/REQUIREMENTS.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,19 @@
15
15
-[x]**QUAL-01**: Unit, API, contract, static, and container configuration checks run in CI.
16
16
-[x]**DOC-01**: Architecture, threat model, operations, and local workflow are documented.
17
17
18
+
## Phase 2 Requirements — Telemetry Hardening
19
+
20
+
-[x]**TEL-01**: OpenTelemetry SDK wired into FastAPI lifespan — a `cas.api.workflows.execute` span is created for every /api/v1/workflows request, carrying `cas.correlation_id`, `cas.run_id`, and `cas.intent` attributes.
21
+
-[x]**TEL-02**: Canonical CAS lifecycle events emitted as span events: `workflow.started` (with correlation_id + run_id), `workflow.completed` on success, `workflow.failed` on error — never both completed and failed.
22
+
-[x]**TEL-03**: W3C trace context headers (`traceparent` / `tracestate`) propagated on inbound requests via `W3CTraceContextMiddleware`; downstream spans are parented to the caller's trace.
23
+
-[x]**TEL-04**: Application Insights exporter active when `APPLICATIONINSIGHTS_CONNECTION_STRING` env var is set (no-op if absent); uses managed identity and privacy-hardened instrumentation options.
24
+
25
+
## Phase 3 Requirements — Docker + CI Publish
26
+
27
+
-[x]**DOCK-01**: Dockerfile is multi-stage (builder + runtime), targets linux/amd64, exposes port 8080, runs as non-root user `appuser`, and health-checks via /health/ready.
28
+
-[x]**DOCK-02**: `docker-compose.yml` defines a local dev stack (`cas-ref` service, ports 8080:8080, env_file .env.example) that starts without Azure credentials.
29
+
-[x]**DOCK-03**: CI pipeline (`docker` job in ci.yml) builds the image, runs a health-check smoke test, and pushes to `ghcr.io/coding-autopilot-system/cas-reference-product` on merge to main.
30
+
18
31
## Out of Scope
19
32
20
33
| Feature | Reason |
@@ -26,7 +39,8 @@
26
39
## Traceability
27
40
28
41
All v0.1 requirements map to Phase 1 and are complete.
42
+
TEL-01 through TEL-04 map to Phase 2 and are complete.
43
+
DOCK-01 through DOCK-03 map to Phase 3 and are complete.
29
44
30
45
---
31
-
*Last updated: 2026-06-11 after v0.1 implementation*
32
-
46
+
*Last updated: 2026-06-14 after Phase 2 and Phase 3 implementation*
Copy file name to clipboardExpand all lines: .planning/ROADMAP.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,3 +14,30 @@
14
14
15
15
Status: Complete
16
16
17
+
## Phase 2: Telemetry Hardening
18
+
19
+
**Goal:** Wire OpenTelemetry end-to-end with lifecycle span events, W3C trace propagation, and Application Insights exporter.
20
+
21
+
**Requirements:** TEL-01, TEL-02, TEL-03, TEL-04
22
+
23
+
**Success criteria:**
24
+
- Every /api/v1/workflows request creates a `cas.api.workflows.execute` span with correlation_id, run_id, and intent attributes.
25
+
- Span events `workflow.started`, `workflow.completed`, and `workflow.failed` are emitted at the appropriate lifecycle points.
26
+
- W3C traceparent/tracestate headers on inbound requests are extracted and linked as parent context.
27
+
- Application Insights exporter activates when APPLICATIONINSIGHTS_CONNECTION_STRING is set; no-op otherwise.
28
+
- All telemetry behaviours verified by pytest with InMemorySpanExporter.
29
+
30
+
Status: Complete
31
+
32
+
## Phase 3: Docker + CI Publish
33
+
34
+
**Goal:** Containerize the app with a production-grade multi-stage Dockerfile and publish the image to GHCR on merge to main.
35
+
36
+
**Requirements:** DOCK-01, DOCK-02, DOCK-03
37
+
38
+
**Success criteria:**
39
+
- Multi-stage Dockerfile builds a linux/amd64 image, runs as non-root `appuser`, exposes port 8080, and health-checks via /health/ready.
40
+
- docker-compose.yml starts the local dev stack with env stubs using .env.example.
41
+
- CI docker job builds, smoke-tests (/health/live + /health/ready), and on push to main pushes to ghcr.io/coding-autopilot-system/cas-reference-product.
Production-oriented CAS reference application demonstrating a complete workload integrated with **Microsoft Foundry Next Gen Agents** on a Container Apps foundation. Runs locally without Azure, deploys unmodified through the `cas-platform` interface.
4
+
5
+
## Project Context
6
+
7
+
See `.planning/PROJECT.md` for goals and requirements. This project is in early initialization.
8
+
9
+
**Core mandate**: Demonstrate canonical CAS lifecycle events, managed identity, observability, probes, and a safe local workflow — without embedding any Azure credentials.
10
+
11
+
## Tech Stack
12
+
13
+
| Layer | Technology |
14
+
|---|---|
15
+
| Language | Python 3.12+ |
16
+
| API framework | FastAPI + Pydantic |
17
+
| Azure identity |`ManagedIdentityCredential` (system-assigned; no embedded secrets) |
18
+
| Azure AI | Foundry Next Gen Agents (`WorkflowAgentService`) — never Classic Assistants |
0 commit comments