refactor(P57): contract surface redesign + rename + .yml repo-wide
Contract surface redesign: - New top-level fields: id (3-6 char acronym → stack.name), name (full → stack.title), infrastructure (map keyed by module name, replaces module:) - Drop uses: field (dead reference; version pin lives in CI workflow uses: line) - Drop top-level module/inputs (now nested under infrastructure map) - Per-module optional version (defaults to latest published from registry) - Multi-module contracts: one file deploys N modules in one pipeline run, resource IDs namespaced with module name to avoid collisions - stack.schema.json: add optional title field for display name Rename: - pipelines/deploy.yaml → pipelines/contract.yml (declarative spec, not a pipeline) - pipelines/ci.yaml → pipelines/ci.yml - All 44 .yaml files → .yml repo-wide (contracts, module examples, kyverno policies) - .acdl/contract.yaml → .acdl/contract.yml Resolver (core/contract_resolver.py): - Rewrite resolve() to loop infrastructure map, default version to latest, merge module fragments into one stack with namespaced resource IDs - _latest_version() picks highest non-deprecated from registry - _namespace_resources() prefixes IDs + rewrites ref: expressions for multi-module - Single-module path: unprefixed IDs (backward compatible) Verification: - 494 tests pass (0 contract-shape failures) - Local E2E passes (contract → resolver → adapter → local ECS HTTP 200 → outbox) ---ci--- project: acdl phase: 57 milestone: v1.10.2 status: execute ---/ci---
This commit is contained in:
+14
-14
@@ -46,8 +46,8 @@ Every L1 primitive MUST contain, at minimum:
|
||||
| `interface.json` | Angine-agnostic declaration: inputs, outputs, NFRs, optional multi-resource graph. |
|
||||
| `instance.json` | A concrete instance used as the adapter regression baseline. |
|
||||
| `README.md` | Plain-language documentation following `README-TEMPLATE.md` (see §7). |
|
||||
| `examples/simple.yaml` | A minimal contract that uses the primitive with required inputs only. |
|
||||
| `examples/complex.yaml` | A contract that exercises optional inputs, NFRs, and (if applicable) the multi-resource graph. |
|
||||
| `examples/simple.yml` | A minimal contract that uses the primitive with required inputs only. |
|
||||
| `examples/complex.yml` | A contract that exercises optional inputs, NFRs, and (if applicable) the multi-resource graph. |
|
||||
|
||||
Directory layout:
|
||||
|
||||
@@ -57,8 +57,8 @@ modules/l1/<name>/
|
||||
instance.json
|
||||
README.md
|
||||
examples/
|
||||
simple.yaml
|
||||
complex.yaml
|
||||
simple.yml
|
||||
complex.yml
|
||||
```
|
||||
|
||||
### 2.2 interface.json schema
|
||||
@@ -225,8 +225,8 @@ asset site behind CloudFront + WAF). It is declared by a
|
||||
|------|---------|
|
||||
| `composition.json` | The composition tree: children, wires, outputs, optional features. |
|
||||
| `README.md` | Plain-language documentation following `README-TEMPLATE.md` (see §7). |
|
||||
| `examples/simple.yaml` | A minimal contract that uses the module with required inputs only. |
|
||||
| `examples/complex.yaml` | A contract that exercises optional inputs and feature flags. |
|
||||
| `examples/simple.yml` | A minimal contract that uses the module with required inputs only. |
|
||||
| `examples/complex.yml` | A contract that exercises optional inputs and feature flags. |
|
||||
|
||||
Directory layout:
|
||||
|
||||
@@ -235,8 +235,8 @@ modules/l2/<name>/
|
||||
composition.json
|
||||
README.md
|
||||
examples/
|
||||
simple.yaml
|
||||
complex.yaml
|
||||
simple.yml
|
||||
complex.yml
|
||||
```
|
||||
|
||||
There is no `instance.json` for an L2 module — the L2 is deployed by
|
||||
@@ -433,8 +433,8 @@ Every module README MUST follow the structure of
|
||||
8. `## Compliance extension points` — resources or behaviors that could
|
||||
be added for the future compliance milestone (GDPR, SOX, SOC2,
|
||||
DORA). Not implemented yet; listed so the redesign can plan for them.
|
||||
9. `## Examples` — links to `examples/simple.yaml` and
|
||||
`examples/complex.yaml` with a one-line description of each.
|
||||
9. `## Examples` — links to `examples/simple.yml` and
|
||||
`examples/complex.yml` with a one-line description of each.
|
||||
10. `## Versioning` — the module's semver policy: interface MAJOR,
|
||||
behavior MINOR, lifecycle PATCH. MAJOR bumps require a new
|
||||
`registry.json` entry (immutable publication); old entries enter a
|
||||
@@ -514,12 +514,12 @@ must be checked before the module is registered and published.
|
||||
|
||||
- [ ] All required files present:
|
||||
- L1: `interface.json`, `instance.json`, `README.md`,
|
||||
`examples/simple.yaml`, `examples/complex.yaml`.
|
||||
- L2: `composition.json`, `README.md`, `examples/simple.yaml`,
|
||||
`examples/complex.yaml` (no `instance.json`).
|
||||
`examples/simple.yml`, `examples/complex.yml`.
|
||||
- L2: `composition.json`, `README.md`, `examples/simple.yml`,
|
||||
`examples/complex.yml` (no `instance.json`).
|
||||
- [ ] `interface.json` (L1) / `composition.json` (L2) validates against
|
||||
`schemas/stack.schema.json`.
|
||||
- [ ] `examples/simple.yaml` and `examples/complex.yaml` validate
|
||||
- [ ] `examples/simple.yml` and `examples/complex.yml` validate
|
||||
against `schemas/contract.schema.json`.
|
||||
- [ ] Module registered in `modules/registry.json` at its semver with a
|
||||
full ISO 8601 `published_at` and `deprecated: false`.
|
||||
|
||||
Reference in New Issue
Block a user