verify(P3): dead-code-and-stale-prefix-cleanup — 4-layer verify PASS + ship

VERIFY: structural — dead export + stale comments + prefixes gone; behavioral — 616 tests + CI PASS; quality — env-override test updated.

---ci---
project: acdl
phase: 3
milestone: v1.16
status: complete
phase_role: execution
requirements:
  covered: [REQ-167]
  partial: []
---/ci---
This commit is contained in:
Jon Chery
2026-08-01 12:20:40 +00:00
parent 9421442afd
commit e048acd4dd
11 changed files with 31 additions and 33 deletions
+6 -6
View File
@@ -13,7 +13,8 @@ evidence event) runs end-to-end against the local tier with no AWS:
Each adapter exposes the same interface as the live counterpart so the
caller code path is unchanged; only the I/O target swaps. Selection is
gated on the NOVA_LOCAL_TIER env var (set by run_platform.sh --local).
Dual-read via core/env.py: NOVA_* preferred, ACDL_* fallback until P5.
Env vars read via core/env.py (NOVA_* only; the ACDL_* fallback was
removed in v1.15 P5, REQ-164).
"""
from __future__ import annotations
@@ -68,7 +69,7 @@ class FlatFileOutbox:
@classmethod
def create(cls, dir: Optional[Path] = None) -> "FlatFileOutbox":
d = Path(dir) if dir else Path(tempfile.mkdtemp(prefix="acdl_outbox_"))
d = Path(dir) if dir else Path(tempfile.mkdtemp(prefix="nova_outbox_"))
d.mkdir(parents=True, exist_ok=True)
out = cls(dir=d)
# Re-read the chain tail if the file already exists.
@@ -249,7 +250,7 @@ class LocalS3StateBackend:
@classmethod
def create(cls, dir: Optional[Path] = None) -> "LocalS3StateBackend":
d = Path(dir) if dir else Path(tempfile.mkdtemp(prefix="acdl_tfstate_"))
d = Path(dir) if dir else Path(tempfile.mkdtemp(prefix="nova_tfstate_"))
d.mkdir(parents=True, exist_ok=True)
return cls(state_dir=d)
@@ -499,9 +500,8 @@ def run_local_e2e(contract_path: str, repo_root: Optional[Path] = None) -> Dict[
if __name__ == "__main__":
contract = sys.argv[1] if len(sys.argv) > 1 else "contracts/microservice.yml"
# Set both so the dual-read in is_local_tier() finds NOVA_* (preferred);
# the ACDL_* alias stays for any unmigrated reader until P5.
# Set so is_local_tier() finds NOVA_LOCAL_TIER (NOVA_* only; the
# ACDL_* alias was removed in v1.15 P5, REQ-164).
os.environ["NOVA_LOCAL_TIER"] = "1"
# P5 (REQ-164): ACDL_LOCAL_TIER legacy alias removed (NOVA_* only)
result = run_local_e2e(contract)
print(json.dumps(result, indent=2))
+5 -5
View File
@@ -180,7 +180,7 @@ def _check_resolver_microservice() -> Tuple[Status, str]:
def _check_adapter_emits_terraform() -> Tuple[Status, str]:
"""CAP-005: terraform adapter compiles a resolved stack to .tf files."""
work = tempfile.mkdtemp(prefix="acdl_regr_")
work = tempfile.mkdtemp(prefix="nova_regr_")
stack_path = os.path.join(work, "stack.json")
tf_dir = os.path.join(work, "tf")
os.makedirs(tf_dir, exist_ok=True)
@@ -211,7 +211,7 @@ def _check_interpolation() -> Tuple[Status, str]:
"import sys; sys.path.insert(0,'.'); "
"from core.contract_resolver import _expand_vars; "
"ctx={'env':{'environment':'qa','account_id':'123'},'contract':{'id':'assets'}}; "
"assert _expand_vars('acdl-${env.environment}-${contract.id}', ctx)=='acdl-qa-assets'; "
"assert _expand_vars('nova-${env.environment}-${contract.id}', ctx)=='nova-qa-assets'; "
"print('interpolation ok')",
])
@@ -231,7 +231,7 @@ def _check_confidence_signal() -> Tuple[Status, str]:
def _check_outbox_writer() -> Tuple[Status, str]:
"""CAP-008: outbox_writer writes a hash-chained event to a temp file."""
work = tempfile.mkdtemp(prefix="acdl_outbox_")
work = tempfile.mkdtemp(prefix="nova_outbox_")
event_path = os.path.join(work, "event.json")
event = {
"contractId": "regression-test", "eventType": "CONFIDENCE_COMPUTED",
@@ -315,7 +315,7 @@ def _load_aws_env() -> Dict[str, str]:
continue
if "=" in line:
k, v = line.split("=", 1)
# P5 (REQ-164): dual-read fallback removed — NOVA_* only.
# NOVA_* only (ACDL_* fallback removed in v1.15 P5, REQ-164).
if k == "NOVA_AWS_ACCESS_KEY_ID":
env["AWS_ACCESS_KEY_ID"] = v
elif k == "NOVA_AWS_SECRET_ACCESS_KEY":
@@ -330,7 +330,7 @@ def _check_live_terraform_plan_microservice() -> Tuple[Status, str]:
microservice stack (D-093 live-AWS tier of the headline E2E).
Requires AWS credentials (NOVA_AWS_ACCESS_KEY_ID etc. in .env.secrets;
dual-read NOVA_* first, ACDL_* fallback per G-106).
NOVA_* only — the ACDL_* fallback was removed in v1.15 P5, REQ-164).
Runs in a temp dir; does NOT apply (plan only)."""
import tempfile, os
work = tempfile.mkdtemp(prefix="nova_regr_live_")