refactor(P21): rename acdl_platform/ -> core/ (REQ-53)
---ci--- project: acdl phase: 21 milestone: v1.6 status: execute ---/ci--- Rename the acdl_platform/ package to core/ across the directory, all imports in tests/scripts/pipelines/workflows, and doc references. The package is imported as core.confidence_signal / core.contract_resolver / core.outbox_writer. The deploy workflow's platform-repo checkout dir is renamed acdl-platform/ -> platform/ (workspace path, not the python package). Both .gitea + .github workflows stay byte-identical. Note: the original target name 'platform/' shadows Python's stdlib platform module (pytest's import uuid -> platform.system() fails when the repo root is on sys.path, which every test does). 'core/' avoids the clash while honoring the intent (drop the verbose acdl_platform). Tests: 154 pass. run_ci.sh green.
This commit is contained in:
+3
-3
@@ -42,9 +42,9 @@ echo ""
|
||||
|
||||
banner "Stage 1/3: lint (py_compile)"
|
||||
python3 -m py_compile \
|
||||
acdl_platform/confidence_signal.py \
|
||||
acdl_platform/outbox_writer.py \
|
||||
acdl_platform/contract_resolver.py \
|
||||
core/confidence_signal.py \
|
||||
core/outbox_writer.py \
|
||||
core/contract_resolver.py \
|
||||
adapters/terraform/adapter.py \
|
||||
adapters/terraform/policy/checkov_adapter.py \
|
||||
scripts/push_consumer_image.py \
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# --quiet suppress terraform/checkov streaming (output to log only)
|
||||
#
|
||||
# The contract file is a YAML file validated against schemas/contract.schema.json.
|
||||
# The resolver (acdl_platform/contract_resolver.py) resolves it to a Target Stack
|
||||
# The resolver (core/contract_resolver.py) resolves it to a Target Stack
|
||||
# instance, which the adapter (adapters/terraform/adapter.py) compiles to Terraform.
|
||||
#
|
||||
# Uses the rotated spike key (D-039/D-047) from gitignored .env.secrets.
|
||||
@@ -30,7 +30,7 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# Capture the caller's CWD before we cd to ROOT. The reusable deploy workflow
|
||||
# invokes this script from the CONSUMER repo's workspace root with a relative
|
||||
# contract path (e.g. .acdl/contract.yaml); the contract must resolve against
|
||||
# the consumer repo, not the platform repo (acdl-platform/). Without this, the
|
||||
# the consumer repo, not the platform repo (platform/). Without this, the
|
||||
# `[ -f "$CONTRACT" ]` check below looks for the contract inside the platform
|
||||
# repo and fails (P0 fix — see docs/CONSUMER_GUIDE.md Step 4).
|
||||
CALLER_CWD="$(pwd)"
|
||||
@@ -86,7 +86,7 @@ stream() {
|
||||
}
|
||||
|
||||
CONTRACT_ID="11111111-1111-1111-1111-111111111111" # spike fixed UUID
|
||||
WORK="/tmp/acdl_platform"
|
||||
WORK="/tmp/acdl_platform_run"
|
||||
rm -rf "$WORK"; mkdir -p "$WORK"
|
||||
|
||||
echo "=== Step 1: validate contract against contract.schema.json ==="
|
||||
@@ -101,7 +101,7 @@ print(f'contract: module={contract[\"module\"]} env={contract[\"environment\"]}
|
||||
|
||||
echo ""
|
||||
echo "=== Step 2: resolve contract -> Target Stack instance ==="
|
||||
python3 acdl_platform/contract_resolver.py "$CONTRACT" "$WORK/stack.json" || fail "resolver failed"
|
||||
python3 core/contract_resolver.py "$CONTRACT" "$WORK/stack.json" || fail "resolver failed"
|
||||
python3 -c "import json; d=json.load(open('$WORK/stack.json')); print(f'stack: {d[\"stack\"][\"name\"]} {d[\"stack\"][\"kind\"]} {len(d[\"resources\"])} resource(s)')"
|
||||
|
||||
echo ""
|
||||
@@ -211,7 +211,7 @@ echo ""
|
||||
echo "=== Step 7: confidence signal compute ==="
|
||||
python3 <<PY > "$WORK/signal.json" || fail "confidence signal failed"
|
||||
import json
|
||||
import acdl_platform.confidence_signal as c
|
||||
import core.confidence_signal as c
|
||||
pcr = json.load(open("$WORK/pcr.json"))
|
||||
inputs = {
|
||||
"policy": pcr,
|
||||
@@ -247,7 +247,7 @@ event = {
|
||||
}
|
||||
print(json.dumps(event, indent=2))
|
||||
PY
|
||||
python3 acdl_platform/outbox_writer.py "$WORK/event.json" > "$WORK/outbox_item.json" || fail "outbox write failed"
|
||||
python3 core/outbox_writer.py "$WORK/event.json" > "$WORK/outbox_item.json" || fail "outbox write failed"
|
||||
echo "outbox: $(python3 -c "import json; d=json.load(open('$WORK/outbox_item.json')); print('contractId=', d['contractId'], 'hash=', d['hash'][:16]+'...')")"
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user