d103a37419
---ci--- project: acdl phase: 14 milestone: v1.2 status: verify verdict: VERIFIED requirements: covered: [REQ-32] ---/ci--- Phase 14 plan-as-execute + verify. scripts/verify_phase14.sh green. l2-microservice composition (6 L1s, 2 wire kinds); contract schema extended (inputs allow objects + healthcheck); resolver extended (array-form wires, child->child refs, multi-resource L1 expansion); adapter extended (ref: interpolation translation). v1.2 IR: 11 resources. v1.1 S3 regression byte-identical. Ready to ship v1.2.4.
32 lines
2.0 KiB
Markdown
32 lines
2.0 KiB
Markdown
---
|
|
phase: 14
|
|
name: l2-microservice-and-contract-schema
|
|
milestone: v1.2
|
|
requirements: [REQ-32]
|
|
type: feat
|
|
branch: phase/14-l2-microservice-and-contract-schema
|
|
---
|
|
|
|
# Phase 14 — l2-microservice-and-contract-schema (v1.2) PLAN
|
|
|
|
## Goal
|
|
|
|
Author `l2-microservice` thin-composition (6 ECS L1s, depth ≤ 5), extend the contract schema for microservice inputs, extend the resolver for child→child wiring, and verify contract→IR resolution yields a complete target stack.
|
|
|
|
## Tasks
|
|
|
|
### T-14.1 — l2-microservice composition
|
|
Create `modules-ir/l2/l2-microservice/composition.json` + `README.md`. Register in `modules-ir/registry.json` at 1.0.0. 6 children: vpc, cluster, ecr, roles, alb, service. Wires: contract→child passthrough (name, cidr, azs, image, port, cpu, memory, env, protocol) + child→child refs (cluster.cluster_arn→service.cluster_arn, vpc.subnet_ids→service.subnets + alb.subnets, alb.target_group_arn→service.lb_target_group_arn, roles.role_arn→service.security_group). Wire format: `"source": "child:<id>.<output>"` for child→child.
|
|
|
|
### T-14.2 — Contract schema extension
|
|
Extend `schemas/contract.schema.json`: `inputs.additionalProperties` allows objects too (for env map + healthcheck). Add optional `healthcheck` top-level field (object). Create `contracts/microservice.yaml` (dev, l2-microservice, inputs: name/cidr/azs/image/port/cpu/memory).
|
|
|
|
### T-14.3 — Resolver child→child wiring
|
|
Extend `acdl_platform/contract_resolver.py`: second pass for wires with `"source": "child:<id>.<output>"` → emit `"ref:<id>.<output>"` string in the child's inputs. Handle multi-resource L1s: iterate the L1's `resources` array, emit one IR resource per entry (prefix id with child id). Adapter translates `ref:X.Y` → `${<tf_type>.<X>.<attr>}`.
|
|
|
|
### T-14.4 — Verify
|
|
`contracts/microservice.yaml` → resolver → IR (all 6 L1s' resources) → adapter → `terraform validate`. v1.1 spike regression. `scripts/verify_phase14.sh`.
|
|
|
|
## Ship
|
|
|
|
Merge → `main` (--no-ff). Tag `v1.2.4`. |