60f767d125
acdl-ci / Lint (pull_request) Successful in 8s
acdl-ci / Test (pull_request) Failing after 1m59s
acdl-ci / Platform check-only (offline) (pull_request) Successful in 10s
acdl-modules-lifecycle / Platform VPC apply (pull_request) Failing after 23s
acdl-modules-lifecycle / L1 lifecycle (alb) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (cloudfront) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (ecr) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (ecs-cluster) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (ecs-service) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (iam-role) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (kms-key) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (rds) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (s3) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (uptime) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (vpc) (pull_request) Has been skipped
acdl-modules-lifecycle / L1 lifecycle (waf) (pull_request) Has been skipped
acdl-modules-lifecycle / Platform VPC destroy (pull_request) Failing after 22s
3 fixes found during the pipeline-readiness audit (all 24 example contracts now resolve + adapt + pass --check-only): 1. core/contract_resolver.py: L1 resolver resource id now replaces underscores with hyphens (task_definition → task-definition), matching the L2 resolver pattern. The stack schema requires ^[a-z][a-z0-9-]*$ (no underscores). 2. schemas/stack.schema.json: relaxed input type constraint to allow array + object (was string/number/boolean only). Real-world inputs include lists (monitored_endpoints, static_checks, rules) and dicts (alert_channels). 3. scripts/run_platform.sh: AWS creds loading is now conditional — if AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY are already set (by the CI configure-aws-credentials action), skip loading .env.secrets. This makes the --apply/--destroy modes work in CI without the gitignored secrets file. Regression: 479 passed, 0 skipped, 5 deselected. ---ci--- project: acdl phase: P59 milestone: v1.11 status: execute ---/ci---
ACDL Schemas
Overview
ACDL uses JSON Schema draft 2020-12 for all declarative contracts. Schemas are the single source of truth for validation. Every contract, stack instance, pipeline, and policy result in the platform is validated against a schema in this directory before it is consumed by any downstream code path. The resolver, the pipeline runner, the CI workflows, and the test suite all load these schemas directly.
Existing Schemas
| Schema | File | Purpose | Where Validated |
|---|---|---|---|
| ACDL Consumer Contract | contract.schema.json |
Consumer contract validation (id, name, environment, infrastructure map with module versions + inputs) | core/contract_resolver.py, scripts/run_platform.sh Step 1, CI schema-validation job |
| ACDL Target Stack | stack.schema.json |
Target Stack instance validation (resources, relationships, composition tree, NFRs) | core/contract_resolver.py (post-resolution), tests/conftest.py |
| ACDL Central Pipeline Contract | pipeline.schema.json |
Central CI pipeline contract (stages, commands, triggers, runner) | tests/test_pipeline_contract.py |
| ACDL Central Deployment Pipeline Contract | deploy-pipeline.schema.json |
Central deploy pipeline contract (validate → resolve → plan → checkov → confidence → apply → publish → uptime → comment) | tests/test_pipeline_contract.py |
| ACDL PolicyCheckResult | policy_check_result.schema.json |
Normalized policy check result schema (the contract between policy engines and the confidence signal) | tests/conftest.py, all adapter tests |
| ACDL Tagging Standard | tagging-standard.json |
Required tag set for all taggable AWS resources | adapters/terraform/policy/custom_rules/acdl_tagging.py |
How to Write a Schema
- Use JSON Schema draft 2020-12:
"$schema": "https://json-schema.org/draft/2020-12/schema". - Set
$idtohttps://acdl.cloudinit.dev/schemas/<name>.schema.json. - Include
titleanddescriptionat the document root. - Set
type: objectat the document root. - Declare a
requiredarray listing the mandatory top-level property names. - Define
propertieswith explicittype,pattern,enum, anddescriptionfor every field. - Use
$defsfor reusable sub-schemas (e.g. resource definitions, input maps) and$refthem from the main document.
How to Wire a Schema into the Platform
- Contract validation — load the schema in
core/contract_resolver.pyand inscripts/run_platform.shStep 1 (validate-contract). - Stack validation — load the schema in
core/contract_resolver.pyafter the contract is resolved to a stack instance. - Pipeline validation — load the schema in
tests/test_pipeline_contract.py, which validatespipelines/ci.ymlandpipelines/contract.yml. - Module interface validation — structural checks in
.github/workflows/platform-test.yml(schema-validationjob) that validate each module'sinterface.json/composition.json. - Policy result validation — the schema is loaded as a fixture in
tests/conftest.pyand reused by every adapter test to validate emittedPolicyCheckResultrecords.
Dependencies
jsonschema(Python) — installed viarequirements-test.txt.pyyaml— for YAML contract loading (core/contract_resolver.py,scripts/run_platform.sh, tests).
How to Test Schemas in CI
tests/test_pipeline_contract.py— validates the pipeline schemas and asserts workflow conformance (byte-identical Gitea/GitHub workflows, same stages/commands/triggers).tests/conftest.py— providesstack_schemaandpolicy_check_result_schemafixtures for reuse across the test suite..github/workflows/platform-test.ymlschema-validationjob — self-validates every schema inschemas/(each schema is loaded and meta-validated), validates module interfaces, and validates example contracts.
Where to Write Tests
tests/test_<schema_name>.pyfor schema-specific tests (e.g.tests/test_contract_schema.py).- Extend
tests/test_pipeline_contract.pyfor pipeline-schema changes. - Module interface validation lives in the CI workflow (
.github/workflows/platform-test.yml).
Adding a New Schema
- Create
schemas/<name>.schema.jsonusing the draft 2020-12 conventions above. - Add it to the CI validation glob in
.github/workflows/platform-test.yml(schema-validationjob). - Write a test in
tests/test_<name>.pythat loads the schema and validates representative valid/invalid documents. - Wire it into the consuming code path (resolver, script, or test) so it is enforced at runtime.