refactor(modules): remove thin-composition layer; rewrite all module READMEs
The L2 thin-composition layer (composition.json + contract_resolver.py + contract schema + sample contracts) has been removed completely. The implementation was unsatisfactory and is deferred for a later redesign. - Delete: composition.json x2, contract_resolver.py, contracts/ x2, contract.schema.json - Patch: run_platform.sh now loads a pre-existing IR instance instead of resolving a contract (the downstream adapter/checkov/confidence/outbox pipeline is unchanged) - Prune: L2 entries removed from registry.json (L1 entries unchanged) - Rewrite: all 7 L1 module READMEs in plain language (no jargon), each with Resources/Inputs/Outputs/Usage/Compliance-extension-points/Versioning sections derived from interface.json - Add: 2 L2 placeholder READMEs noting the composition is under redesign - Add: modules-ir/README.md catalog index + README-TEMPLATE.md ---ci--- project: acdl phase: 17 milestone: v1.3 status: execute ---/ci---
This commit is contained in:
+17
-12
@@ -1,12 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# scripts/run_platform.sh - the ACDL platform pipeline (consolidated from
|
||||
# the v1.1 spike scripts run_spike_e2e.sh + run_spike_plan.sh per D-048).
|
||||
# scripts/run_platform.sh - the ACDL platform pipeline.
|
||||
#
|
||||
# Default: full end-to-end pipeline (contract resolution -> IR -> terraform
|
||||
# plan (real AWS) -> Checkov -> PolicyCheckResult -> confidence signal ->
|
||||
# evidence event to DynamoDB outbox).
|
||||
# --plan-only: contract resolution + adapter + terraform init/validate/plan
|
||||
# (steps 1-4), then exit.
|
||||
# Default: full end-to-end pipeline (load pre-existing IR instance ->
|
||||
# adapter -> terraform plan (real AWS) -> Checkov -> PolicyCheckResult ->
|
||||
# confidence signal -> evidence event to DynamoDB outbox).
|
||||
# --plan-only: load IR + adapter + terraform init/validate/plan (steps
|
||||
# 1-4), then exit.
|
||||
#
|
||||
# NOTE: contract resolution (contract_resolver.py) was removed when the
|
||||
# thin-composition layer was taken out. The pipeline now starts from a
|
||||
# pre-existing IR instance (modules-ir/l1/l1-s3/spike_instance.json). A
|
||||
# new contract-resolution mechanism will be designed in a later phase.
|
||||
#
|
||||
# Uses the rotated spike key (D-039/D-047) from gitignored .env.secrets.
|
||||
# Plan-only (no apply); -lock=false per D-P09-1.
|
||||
@@ -33,14 +37,15 @@ export AWS_ACCESS_KEY_ID="$ACDL_AWS_ACCESS_KEY_ID"
|
||||
export AWS_SECRET_ACCESS_KEY="$ACDL_AWS_SECRET_ACCESS_KEY"
|
||||
export AWS_DEFAULT_REGION="$AWS_DEFAULT_REGION"
|
||||
|
||||
CONTRACT="contracts/spike.yaml"
|
||||
CONTRACT_ID="11111111-1111-1111-1111-111111111111" # spike fixed UUID
|
||||
WORK="/tmp/spike_e2e"
|
||||
rm -rf "$WORK"; mkdir -p "$WORK"
|
||||
|
||||
echo "=== Step 1+2: resolve contract -> IR (validates contract schema + IR schema) ==="
|
||||
python3 acdl_platform/contract_resolver.py "$CONTRACT" "$WORK/spike_ir.json" || fail "contract resolution failed"
|
||||
python3 -c "import json; d=json.load(open('$WORK/spike_ir.json')); print(f\"IR: {d['stack']['name']} {d['stack']['kind']} {len(d['resources'])} resource(s)\")"
|
||||
echo "=== Step 1+2: load pre-existing IR instance (contract resolution deferred) ==="
|
||||
IR_INSTANCE="modules-ir/l1/l1-s3/spike_instance.json"
|
||||
[ -f "$IR_INSTANCE" ] || fail "IR instance $IR_INSTANCE missing (contract resolution is deferred; load a pre-existing IR)"
|
||||
python3 -c "import json; d=json.load(open('$IR_INSTANCE')); print(f\"IR: {d['stack']['name']} {d['stack']['kind']} {len(d['resources'])} resource(s)\")"
|
||||
cp "$IR_INSTANCE" "$WORK/spike_ir.json"
|
||||
|
||||
echo "=== Step 3: adapter compiles IR -> terraform/spike/*.tf (regenerate) ==="
|
||||
python3 adapters/terraform/adapter.py "$WORK/spike_ir.json" terraform/spike || fail "adapter failed"
|
||||
@@ -112,5 +117,5 @@ echo "outbox: $(python3 -c "import json; d=json.load(open('$WORK/outbox_item.jso
|
||||
|
||||
echo ""
|
||||
echo "=== PLATFORM E2E OK ==="
|
||||
echo "contract=$CONTRACT -> IR -> terraform plan -> Checkov -> confidence ($BAND) -> outbox"
|
||||
echo "IR instance -> terraform plan -> Checkov -> confidence ($BAND) -> outbox"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user